GNOME Bugzilla – Bug 532093
could not build out with xml 2.6.31
Last modified: 2010-03-14 17:15:17 UTC
Please describe the problem: There is no "-lz -lm -lsocket -lnsl" in Libs flag in xml 2.6.31 pc file, and this caused gnect build error. The fix is to add "-lz in Makefile.am, --- gnome-games-2.20.2/gnect/src/Makefile.am.ori 2008-05-07 03:57:06.118511820 +0100 +++ gnome-games-2.20.2/gnect/src/Makefile.am 2008-05-07 03:59:08.723539342 +0100 @@ -76,5 +76,6 @@ $(GNOME_GAMES_LIBS) \ $(INTLLIBS) \ $(LIB_GGZMOD) \ - $(LIB_GGZ_GTK) + $(LIB_GGZ_GTK) \ + -lz Changes of libxml-2.0.pc ******************* --- /tmp/libxml-2.0.pc.ori 2008-05-06 11:22:20.957419129 +0100 +++ /usr/lib/pkgconfig/libxml-2.0.pc 2008-04-15 08:17:29.000000000 +0100 @@ -5,8 +5,9 @@ modules=1 Name: libXML -Version: 2.6.23 +Version: 2.6.31 Description: libXML library version2. Requires: -Libs: -L${libdir} -lxml2 -lpthread -lz -lm -lsocket -lnsl +Libs: -L${libdir} -lxml2 +Libs.private: -lpthread -lz -lm -lsocket -lnsl Cflags: -I${includedir}/libxml2 ******************* Steps to reproduce: 1. 2. 3. Actual results: Expected results: Does this happen every time? Other information:
Can anybody review it and give me some comments? Thanks! Dave
I've been building against 2.6.x for a long, long time. I'm not really sure why zlib is an issue. This seems more like a Solaris problem to me...
The GNU linker finds implicit dependencies automatically. I.e. if your code uses functions libz and you don't link to libz, but you link to some other library that links to libz then GNU ld will resolve the symbols. The Solaris linker doesn't do that. If you use symbols from a library, you need to explicitly link to it.
(In reply to comment #2) > I've been building against 2.6.x for a long, long time. I'm not really sure why > zlib is an issue. This seems more like a Solaris problem to me... Any update on this bug? Laszlo is right, maybe you have been linking through other dependency, the proper fix IMHO is the one that Dave have proposed.
Well, any news? Jason, could you add a comment, like either accept that patch or close as WONTFIX? FWIW: linking with --as-needed should prevent the linker from pulling unnecessary symbols. Dunno if this is important anyway.
This libxml2 change was introduced in bug 344594. Maybe you should take this up with the libxml2 maintainers? Does this really affect only gnect, not the other games using ggz ?
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!