Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 404505 - Python 2.7.2 uses C99 'round' symbol
Summary: Python 2.7.2 uses C99 'round' symbol
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: Sparc64 Solaris
: Normal normal (vote)
Assignee: Gentoo Prefix
URL: http://bugs.python.org/issue9742
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-19 11:25 UTC by Richard Yao (RETIRED)
Modified: 2014-01-13 21:12 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 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 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
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 - "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.
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 http://bugs.python.org/issue9742#msg134222 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 http://bugs.python.org/issue9742#msg134222 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