Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 195784 - dev-lang/python-2.5.1-r2 undefined symbol in zlib.so
Summary: dev-lang/python-2.5.1-r2 undefined symbol in zlib.so
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-13 22:58 UTC by Gilles Dartiguelongue (RETIRED)
Modified: 2007-10-26 10:39 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gilles Dartiguelongue (RETIRED) gentoo-dev 2007-10-13 22:58:58 UTC
During gnome-2.20 developpement cycle, I've been hit by python-2.5 update. On my main box I started seing some gnome python apps failing. The two examples right now are deskbar-applet and net-p2p/deluge. Those apps fail with:

ImportError: /usr/lib/python2.5/lib-dynload/zlib.so: undefined symbol: inflateCopy

I recently found out that python installs its test file, and obviously running the appropriate test gives:

# python /usr/lib/python2.5/test/test_zlib.py
Traceback (most recent call last):
  File "/usr/lib/python2.5/test/test_zlib.py", line 3, in <module>
    import zlib
ImportError: /usr/lib/python2.5/lib-dynload/zlib.so: undefined symbol: inflateCopy

I've tried various combinations of safe CFLAGS, removed LDFLAGS, tried on other boxes (pII, amd64, ...) and I can't reproduce it.

readelf -s /usr/lib/python2.5/lib-dynload/zlib.so 

Symbol table '.dynsym' contains 46 entries:
   Num:    Value  Size Type    Bind   Vis      Ndx Name
     0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 00000000   266 FUNC    GLOBAL DEFAULT  UND PyModule_AddObject
     2: 00000000    94 FUNC    GLOBAL DEFAULT  UND inflateEnd
     3: 00000000     4 OBJECT  GLOBAL DEFAULT  UND PyExc_ValueError
     4: 00000000    57 FUNC    GLOBAL DEFAULT  UND PyModule_AddStringConstan
     5: 00000000     0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
     6: 00000000     0 NOTYPE  WEAK   DEFAULT  UND _Jv_RegisterClasses
     7: 00000000  2714 FUNC    GLOBAL DEFAULT  UND deflate
     8: 00000000    89 FUNC    GLOBAL DEFAULT  UND deflateInit_
     9: 00000000    67 FUNC    GLOBAL DEFAULT  UND _PyObject_New
    10: 00000000   139 FUNC    GLOBAL DEFAULT  UND PyThread_allocate_lock
    11: 00000000   311 FUNC    GLOBAL DEFAULT  UND PyString_FromStringAndSiz
    12: 00000000    62 FUNC    GLOBAL DEFAULT  UND Py_FindMethod
    13: 00000000    57 FUNC    GLOBAL DEFAULT  UND PyModule_AddIntConstant
    14: 00000000   304 FUNC    GLOBAL DEFAULT  UND inflateInit2_
    15: 00000000   107 FUNC    GLOBAL DEFAULT  UND PyErr_Format
    16: 00000000    35 FUNC    GLOBAL DEFAULT  UND PyArg_ParseTuple
    17: 00000000  7061 FUNC    GLOBAL DEFAULT  UND inflate
    18: 00000000   227 FUNC    GLOBAL DEFAULT  UND free@GLIBC_2.0 (2)
    19: 00000000    51 FUNC    GLOBAL DEFAULT  UND PyThread_release_lock
    20: 00000000  1550 FUNC    GLOBAL DEFAULT  UND crc32
    21: 00000000   230 FUNC    GLOBAL DEFAULT  UND deflateEnd
    22: 00000000   117 FUNC    GLOBAL DEFAULT  UND PyEval_RestoreThread
    23: 00000000     4 OBJECT  GLOBAL DEFAULT  UND PyExc_MemoryError
    24: 00000000   327 FUNC    GLOBAL DEFAULT  UND PyString_FromString
    25: 00000000   130 FUNC    GLOBAL DEFAULT  UND PyInt_FromLong
    26: 00000000    87 FUNC    GLOBAL DEFAULT  UND PyEval_SaveThread
    27: 00000000   192 OBJECT  GLOBAL DEFAULT  UND PyType_Type
    28: 00000000   376 FUNC    GLOBAL DEFAULT  UND malloc@GLIBC_2.0 (2)
    29: 00000000   502 FUNC    GLOBAL DEFAULT  UND PyErr_NewException
    30: 00000000   547 FUNC    GLOBAL DEFAULT  UND deflateCopy
    31: 00000000   712 FUNC    GLOBAL DEFAULT  UND deflateInit2_
    32: 00000000   729 FUNC    GLOBAL DEFAULT  UND Py_InitModule4
    33: 00000000   445 FUNC    GLOBAL DEFAULT  UND PyObject_Free
    34: 00000000   225 FUNC    GLOBAL DEFAULT  UND _PyString_Resize
    35: 00000000    99 FUNC    GLOBAL DEFAULT  UND PyErr_SetString
    36: 00000000   947 FUNC    GLOBAL DEFAULT  UND adler32
    37: 00000000   247 FUNC    WEAK   DEFAULT  UND __cxa_finalize@GLIBC_2.1.3 (3)
    38: 00000000   422 FUNC    GLOBAL DEFAULT  UND inflateCopy
    39: 00000000   172 FUNC    GLOBAL DEFAULT  UND PyThread_acquire_lock
    40: 00000e80   587 FUNC    GLOBAL DEFAULT   11 initzlib
    41: 00004eec     0 NOTYPE  GLOBAL DEFAULT  ABS _end
    42: 00004ee0     0 NOTYPE  GLOBAL DEFAULT  ABS _edata
    43: 00004ee0     0 NOTYPE  GLOBAL DEFAULT  ABS __bss_start
    44: 00000b70     0 FUNC    GLOBAL DEFAULT    9 _init
    45: 00002ac4     0 FUNC    GLOBAL DEFAULT   12 _fini

the symbol is here so wth is happening here ???

# emerge --info
Portage 2.1.3.12 (default-linux/x86/2007.0/desktop, gcc-4.2.1, glibc-2.6.1-r0, 2.6.22-gentoo-r8 i686)
=================================================================
System uname: 2.6.22-gentoo-r8 i686 Pentium III (Katmai)
Timestamp of tree: Sat, 13 Oct 2007 10:50:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.1
dev-lang/python:     2.5.1-r2
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0_rc4-r1
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10-r2
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium3 -mfpmath=sse -g -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=pentium3 -mfpmath=sse -g -pipe"
DISTDIR="/var/tmp/distfiles"
FEATURES="distcc distlocks metadata-transfer sandbox sfperms sign splitdebug strict unmerge-orphans userfetch usersandbox"
GENTOO_MIRRORS="http://85.25.128.62 http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://pandemonium.tiscali.de/pub/gentoo/"
LANG="fr_FR.UTF-8"
LC_ALL="fr_FR.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en fr ja zh zh_CN"
MAKEOPTS="-j6"
PKGDIR="/var/tmp/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync-exlude"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/gnome-experimental /usr/portage/local/layman/voip /usr/portage/local/layman/sunrise /home/eva/devel/gnome-experimental /home/eva/devel/gentoo-misc"
SYNC="rsync://shinobu/gentoo-portage"
USE="X a52 aalib acl acpi alsa applet avahi bash-completion bitmap-fonts bonjour bzip2 cairo caps cdr cjk cli cracklib crypt cups daap dbus dri dvd dvdr dvdread eds emboss encode esd evo exif fam fbcon ffmpeg fftw flac foomaticdb freewnn galago gif glitz glx gnome gnutls gphoto2 gpm gstreamer gtk gtkhtml h264 hal iconv ipv6 isdnlog jabber jpeg keyring lcms ldap libgda libnotify libsexy logrotate mad matroska midi mmx mng mono mp3 mpeg msn mudflap musicbrainz ncurses nfs nls nntp nptl nptlonly nsplugin ogg openct opengl openmp pam pcre pdf perl png ppds pppd python qt3support quicktime readline reflection samba sasl sdl session smp spell spl sqlite sqlite3 sse ssl svg tcpd theora threads tiff tracker truetype truetype-fonts type1-fonts unicode usb v4l v4l2 vim-syntax vorbis win32codecs x264 x86 xattr xcb xinerama xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" CAMERAS="canon ptp2" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en fr ja zh zh_CN" USERLAND="GNU" VIDEO_CARDS="vesa radeon r200"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS


I'd be really really glad to know what is broken in my setup. Thanks in advance.
Comment 1 Gilles Dartiguelongue (RETIRED) gentoo-dev 2007-10-13 23:42:58 UTC
a few more informations:

the ebuild passes tests for this module (python-2.5) and the test works with python-2.4.4-r5
Comment 2 Gilles Dartiguelongue (RETIRED) gentoo-dev 2007-10-26 10:39:51 UTC
Hi guys,

did more tests and strace today to finaly find out what was wrong. There were stale files on my system :

lrwxrwxrwx 1 root root    13 jui  9  2004 /usr/lib/libz.so.1 -> libz.so.1.1.4
-rwxr-xr-x 1 root root 54416 avr 12  2004 /usr/lib/libz.so.1.1.4

Don't exactly know why they where still there, probably a leftover from a Ctrl+C of portage in a cleaning phase. The problem was that python tried to open /usr/lib/libz.so.1 _before_ /lib/libz.so.1.

For some reason, I don't have /lib in any LDPATH defined in /etc/env.d on this box. This is not the only box with this "error", but it's the only having old libz in /usr/lib so I guess it explains it all.