xapian-omega seems having problem with -lz linking index_file.o: undefined reference to symbol 'gzclose' Reproducible: Always Steps to Reproduce: 1. emerge =xapian-omega-1.3.4 2. 3. Actual Results: libtool: link: x86_64-pc-linux-gnu-g++ -fshow-column -Wall -W -Wredundant-decls -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wformat-security -fno-gnu-keywords -Wundef -Woverloaded-virtual -Wstrict-null-sentinel -Wshadow -Wstrict-overflow=1 -Wlogical-op -Wmissing-declarations -Wdouble-promotion -Winit-self -fvisibility=hidden -I/usr/include/xapian-1.3 -mtune=generic -O2 -pipe -std=gnu++11 -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -o omindex omindex.o myhtmlparse.o htmlparse.o index_file.o mime.o common/getopt.o commonhelp.o utils.o hashterm.o loadfile.o md5.o md5wrap.o xmlparse.o metaxmlparse.o utf8convert.o sample.o diritor.o runfilter.o freemem.o common/msvc_dirent.o xpsxmlparse.o common/str.o pkglibbindir.o svgparse.o tmpdir.o urlencode.o atomparse.o xlsxparse.o opendocparse.o common/keyword.o msxmlparse.o common/safe.o timegm.o datetime.o -lmagic -L/usr/lib64 -lxapian-1.3 /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../x86_64-pc-linux-gnu/bin/ld: index_file.o: undefined reference to symbol 'gzclose' /lib64/libz.so.1: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status Makefile:1096: recipe for target 'omindex' failed make[2]: *** [omindex] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory '/var/tmp/portage/app-text/xapian-omega-1.3.4/work/xapian-omega-1.3.4' Makefile:1386: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/var/tmp/portage/app-text/xapian-omega-1.3.4/work/xapian-omega-1.3.4' Makefile:863: recipe for target 'all' failed make: *** [all] Error 2 * ERROR: app-text/xapian-omega-1.3.4::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=app-text/xapian-omega-1.3.4::gentoo'`, * the complete build log and the output of `emerge -pqv '=app-text/xapian-omega-1.3.4::gentoo'`. * The complete build log is located at '/var/tmp/portage/app-text/xapian-omega-1.3.4/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/app-text/xapian-omega-1.3.4/temp/environment'. * Working directory: '/var/tmp/portage/app-text/xapian-omega-1.3.4/work/xapian-omega-1.3.4' * S: '/var/tmp/portage/app-text/xapian-omega-1.3.4/work/xapian-omega-1.3.4' >>> Failed to emerge app-text/xapian-omega-1.3.4, Log file: >>> '/var/tmp/portage/app-text/xapian-omega-1.3.4/temp/build.log'
Created attachment 425434 [details] build.log
a cheap workaround in Makefile.in LIBS = @LIBS@ -lz makes it compiling fine.
(In reply to Oleg from comment #2) > a cheap workaround in Makefile.in > LIBS = @LIBS@ -lz > makes it compiling fine. I wonder if this isn't a parallel build failure because I'm unable to reproduce it here. Since I can't reproduce it, can I ask you to 1) submit your `emerge --info xapian-omega` 2) test my theory (although it is just a guess at this point) by building with MAKEOPTS=-j1 and other values of -j
Created attachment 425784 [details] emerge --info
(In reply to Oleg from comment #4) > Created attachment 425784 [details] > emerge --info Can you try rebuilding with MAKEOPTS="-j1" and tell me if it works, or still fails.
sorry, i forgot to mention earlier, Yes, it does fail with MAKEOPTS="-j" with exactly same linking failure.
sorry, i forgot to mention earlier, Yes, it does fail with MAKEOPTS="-j1" with exactly same linking failure.
(In reply to Oleg from comment #7) > sorry, i forgot to mention earlier, Yes, it does fail with MAKEOPTS="-j1" > with exactly same linking failure. Sorry for sending you on a wild goose chase. I just couldn't understand why it was working on my system but not yours. Anyhow I found the problem. Around like 123 of configure.ac we have dnl Check for zlibVersion in -lz. SAVE_LIBS=$LIBS LIBS= dnl mingw build needs -lzlib or -lzdll. AC_SEARCH_LIBS([zlibVersion], [z zlib zdll], [], [ AC_MSG_ERROR([zlibVersion() not found in -lz, -lzlib, or -lzdll (you may need to install the zlib1g-dev or zlib-devel package)]) ]) ZLIB_LIBS=$LIBS LIBS=$SAVE_LIBS The problem is that ZLIB_LIBS doesn't make it into the makefile unless you run AC_SUBST([ZLIB_LIBS]) If you want to test, add that line right after ZLIB_LIBS=$LIBS, then run autoreconf -i -f and then ./configure ; make. I'll prepare a patch and alert upstream.
(In reply to Anthony Basile from comment #8) > > The problem is that ZLIB_LIBS doesn't make it into the makefile unless you > run > > AC_SUBST([ZLIB_LIBS]) > Upstream already fixed the problem. Its their commit 755169cc. Please sync up and test in about 1 hour. Reopen this bug if there is still a problem.