GNOME Bugzilla – Bug 519234
building gtkhtml 3.17.92 fails with linking error
Last modified: 2009-01-24 14:59:15 UTC
Steps to reproduce: 1. make & install glib-2.15.6, libsoup-2.3.4 and libbonobo-2.21.90 2. configure gtkhtml 3.17.92 3. try to make gtkhtml 3.17.92 Stack trace: Other information: the configure-script, or some part related to it has a bug. it finds out, that i have the latest glib-2.15.6 installed in /usr/local/lib but when it come to linking it links against the old glib-2.14 installed in /usr/lib64! here you can see the latest linking after which the error occurs: ... /usr/local/lib/libpango-1.0.so /usr/lib64/libgobject-2.0.so /usr/lib64/libgmodule-2.0.so /usr/lib64/libglib-2.0.so /usr/lib64/libpcre.so /usr/local/lib/libsoup-2.4.so /usr/local/lib/libgthread-2.0.so -lpthread -lrt /usr/lib64/libxml2.so -lm /usr/lib64/libgnutls.so -lz -lgcrypt -lgpg-error /usr/local/lib/libgio-2.0.so /usr/local/lib/libgobject-2.0.so /usr/local/lib/libgmodule-2.0.so -ldl /usr/local/lib/libglib-2.0.so htmlurl.o: In function `html_url_append_path': /usr/src/packages/SOURCES/gtkhtml-3.17.92/gtkhtml/htmlurl.c:493: undefined reference to `g_assertion_message_expr' when you look carefully you can see, that there is "/usr/lib64/libglib-2.0.so" some positions BEFORE "/usr/local/lib/libglib-2.0.so" which is at last position. so linking tries to link agains the old glib-2.14 installed in "/usr/lib64/libglib-2.0.so". but WHY! the same error apperas in the linking of evolution, evolution-data-server and evolution-exchange. i wasn't able to tell the compiler to use the version installed in /usr/local/lib. so i did it the "hard" way, and copied the version from /usr/local/lib over the version from /usr/lib64. and voila, making finished without error.
What values are you using for LD_LIBRARY_PATH and PKG_CONFIG_PATH ?
echo $LD_LIBRARY_PATH /usr/local/lib:/usr/local/lib64:/opt/oracle/product/10gR2/lib32:/opt/oracle/product/10gR2/lib:/opt/oracle/product/10gR2/ctx/lib PKG_CONFIG_PATH is empty.
Rainer, please quote the entire libtool invocation plus the gcc invocation generated by libtool. From the fragment quoted above it is hard to tell where the /usr/lib64/ paths came from. My guess is that you didn't recompile all libraries depending on glib; this is something which can be found by looking at the link line. I had to compile quite a few more libs than just libsoup-2.3.4 and libbonobo-2.21.90 to build Evolution after updating glib. FWIW, my pkgconfig directory currently contains: atk.pc avahi-client.pc avahi-core.pc avahi-glib.pc avahi-gobject.pc avahi-ui.pc bonobo-activation-2.0.pc dbus-glib-1.pc gail.pc gdk-2.0.pc gdk-pixbuf-2.0.pc gdk-pixbuf-xlib-2.0.pc gdk-x11-2.0.pc gio-2.0.pc gio-unix-2.0.pc glib-2.0.pc gmodule-2.0.pc gmodule-export-2.0.pc gmodule-no-export-2.0.pc gnome-icon-theme.pc gnome-keyring-1.pc gnome-vfs-2.0.pc gnome-vfs-module-2.0.pc gobject-2.0.pc gthread-2.0.pc gtk+-2.0.pc gtk+-unix-print-2.0.pc gtk+-x11-2.0.pc libbonobo-2.0.pc libbonoboui-2.0.pc libgnomecanvas-2.0.pc libgnomeui-2.0.pc libgtkhtml-3.14.pc libsoup-2.2.pc libsoup-2.4.pc ORBit-2.0.pc ORBit-CosNaming-2.0.pc ORBit-idl-2.0.pc ORBit-imodule-2.0.pc pangoft2.pc pango.pc pangoxft.pc pangox.pc
(In reply to comment #2) > PKG_CONFIG_PATH is empty. That may be the problem. Try: export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig and then "make distclean" and finally rebuild gtkhtml. That should tell gtkhtml's configure script to build against the libraries you compiled and installed yourself under /usr/local/lib.
(In reply to comment #4) > (In reply to comment #2) > > PKG_CONFIG_PATH is empty. > > That may be the problem. Try: > > export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig > > and then "make distclean" and finally rebuild gtkhtml. > > That should tell gtkhtml's configure script to build against the libraries you > compiled and installed yourself under /usr/local/lib. > that didn't change anything. :-( i think the system found /usr/local/lib/pkgconfig automatically, even the variable PKG_CONFIG_PATH was not set in the past. so setting it, changed nothing. i also tried to change the file libtool. which also didn't help: i changed the following lines, and put /usr/local/lib at the beginning: line 328: sys_lib_search_path_spec="/usr/local/lib /usr/lib64/gcc/x86_64-suse-linux/4.3 /usr/lib64 /lib64 /usr/x86_64-suse-linux/lib" line 7416: compiler_lib_search_path="-L/usr/lib64/gcc/x86_64-suse-linux/4.3 -L/usr/local/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.3/../../.." line 7496: sys_lib_search_path_spec="/usr/local/lib /usr/lib64/gcc/x86_64-suse-linux/4.3 /usr/lib64 /lib64 /usr/x86_64-suse-linux/lib"
(In reply to comment #3) > Rainer, please quote the entire libtool invocation plus the gcc invocation > generated by libtool. From the fragment quoted above it is hard to tell where > the /usr/lib64/ paths came from. ok, here we go: /bin/sh ../libtool --tag=CC --mode=link gcc -DGDK_DISABLE_DEPRECATED=1 -DG_DISABLE_DEPRECATED=1 -DGNOME_DISABLE_DEPRECATED=1 -DPREFIX=\""/usr/local"\" -DLIBDIR=\""/usr/local/share"\" -DDATADIR=\""/usr/local/share"\" -DSYSCONFDIR=\""/usr/local/etc"\" -DICONDIR=\"/usr/local/share/gtkhtml-3.14/icons\" -DGTKHTML_DATADIR=\""/usr/local/share/gtkhtml-3.14"\" -DGLADE_DATADIR=\"/usr/local/share/gtkhtml-3.14\" -DGNOMELOCALEDIR=\""/usr/local/share/locale"\" -g -O2 -Wall -Wmissing-prototypes -o testgtkhtml testgtkhtml.o htmlurl.o libgtkhtml-3.14.la -Wl,--rpath -Wl,/usr/local/lib -pthread -L/usr/local/lib -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lgnomevfs-2 -lgnomecanvas-2 -lgnome-2 -lpopt -lbonobo-2 -lbonobo-activation -lart_lgpl_2 -lgconf-2 -lORBit-2 -lgthread-2.0 -lrt -lglade-2.0 -lgtk-x11-2.0 -lxml2 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpangoft2-1.0 -lfontconfig -lfreetype -lz -lpango-1.0 -lm -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -L/usr/local/lib -lsoup-2.4 -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 gcc -DGDK_DISABLE_DEPRECATED=1 -DG_DISABLE_DEPRECATED=1 -DGNOME_DISABLE_DEPRECATED=1 -DPREFIX=\"/usr/local\" -DLIBDIR=\"/usr/local/share\" -DDATADIR=\"/usr/local/share\" -DSYSCONFDIR=\"/usr/local/etc\" -DICONDIR=\"/usr/local/share/gtkhtml-3.14/icons\" -DGTKHTML_DATADIR=\"/usr/local/share/gtkhtml-3.14\" -DGLADE_DATADIR=\"/usr/local/share/gtkhtml-3.14\" -DGNOMELOCALEDIR=\"/usr/local/share/locale\" -g -O2 -Wall -Wmissing-prototypes -o .libs/testgtkhtml testgtkhtml.o htmlurl.o -Wl,--rpath -Wl,/usr/local/lib -pthread ./.libs/libgtkhtml-3.14.so -L/usr/local/lib -L/lib64 -L/usr/lib64 /usr/lib64/libgnomeui-2.so /usr/lib64/libgnome-keyring.so -ljpeg /usr/lib64/libbonoboui-2.so /usr/lib64/libSM.so -lICE /usr/lib64/libgnomecanvas-2.so /usr/lib64/libgailutil.so /usr/lib64/libgnome-2.so /usr/lib64/libgnomevfs-2.so /usr/lib64/libdbus-glib-1.so -lnsl -lssl -lcrypto /usr/lib64/libavahi-glib.so /usr/lib64/libavahi-client.so -ldbus-1 /usr/lib64/libavahi-common.so -lresolv -lutil /usr/lib64/libbonobo-2.so /usr/lib64/libbonobo-activation.so /usr/lib64/libesd.so -lasound /usr/lib64/libaudiofile.so -lpopt /usr/local/lib/libbonobo-2.so /usr/local/lib/libbonobo-activation.so /usr/lib64/libORBitCosNaming-2.so /usr/lib64/libart_lgpl_2.so /usr/lib64/libgconf-2.so /usr/lib64/libORBit-2.so /usr/lib64/libgthread-2.0.so /usr/lib64/libglade-2.0.so /usr/lib64/libgtk-x11-2.0.so /usr/lib64/libgdk-x11-2.0.so /usr/lib64/libatk-1.0.so /usr/lib64/libgdk_pixbuf-2.0.so /usr/local/lib/libpangocairo-1.0.so /usr/lib64/libcairo.so /usr/lib64/libglitz.so /usr/lib64/libpng12.so /usr/lib64/libxcb-render-util.so /usr/lib64/libxcb-render.so /usr/lib64/libXrender.so /usr/lib64/libX11.so /usr/lib64/libxcb-xlib.so /usr/lib64/libxcb.so /usr/lib64/libXau.so /usr/local/lib/libpangoft2-1.0.so /usr/lib64/libfontconfig.so -lexpat /usr/lib64/libfreetype.so /usr/local/lib/libpango-1.0.so /usr/lib64/libgobject-2.0.so /usr/lib64/libgmodule-2.0.so /usr/lib64/libglib-2.0.so /usr/lib64/libpcre.so /usr/local/lib/libsoup-2.4.so /usr/local/lib/libgthread-2.0.so -lpthread -lrt /usr/lib64/libxml2.so -lm /usr/lib64/libgnutls.so -lz -lgcrypt -lgpg-error /usr/local/lib/libgio-2.0.so /usr/local/lib/libgobject-2.0.so /usr/local/lib/libgmodule-2.0.so -ldl /usr/local/lib/libglib-2.0.so htmlurl.o: In function `html_url_append_path': /usr/src/packages/SOURCES/gtkhtml-3.17.92/gtkhtml/htmlurl.c:493: undefined reference to `g_assertion_message_expr' /usr/local/lib/libsoup-2.4.so: undefined reference to `g_checksum_free' /usr/local/lib/libsoup-2.4.so: undefined reference to `g_checksum_get_string' /usr/local/lib/libsoup-2.4.so: undefined reference to `g_checksum_update' /usr/local/lib/libgio-2.0.so: undefined reference to `g_hash_table_iter_init' /usr/local/lib/libgio-2.0.so: undefined reference to `glib_gettext' /usr/local/lib/libgio-2.0.so: undefined reference to `g_hash_table_iter_next' ./.libs/libgtkhtml-3.14.so: undefined reference to `g_assertion_message' /usr/local/lib/libsoup-2.4.so: undefined reference to `g_checksum_new' /usr/local/lib/libgio-2.0.so: undefined reference to `g_warn_message' /usr/local/lib/libgio-2.0.so: undefined reference to `g_uri_escape_string' collect2: ld returned 1 exit status make[2]: *** [testgtkhtml] Error 1 make[2]: Leaving directory `/usr/src/packages/SOURCES/gtkhtml-3.17.92/gtkhtml' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/src/packages/SOURCES/gtkhtml-3.17.92' make: *** [all] Error 2 > My guess is that you didn't recompile all libraries depending on glib; this is > something which can be found by looking at the link line. > > I had to compile quite a few more libs than just libsoup-2.3.4 and > libbonobo-2.21.90 to build Evolution after updating glib. FWIW, my pkgconfig but the whole thing worked after i copied the libglib* files from /usr/local/lib to /usr/lib64 and then started make again. now i have evolution 2.21.92 working without making any other packages. after i made it, i copied original libglib* files back to /usr/lib64. this is dirty. but saved me. but i want a better solution, next time i make evolution....
now i also changed the Makefile coz the failing part is the gcc-call NOT the libtool-call: i added the following lines: GLIB_INCLUDE = -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include GLIB_CFLAGS = -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include GLIB_LIBS = -L/usr/local/lib -lglib-2.0 but it changed nothing.... :-(
> /bin/sh ../libtool --tag=CC --mode=link ... -lgnomeui-2 ... > gcc ... -L/lib64 -L/usr/lib64 /usr/lib64/libgnomeui-2.so .. It's exactly what I thought. libtool inserts -L/lib64 -L/usr/lib64 and later also the system's glib because that's what is specified by the libgnomeui-2.la that it found. You really have to recompile *all* libraries depending on glib; that includes libgnomeui-2 plus an awful lot of others. >> My guess is that you didn't recompile all libraries depending on glib; this is >> something which can be found by looking at the link line. >> >> I had to compile quite a few more libs than just libsoup-2.3.4 and >> libbonobo-2.21.90 to build Evolution after updating glib. FWIW, my pkgconfig > but the whole thing worked after i copied the libglib* files from > /usr/local/lib to /usr/lib64 and then started make again. libtool is not intelligent enough to recognize that the glib that e.g. gnomeui-2 needs is superseded by a more recent glib that is also on the link line. Technically it would work, but not with libtool. The only way to do it with libtool and the existing system's auxiliary libraries is to update the glib.so of the system in place, just like you did.
(In reply to comment #8) > > You really have to recompile *all* libraries depending on glib; that includes > libgnomeui-2 plus an awful lot of others. whould it be sufficient to recompile only libgnomeui-2? > The only way to do it with libtool and the existing system's auxiliary > libraries > is to update the glib.so of the system in place, just like you did. and how do i do this? you mean i should install the new glib 2.15.6 in /usr/lib64? is glib 2.15.6 backwardsd compatible to 2.14.x? do i have to expect side-effects when i install the 2.15.6 into /usr/lib64?
Does your distro not provide recent enough packages for these libraries? If not, we're straying into territory here where you should consider using a more automated build solution like jhbuild or garnome. You really don't want to find yourself compiling the entire GNOME development platform by hand.
(In reply to comment #10) > Does your distro not provide recent enough packages for these libraries? yes, there is a "unstable" repository with latest gnome for opensuse10.3. but i didn't want to update the whole gnome-system just to use latest evolution. but from what i know now it seems, that it is necessary.... > If not, we're straying into territory here where you should consider using a > more automated build solution like jhbuild or garnome. You really don't want > to find yourself compiling the entire GNOME development platform by hand. of course not. i think i will live with the situation that i have to overwrite all glib-2-files in /usr/lib64 with the new files from /usr/local/lib when compiling evolution until i will upgrade to opensuse11 or install the "unstable" gnome-repository.
(In reply to comment #9) > (In reply to comment #8) > > > > You really have to recompile *all* libraries depending on glib; that includes > > libgnomeui-2 plus an awful lot of others. > So first of all, this is NOTABUG. > whould it be sufficient to recompile only libgnomeui-2? > probably not. > > The only way to do it with libtool and the existing system's auxiliary > > libraries > > is to update the glib.so of the system in place, just like you did. > > and how do i do this? You can use JHBuild.