LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Gtk+ and Glib compiling issue (https://www.linuxquestions.org/questions/programming-9/gtk-and-glib-compiling-issue-766347/)

CoderMan 11-02-2009 06:17 PM

Gtk+ and Glib compiling issue
 
Hi. I need a very recent Gtk+ so that I can work on GIMP development. I pulled glib 2.22.2 and gtk+ 2.19.0 from the git repositories. After compiling and installing glib, I fail to compile gtk+. I make it through the configure stage fine, but during compiling it dies with this message:

Code:

libtool: link: gcc -DGDK_PIXBUF_DISABLE_DEPRECATED -g -O2 -g -Wall -o .libs/gtk-query-immodules-2.0 queryimmodules.o  ./.libs/libgtk-x11-2.0.so -L/usr/local/lib /scratch/choward/gtk+/gdk/.libs/libgdk-x11-2.0.so /usr/lib/libatk-1.0.so ../gdk-pixbuf/.libs/libgdk_pixbuf-2.0.so ../gdk/.libs/libgdk-x11-2.0.so /usr/lib/libpangocairo-1.0.so /usr/lib/libpangoft2-1.0.so /usr/lib/libpango-1.0.so /usr/lib/libgobject-2.0.so /usr/lib/libgmodule-2.0.so /usr/lib/libglib-2.0.so /usr/lib/libXinerama.so /usr/lib/libXcursor.so /usr/lib/libXcomposite.so /usr/lib/libXext.so /usr/lib/libXdamage.so /usr/lib/libXfixes.so /usr/lib/libcairo.so /usr/lib/libpixman-1.so /usr/lib/libfontconfig.so /usr/lib/libfreetype.so /usr/lib/libexpat.so /usr/lib/libpng12.so /usr/lib/libXrender.so -lz /usr/lib/libX11.so /usr/lib/libXau.so /usr/lib/libXdmcp.so /scratch/choward/gtk+/gdk-pixbuf/.libs/libgdk_pixbuf-2.0.so /usr/local/lib/libgio-2.0.so -lresolv /usr/local/lib/libgobject-2.0.so /usr/local/lib/libgmodule-2.0.so -ldl /usr/local/lib/libglib-2.0.so -lm
/usr/local/lib/libgio-2.0.so: undefined reference to `g_ptr_array_new_with_free_func'
/usr/local/lib/libgio-2.0.so: undefined reference to `g_error_new_valist'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_array_unref'
/usr/local/lib/libgio-2.0.so: undefined reference to `g_hostname_is_non_ascii'
/usr/local/lib/libgio-2.0.so: undefined reference to `g_hostname_to_ascii'
/usr/local/lib/libgio-2.0.so: undefined reference to `g_mkstemp_full'
/usr/local/lib/libgio-2.0.so: undefined reference to `g_array_get_type'
/usr/local/lib/libgio-2.0.so: undefined reference to `g_byte_array_unref'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_mapped_file_unref'
/usr/local/lib/libgio-2.0.so: undefined reference to `g_byte_array_get_type'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_array_get_element_size'
/usr/local/lib/libgio-2.0.so: undefined reference to `g_main_context_get_thread_default'
collect2: ld returned 1 exit status
make[4]: *** [gtk-query-immodules-2.0] Error 1
make[4]: Leaving directory `/scratch/choward/gtk+/gtk'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/scratch/choward/gtk+/gtk'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/scratch/choward/gtk+/gtk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/scratch/choward/gtk+'
make: *** [all] Error 2

So does this mean there is some lack of synchronization between the glib and gtk+ here? If so, does anyone know which version of glib to use with the latest version of gtk+? I am looking in the gtk+ source code documentation, but I haven't yet found any info on this issue.

I'm building on a 32-bit Gentoo system.

Code:

choward@adler /scratch/choward/gimp $ g++ --version
g++ (Gentoo 4.3.2-r3 p1.6, pie-10.1.5) 4.3.2


knudfl 11-03-2009 07:03 AM

Probably have a look into an OS with the latest versions :
Example :
Fedora 12 Rawhide, "testing" : glib2-2.22.2 + gtk2-2.18.2 .

And may be use the patching from the "src.rpm's", if any :
glib2-2.22.2-1.fc12.src.rpm , gtk2-2.18.2-11.fc12.src.rpm .
( For month's, the version has been gtk2-2.18.3 , they have
now changed to gtk2-2.18.2 in ' beta ' )

http://download.fedora.redhat.com/pu...1.fc12.src.rpm

http://download.fedora.redhat.com/pu...2.fc12.src.rpm

These links are temporary, can change any day.
.....
.....

And by the way, I would configure the new libs this way:
' ./configure --prefix=/usr/local/glib2222/ '
.. not to disturb the current applications with some
"may be incompatible libraries".
.....

knudfl 11-03-2009 08:04 AM

Well, there is a stable version of gtk+-2.19.0 , 02-Nov-2009 :
http://ftp.gnome.org/pub/GNOME/sourc...2.19.0.tar.bz2

Works with glib-2.22.2 , 07-Oct-2009 :
http://ftp.gnome.org/pub/GNOME/sourc...2.22.2.tar.bz2

.. and atk-1.24.0 , pango-1.26.0, cairo-1.8.8 , png-1.2.40 .......

1)
cd gtk+-2.19.0/
2)
export PKG_CONFIG_LIBDIR=/usr/local/glib2222/lib/pkgconfig:/usr/lib/pkgconfig/
3)
./configure --prefix=/usr/local/glib2222/

.. and 'make' runs with no errors , gcc-4.4.1 ............
.....


All times are GMT -5. The time now is 07:16 PM.