Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 574666 - =app-text/xapian-omega-1.3.4 : file.o: undefined reference to symbol 'gzclose'
Summary: =app-text/xapian-omega-1.3.4 : file.o: undefined reference to symbol 'gzclose'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-14 05:34 UTC by Oleh
Modified: 2016-02-19 21:15 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (xapian-omega-build.log,44.91 KB, text/x-log)
2016-02-14 05:37 UTC, Oleh
Details
emerge --info (emerge.info,5.51 KB, text/plain)
2016-02-18 14:01 UTC, Oleh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oleh 2016-02-14 05:34:38 UTC
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'
Comment 1 Oleh 2016-02-14 05:37:15 UTC
Created attachment 425434 [details]
build.log
Comment 2 Oleh 2016-02-14 05:42:36 UTC
a cheap workaround in Makefile.in
LIBS =  @LIBS@ -lz
makes it compiling fine.
Comment 3 Anthony Basile gentoo-dev 2016-02-18 11:26:39 UTC
(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
Comment 4 Oleh 2016-02-18 14:01:19 UTC
Created attachment 425784 [details]
emerge --info
Comment 5 Anthony Basile gentoo-dev 2016-02-19 09:48:44 UTC
(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.
Comment 6 Oleh 2016-02-19 10:54:42 UTC
sorry, i forgot to mention earlier, Yes, it does fail with MAKEOPTS="-j" with exactly same linking failure.
Comment 7 Oleh 2016-02-19 10:55:13 UTC
sorry, i forgot to mention earlier, Yes, it does fail with MAKEOPTS="-j1" with exactly same linking failure.
Comment 8 Anthony Basile gentoo-dev 2016-02-19 20:59:00 UTC
(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.
Comment 9 Anthony Basile gentoo-dev 2016-02-19 21:15:54 UTC
(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.