Python 2.7.2 uses the C99 'round' symbol in its math module. Portage relies on the math module, which makes it impossible to hack the bootstrap-prefix.sh script in a way that enables the bootstrap process to succeed on Solaris 9 and earlier. There is an explanation of this at the following page: https://forums.oracle.com/forums/thread.jspa?threadID=1920897 The exact failure message from the bootstrap process is: *** WARNING: renaming "math" since importing it failed: ld.so.1: python: fatal: relocation error: file build/lib.solaris-2.9-sun4u-2.7/math.so: symbol round: referenced symbol not found There is a patch available for this issue at the upstream bug tracker: http://bugs.python.org/issue9742
Actually, I was wrong about not being able to hack around it. Adding the following line before the configure script is executed will fix the math module failure: wget -O - "http://bugs.python.org/file20339/Python-2.7.patch" | patch -p1 -d ${S} || exit 1 With that said, there are also failures in _multiprocessing binascii zlib, but I appended them to PYTHON_DISABLE_MODULES to try to get the initial phase of the bootstrap process working.
Actually, ignore what I said. That patch depends on GNU ld, which does not fix this issue: /usr/local/bin/gcc -o python \ Modules/python.o \ -Wl,--whole-archive libpython2.7.a -Wl,--no-whole-archive \ -lresolv -lsocket -lnsl -lrt -ldl -lpthread -lm /usr/ccs/bin/ld: illegal option -- - /usr/ccs/bin/ld: illegal option -- w /usr/ccs/bin/ld: illegal option -- - /usr/ccs/bin/ld: illegal option -- n ld: warning: option -o appears more than once, first setting taken usage: ld
yeah, so http://bugs.python.org/issue9742#msg134222 seems a bit more viable approach
(In reply to comment #3) > yeah, so http://bugs.python.org/issue9742#msg134222 seems a bit more viable > approach I tried that approach and it did not appear to work. :/
hmmm, ok, so we need to figure out why the math symbols aren't referenced you mention you disabled zlib as well, that's going to cause trouble afterwards IIRC
this should be fixed in latest pythons now