trying to build OOo2m95 using system's python-2.4-r3 and system's zlib. Reproducible: Always Steps to Reproduce: 1. emerge openoffice [ via overlay ] 2. 3. Actual Results: Making: ../../unxlngi6.pro/lib/libpyuno.so g++ -Wl,-z,combreloc -Wl,-rpath,'$ORIGIN' -shared -L../../unxlngi6.pro/lib -L../lib -L/var/tmp/portage/openoffice-1.9.95/work/SRC680_m95/solenv/unxlngi6/lib -L/var/tmp/portage/openoffice-1.9.95/work/SRC680_m95/solver/680/unxlngi6.pro/lib -L/var/tmp/portage/openoffice-1.9.95/work/SRC680_m95/solenv/unxlngi6/lib -L/opt/blackdown-jdk-1.4.2.01/lib -L/opt/blackdown-jdk-1.4.2.01/jre/lib/i386 -L/opt/blackdown-jdk-1.4.2.01/jre/lib/i386/client -L/opt/blackdown-jdk-1.4.2.01/jre/lib/i386/native_threads -L/usr/lib ../../unxlngi6.pro/slo/pyuno_version.o ../../unxlngi6.pro/slo/pyuno_description.o -o ../../unxlngi6.pro/lib/libpyuno.so ../../unxlngi6.pro/slo/pyuno_runtime.o ../../unxlngi6.pro/slo/pyuno.o ../../unxlngi6.pro/slo/pyuno_callable.o ../../unxlngi6.pro/slo/pyuno_module.o ../../unxlngi6.pro/slo/pyuno_type.o ../../unxlngi6.pro/slo/pyuno_util.o ../../unxlngi6.pro/slo/pyuno_except.o ../../unxlngi6.pro/slo/pyuno_adapter.o ../../unxlngi6.pro/slo/pyuno_gc.o -luno_cppu -luno_cppuhelpergcc3 -luno_sal -lpython2.4 -ldl -lpthread -lm -Wl,-Bdynamic -lstlport_gcc rm -f ../../unxlngi6.pro/lib/check_libpyuno.so mv ../../unxlngi6.pro/lib/libpyuno.so ../../unxlngi6.pro/lib/check_libpyuno.so /var/tmp/portage/openoffice-1.9.95/work/SRC680_m95/solenv/bin/checkdll.sh -L../../unxlngi6.pro/lib -L../lib -L/var/tmp/portage/openoffice-1.9.95/work/SRC680_m95/solenv/unxlngi6/lib -L/var/tmp/portage/openoffice-1.9.95/work/SRC680_m95/solver/680/unxlngi6.pro/lib -L/var/tmp/portage/openoffice-1.9.95/work/SRC680_m95/solenv/unxlngi6/lib -L/opt/blackdown-jdk-1.4.2.01/lib -L/opt/blackdown-jdk-1.4.2.01/jre/lib/i386 -L/opt/blackdown-jdk-1.4.2.01/jre/lib/i386/client -L/opt/blackdown-jdk-1.4.2.01/jre/lib/i386/native_threads -L/usr/lib ../../unxlngi6.pro/lib/check_libpyuno.so Checking DLL ../../unxlngi6.pro/lib/check_libpyuno.so ...: ERROR: /usr/lib/libpython2.4.so.1.0: undefined symbol: deflate dmake: Error code 1, while making '../../unxlngi6.pro/lib/libpyuno.so' Expected Results: googling for that error showed me that this library seems not to be linked correct to zlib's library which it should. This bugreport has nothing to do with OOo2m95. It just let this error occur with python being bad linked to zlib. /usr/bin/python is linked to zlib. 'ldd /usr/bin/python' shows 'libz.so.1 => /lib/libz.so.1 (0xa7eb2000)' on the other side 'ldd /usr/lib/libpython2.4.so.1.0' does not show libz.so.1. any python dev may enlighten me what could be wrong. thanks a lot! anomalie ~ # emerge info Portage 2.0.51.20-r4 (default-linux/x86/2005.0, gcc-3.4.3-20050110, glibc-2.3.5-r0, 2.6.11.5-ano1 i686) ================================================================= System uname: 2.6.11.5-ano1 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz Gentoo Base System version 1.6.11 dev-lang/python: 2.4-r3 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5 sys-devel/binutils: 2.15.97 sys-devel/libtool: 1.5.14 virtual/os-headers: 2.6.11 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -mtune=pentium4 -march=pentium4 -mfpmath=sse -msse2 -pipe -fforce-addr -fforce-mem -momit-leaf-frame-pointer -fomit-frame-pointer -fweb -ftracer -frename-registers" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -mtune=pentium4 -march=pentium4 -mfpmath=sse -msse2 -pipe -fforce-addr -fforce-mem -momit-leaf-frame-pointer -fomit-frame-pointer -fweb -ftracer -frename-registers -fvisibility-inlines-hidden" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://gentoo.inode.at/ ftp://gentoo.inode.at/source/" LANG="de_DE@euro" LINGUAS="de" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X aalib acpi alsa apache2 avi berkdb bitmap-fonts cdr cups curl dga dts dvd dvdr dvdread fastcgi fbcon foomaticdb gd gif glx gnome gpm gtk gtk2 hardenedphp icq imap imlib ipv6 java jpeg ldap libwww mad mbox mmx mmxext mpeg mysql ncurses nls nptl nptlonly nvidia oggvorbis opengl pam pdflib perl png ppds python qt quicktime readline samba sdl session sse sse2 ssl tiff truetype truetype-fonts type1-fonts unicode usb userlocales vhosts videos wmf wxwindows x86 xface xinerama xml xml2 xmms xprint xv xvid zlib video_cards_nvidia linguas_de" Unset: ASFLAGS, CTARGET, LC_ALL, LDFLAGS
did ebuild /path/to/python-2.4-r3.ebuild unpack/compile, then rebuilded libpython2.4.so and libpython2.4.so.1.0 with added '-lz', now ldd shows this: anomalie Python-2.4 # ldd libpython2.4* libpython2.4.a: ldd: warning: you do not have execution permission for `./libpython2.4.a' not a dynamic executable libpython2.4.so: linux-gate.so.1 => (0xffffe000) libpthread.so.0 => /lib/libpthread.so.0 (0xa7ee1000) libdl.so.2 => /lib/libdl.so.2 (0xa7edd000) libutil.so.1 => /lib/libutil.so.1 (0xa7ed9000) libm.so.6 => /lib/libm.so.6 (0xa7eb4000) libz.so.1 => /lib/libz.so.1 (0xa7ea4000) libc.so.6 => /lib/libc.so.6 (0xa7d74000) /lib/ld-linux.so.2 (0x75555000) libpython2.4.so.1.0: linux-gate.so.1 => (0xffffe000) libpthread.so.0 => /lib/libpthread.so.0 (0xa7ee1000) libdl.so.2 => /lib/libdl.so.2 (0xa7edd000) libutil.so.1 => /lib/libutil.so.1 (0xa7ed9000) libm.so.6 => /lib/libm.so.6 (0xa7eb4000) libz.so.1 => /lib/libz.so.1 (0xa7ea4000) libc.so.6 => /lib/libc.so.6 (0xa7d74000) /lib/ld-linux.so.2 (0x75555000) that SOLVED it :)
ok, seems like libpython2.4.so has zlib symbols (deflate etc) but libpython2.3.so doesn't. needs more investigation.
what about python 2.4.1? ldd /usr/bin/python does not even show libz here
will test soon
btw, roxx@anomalie ~ $ ldd /usr/bin/python linux-gate.so.1 => (0xffffe000) libpython2.4.so.1.0 => /usr/lib/libpython2.4.so.1.0 (0xa7eda000) libpthread.so.0 => /lib/libpthread.so.0 (0xa7ec8000) libdl.so.2 => /lib/libdl.so.2 (0xa7ec4000) libutil.so.1 => /lib/libutil.so.1 (0xa7ec0000) libz.so.1 => /lib/libz.so.1 (0xa7eb0000) libstdc++.so.6 => /usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/libstdc++.so.6 (0xa7de6000) libm.so.6 => /lib/libm.so.6 (0xa7dc0000) libgcc_s.so.1 => /usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/libgcc_s.so.1 (0xa7db7000) libc.so.6 => /lib/libc.so.6 (0xa7c87000) /lib/ld-linux.so.2 (0xa7fe9000) roxx@anomalie ~ $ /usr/bin/python -V Python 2.4.1
/usr/lib/libpython2.4.so.1.0 still has zlib symbols
ok, i've got to the bottom of this. the reason why python-2.4 has /usr/bin/python linked to libz is because of the libdir patch we apply. that patch inadvertently enabled zipmodule to be included into as default (it is already enabled via setup.py, there is no need to make it explicit). you can see that in Modules/Setup.dist. eradicator: you seem to be the one who introduced the patch for multilib, is there a reason why we need zipmodule and bsddb in Modules/Setup.dist or was it not intended? zlib and bsddb stuff is already initialised in setup.py, afaik.
I assume you are refering to these hunks here: @@ -396,7 +396,7 @@ GLHACK=-Dclear=__GLclear #DB=/usr/local/BerkeleyDB.4.0 #DBLIBVER=4.0 #DBINC=$(DB)/include -#DBLIB=$(DB)/lib +DBLIB=$(DB)/@@GENTOO_LIBDIR@@ #_bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER) # Historical Berkeley DB 1.85 @@ -442,7 +442,7 @@ GLHACK=-Dclear=__GLclear # Andrew Kuchling's zlib module. # This require zlib 1.1.3 (or later). # See http://www.gzip.org/zlib/ -#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz +zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/@@GENTOO_LIBDIR@@ -lz # Interface to the Expat XML parser # I believe I set this because setup.py did not find the correct locations on multilib systems, so it needed to be explicitly stated. I just got back from E3, so I don't have time to look into this in great detail, so feel free to just remove the hunks here as amd64 still has 2.4 masked (or atleast it was when I left), and I'll look into finding the proper fix when I get some time.
works fine here on amd64 with multilib with that snipped removed.
thanks, i committed the change to the patch a couple days back. so closing now.