Summary: | dev-libs/libxml2-2.9.1-r2 - ./.libs/libxml2.so: undefined reference to `bind', `...' | ||
---|---|---|---|
Product: | Gentoo/Alt | Reporter: | tao |
Component: | Prefix Support | Assignee: | Gentoo Prefix <prefix> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | chewi |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Solaris | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log
emerge --info '=dev-libs/libxml2-2.9.1-r2::gentoo_prefix' config.log |
Description
tao
2014-03-11 12:14:21 UTC
Created attachment 372372 [details]
build.log
Created attachment 372374 [details]
emerge --info '=dev-libs/libxml2-2.9.1-r2::gentoo_prefix'
With LDFLAGS="-lnsl -lz -L/lib" I can get past configure stage, but it fails later during linking: libtool: link: i386-pc-solaris2.11-gcc -D_REENTRANT -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wno-long-long -o .libs/testSchemas testSchemas.o -L/lib ./.libs/libxml2.so -L/rpool/gentoo/usr/lib -L/rpool/gentoo/lib -L/rpool/gentoo/tmp/usr/lib -lnsl -lpthread -lz /rpool/gentoo/usr/lib/libiconv.so -lm -lsocket -Wl,-rpath -Wl,/rpool/gentoo/usr/lib ./.libs/libxml2.so: undefined reference to `gzopen64' collect2: ld returned 1 exit status This is because with -L/lib it links against solaris libz.so (which is needed because otherwise /lib/libelf.so complains during configure configure:3613: i386-pc-solaris2.11-gcc -lnsl -L/lib conftest.c >&5 /lib/libelf.so.1: undefined reference to `inflateEnd@SUNW_1.1' /lib/libelf.so.1: undefined reference to `inflate@SUNW_1.1' /lib/libelf.so.1: undefined reference to `deflate@SUNW_1.1' /lib/libelf.so.1: undefined reference to `deflateReset@SUNW_1.1' /lib/libelf.so.1: undefined reference to `deflateInit_@SUNW_1.1' /lib/libelf.so.1: undefined reference to `inflateReset@SUNW_1.1' /lib/libelf.so.1: undefined reference to `deflateEnd@SUNW_1.1' /lib/libelf.so.1: undefined reference to `inflateInit_@SUNW_1.1' collect2: ld returned 1 exit status ) There is no gzopen64 in solaris provided libz: $ objdump -T /lib/libz.so | grep -i gzopen 00003d1c g DF .text 000005ee SUNW_1.1 gzopen there is gzopen64 in prefix libz (there are actually 2 versions – in /rpool/gentoo/lib/ and in /rpool/gentoo/tmp/usr/lib/): $ objdump -T /rpool/gentoo/tmp/usr/lib/libz.so.1.2.8 | grep gzopen 0000f6b0 g DF .text 00000016 Base gzopen64 0000f690 g DF .text 00000016 Base gzopen $ objdump -T /rpool/gentoo/lib/libz.so.1.2.8 | grep gzopen 0000f418 g DF .text 0000001b ZLIB_1.2.3.3 gzopen64 0000f3fd g DF .text 0000001b Base gzopen Is there any way I can get past this? Created attachment 376506 [details]
config.log
EXTRA_ECONF="--without-zlib" LDFLAGS="-lnsl -lz -L/lib" emerge libxml2 build successfully. I notice that it fails to add -lnsl because it tries to find gethostent and dies with those inflate/deflate errors. I wonder why libelf has these undefined references. I also wonder if you have another libelf in the Gentoo system. Mine is at /usr/lib from the dev-libs/elfutils package but it doesn't have any references to inflate/deflate. There is no libelf under /rpool/gentoo/ (actually dev-libs/elfutils are keyworded and dev-libs/libelf is masked in /rpool/gentoo/usr/portage/profiles/prefix/sunos/solaris/package.mask). later I've hit similiar problem with libz while building python:2.7 with LDFLAGS="-lnsl -lz -L/lib" building 'binascii' extension i386-pc-solaris2.11-gcc -fPIC -fno-strict-aliasing -fwrapv -DNDEBUG -I. -I/rpool/gentoo/usr/include -I/rpool/gentoo/var/tmp/portage/dev-lang/python-2.7.5-r4/work/Python-2.7.5/Include -I/rpool/gentoo/var/tmp/portage/dev-lang/python-2.7.5-r4/work/i386-pc-solaris2.11 -c /rpool/gentoo/var/tmp/portage/dev-lang/python-2.7.5-r4/work/Python-2.7.5/Modules/binascii.c -o build/temp.solaris-2.11-i86pc.32bit-2.7/rpool/gentoo/var/tmp/portage/dev-lang/python-2.7.5-r4/work/Python-2.7.5/Modules/binascii.o -DUSE_ZLIB_CRC32 i386-pc-solaris2.11-gcc -shared -lnsl -lz -L/lib -L/rpool/gentoo/lib -L/rpool/gentoo/usr/lib -L/usr/lib -L. -lnsl -lz -L/lib -L/rpool/gentoo/lib -L/rpool/gentoo/usr/lib -L/usr/lib -L. -fno-strict-aliasing -fwrapv -DNDEBUG -I. -IInclude -I/rpool/gentoo/var/tmp/portage/dev-lang/python-2.7.5-r4/work/Python-2.7.5/Include -I/rpool/gentoo/usr/include build/temp.solaris-2.11-i86pc.32bit-2.7/rpool/gentoo/var/tmp/portage/dev-lang/python-2.7.5-r4/work/Python-2.7.5/Modules/binascii.o -L/lib -L/rpool/gentoo/lib -L/rpool/gentoo/usr/lib -L/usr/lib -L. -lz -lpython2.7 -o build/lib.solaris-2.11-i86pc.32bit-2.7/binascii.so *** WARNING: renaming "binascii" since importing it failed: ld.so.1: python: fatal: libz.so.1: open failed: No such file or directory Fixed in the new bootstrap script. |