Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 404505

Summary: Python 2.7.2 uses C99 'round' symbol
Product: Gentoo/Alt Reporter: Richard Yao (RETIRED) <ryao>
Component: Prefix SupportAssignee: Gentoo Prefix <prefix>
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: Sparc64   
OS: Solaris   
Package list:
Runtime testing required: ---

Description Richard Yao (RETIRED) gentoo-dev 2012-02-19 11:25:35 UTC
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 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:

The exact failure message from the bootstrap process is:

*** WARNING: renaming "math" since importing it failed: python: fatal: relocation error: file build/lib.solaris-2.9-sun4u-2.7/ symbol round: referenced symbol not found

There is a patch available for this issue at the upstream bug tracker:
Comment 1 Richard Yao (RETIRED) gentoo-dev 2012-02-19 11:34:29 UTC
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 - "" | 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.
Comment 2 Richard Yao (RETIRED) gentoo-dev 2012-02-19 11:54:57 UTC
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
Comment 3 Fabian Groffen gentoo-dev 2012-02-19 12:04:08 UTC
yeah, so seems a bit more viable approach
Comment 4 Richard Yao (RETIRED) gentoo-dev 2012-02-20 22:51:39 UTC
(In reply to comment #3)
> yeah, so seems a bit more viable
> approach

I tried that approach and it did not appear to work. :/
Comment 5 Fabian Groffen gentoo-dev 2012-02-21 07:41:46 UTC
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
Comment 6 Fabian Groffen gentoo-dev 2014-01-13 21:12:22 UTC
this should be fixed in latest pythons now