GNOME Bugzilla – Bug 515566
Gimp-2.4.4 does not compile on Fedora-8
Last modified: 2008-10-30 20:09:28 UTC
When compiling libgimpthumb compilation fails with: gcc -g -O2 -Wall -Wdeclaration-after-statement -Wmissing-prototypes -Wmissing-declarations -Winit-self -Wpointer-arith -o .libs/gimp-thumbnail-list gimp-thumbnail-list.o ./.libs/libgimpthumb-2.0.so ./.libs/libgimpthumb-2.0.so: undefined reference to `g_once_init_enter_impl' /usr/lib/libgdk_pixbuf-2.0.so.0: undefined reference to `g_once_init_enter' ./.libs/libgimpthumb-2.0.so: undefined reference to `g_once_init_leave' collect2: ld returned 1 exit status make[2]: *** [gimp-thumbnail-list] Error 1 make[2]: Leaving directory `/usr/local/src/gimp-2.4.4/libgimpthumb' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/local/src/gimp-2.4.4' make: *** [all] Error 2 This because $(LIBS) is empty and $(libgimpthumb_2_0_la_LIBADD )does not include -lglib-2.0. Therefore glib-2.0 is not included in the link command resulting in the undefined references.
Your installation is most likely to be broken as the linker line has $(GDK_PIXBUF_LIBS) which should pull in the right version of GLib. It shouldn't hurt to add GLIB_LIBS explicitly though, so I did that: 2008-02-11 Sven Neumann <sven@gimp.org> * libgimpthumb/Makefile.am (libgimpthumb_2_0_la_LIBADD): explicitly added GLIB_LIBS. Fixes bug #515566.
Just a comment that the error message probably indicates that the system is finding an incorrect version of glib -- the functions that are mentioned, g_once_init_enter etc, are recent additions.
The initial bug report indicated that only libgimpthumb was affected. The other libraries compiled fine (I verified libgimpmodule only) The correct version of libglib-2.0 was on the system, adding by hand -lglib-2,0 to the LIBS resolved the problem. The fact that the problem only occurred in libgimpthumb indicates that the process of generating the Makefile for that library malfunctioned in some way. Apparently Sven Neumann has modified Makefile.am for libgimpthumb, so one may assume that this problem has been fixed. By the way, thanks for the speedy reaction.