GNOME Bugzilla – Bug 147349
Missing link to zlib
Last modified: 2004-12-22 21:47:04 UTC
while doing the jhbuild, the build stopped at libgnomeprint. it shows an error libgnomeprint/.libs/libgnomeprint-2-2.so: undefined reference to `deflate' ../libgnomeprint/.libs/libgnomeprint-2-2.so: undefined reference to `deflateInit_' ../libgnomeprint/.libs/libgnomeprint-2-2.so: undefined reference to `deflateEnd' collect2: ld returned 1 exit status make[3]: *** [generate] Error 1 make[3]: Leaving directory `/home/vinodtr/cvs/gnome2/libgnomeprint/tests' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/vinodtr/cvs/gnome2/libgnomeprint/tests' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/vinodtr/cvs/gnome2/libgnomeprint' make: *** [all] Error 2 *** error during stage build of libgnomeprint: could not build module *** [1/31]
reassigning to the right component...
This is strange. configure.in does look for the library and adds -lz to the link line. could you please attach config.log here?
Actually there are two checks for zlib: AC_CHECK_LIB(z, zlibVersion, [Z_LIBS=-lz AC_SUBST(Z_LIBS)], AC_MSG_ERROR([*** zlib is required])) and AC_CHECK_LIB(z, gzopen, [ AC_CHECK_HEADER(zlib.h, [ AC_DEFINE(HAVE_ZLIB, 1, [Define to 1 if you have the <zlib.h> header file.]) Z_LIBS=-lz AC_SUBST(Z_LIBS) ]) ], AC_MSG_ERROR([*** zlib is required])) The first check probably should not have the assignment and the AC_SUBST on the same line. And the second check should probably barf if zlib.h is nowhere to be found.
I've merged the tests and made the result more robust.