Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 86950 - Python 2.4 builds okay on 2004.3 based x86 hardened system, but cPickle.so module fails to import with unknown symbol.
Summary: Python 2.4 builds okay on 2004.3 based x86 hardened system, but cPickle.so mo...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High blocker (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 79877
  Show dependency tree
 
Reported: 2005-03-28 02:02 UTC by Heiko Wundram
Modified: 2005-03-29 07:09 UTC (History)
1 user (show)

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 Heiko Wundram 2005-03-28 02:02:39 UTC
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.
Comment 1 Heiko Wundram 2005-03-28 02:06:22 UTC
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...
Comment 2 solar (RETIRED) gentoo-dev 2005-03-28 12:32:36 UTC
Please use the 2005.0 hardened stages on from your local mirror.
Comment 3 Heiko Wundram (University) 2005-03-28 23:04:45 UTC
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.
Comment 4 Rob Cakebread (RETIRED) gentoo-dev 2005-03-29 07:09:31 UTC
Thanks Heiko, closing as Invalid.