The following is a copy of my bug-report at bug #79877. Python 2.4 has problems with my setup. I guess it is related to having the machine in question run on hardened. The errors I get are the following: root@baldurs-gate bin # python2.4 Python 2.4 (#1, Mar 2 2005, 09:30:31) [GCC 3.3.5 (Gentoo Linux 3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import cPickle Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: /usr/lib/python2.4/lib-dynload/cPickle.so: undefined symbol: PyUnicodeUCS4_AsUTF8String I've not seen this error mentioned anywhere on bugs.gentoo.org, and the symbol which cPickle complains about is present in /usr/lib/libpython2.4.so.1.0 and also used by other lib-dynload libraries, and they work. I'll try and investigate what the problem actually is; rebooting the machine, ldconfig and env-update haven't helped, and I've checked that python2.4's sys.path is correctly referring to /usr/lib/python2.4/lib-dynload/cPickle.so. emerge info: Portage 2.0.51.19 (default-linux/x86/2004.3, gcc-3.3.5, glibc-2.3.4.20041102-r1, 2.6.11-mm4 i686) ================================================================= System uname: 2.6.11-mm4 i686 Pentium III (Coppermine) Gentoo Base System version 1.4.16 Python: dev-lang/python-2.4-r3,dev-lang/python-2.3.4-r1 [2.3.4 (#1, Mar 21 2005, 06:42:58)] dev-lang/python: 2.4-r3, 2.3.4-r1 sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4 sys-devel/binutils: 2.15.92.0.2-r1 sys-devel/libtool: 1.5.10-r4 virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms" GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror" LANG="de_DE@euro" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" USE="x86 X acl apache2 apm arts avi berkdb bitmap-fonts crypt cups curl dhcp doc emboss encode esd fam flash font-server foomaticdb fortran gd gdbm gif gmp gpm gtk gtk2 hardened imap imlib innodb ipv6 java jpeg ldap libg++ libwww mad maildir mcal mikmod mmx motif mozilla mp3 mpeg mysql ncurses nls nptl oggvorbis oss pam pdflib perl php pic pie png python quicktime readline sasl sdl socks5 spell sse ssl svga tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts xml2 xmms zlib" Unset: ASFLAGS, CBUILD, CTARGET, LC_ALL, LDFLAGS, PORTDIR_OVERLAY Python is unmaked using the following settings: root@baldurs-gate bin # cat /etc/portage/package.unmask # Unmask Python 2.4 >=dev-lang/python-2.4 >=dev-python/python-docs-2.4 root@baldurs-gate bin # cat /etc/portage/package.keywords # Make sure Python comes from ~x86, so that we get 2.4. dev-lang/python ~x86 dev-python/python-docs ~x86 emerge bombs out when the symlink at /usr/bin/python points to 2.4, so the above results of emerge info are seen after I've relinked python2.3 to python. Python is not built using USE="ucs2", and this is a clean slate installation from stage2 (rebuilt for hardened with an emerge -ev world) which has only been done two weeks ago; Python 2.4 has never been installed on this computer before. Python was built using the following options: root@baldurs-gate modelnine # emerge -pv python These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild R ] dev-lang/python-2.4-r3 +X +berkdb -bootstrap -build -debug +doc +gdbm +ipv6 +ncurses +readline +ssl +tcltk -ucs2 0 kB Total size of downloads: 0 kB Reproducible: Always Steps to Reproduce: 1. install clean stage2 of 2004.3 2. setup CFLAGS and USE flags according to the above bugreport 3. emerge -ev world 4. unmask Python 2.4 5. install Python 2.4 Actual Results: Python 2.4 is unable to load the dynamic library cPickle, and thus all python scripts requiring this library are too (which means that emerge doesn't function anymore). Expected Results: Python 2.4 should have installed correctly (which it actually did), and run correctly now. See above.
I'll have console access to the machine in question tomorrow; this means that I'll have a closer look at why loading cPickle.so fails then. If this turns out to be a hardened problem, I'd propose to remove the block for bug 79877...
Please use the 2005.0 hardened stages on from your local mirror.
I'm trying to mark this bug as invalid (but I can't login to my account from univ), as I found another Python 2.4 to be installed in /usr/local, which was causing this bug. The Python in /usr/local seems to have been built by another admin, and was compiled using UCS2, which means that python2.4 (the executable) was using a library version which was incompatible with UCS4 (and thus incompatible with the dynamic libs of Gentoo Python). It just seems strange that /usr/local/lib comes before /usr/lib on the search path, as ldconfig also displayed /usr/lib/libpython2.4.so.1.0 as the dynamic library to be used by ld.so, whereas the dynamic library from /usr/local wasn't using /usr/local/lib/python2.4 as the library search path, but /usr/lib/python2.4. Well, anyway, the bug's gone by removing all python2.4 related stuff from /usr/local, so please somebody mark this as invalid and remove the blocker for bug 79877.
Thanks Heiko, closing as Invalid.