Message131106
Example of faulting build: http://www.python.org/dev/buildbot/all/builders/AMD64%20OpenIndiana%203.1/builds/297
Problem: "test_distutils.py" tests the generation of shared libraries. It correctly compile the ".c" to ".o" as 64 bits, but when linking the resulting file object, it tries to link in 32 bits mode, failing miserably.
Manually adding:
"""
--- a/Lib/distutils/unixccompiler.py Wed Mar 16 12:48:54 2011 +0200
+++ b/Lib/distutils/unixccompiler.py Wed Mar 16 12:14:37 2011 +0000
@@ -251,6 +252,8 @@
if sys.platform == 'darwin':
linker = _darwin_compiler_fixup(linker, ld_args)
+ print("*****************", repr(linker + ld_args))
+ ld_args = ["-m64"]+ld_args
self.spawn(linker + ld_args)
except DistutilsExecError as msg:
raise LinkError(msg)
"""
solves the issue.
Notes:
- Python is compiled with this configuration:
./configure --with-pydebug --with-computed-gotos "CFLAGS=-I/usr/local/include/ncursesw -m64" LDFLAGS=-m64
- "test_distutils.py" compilation step works OK, and obey CFLAGS. The command line used is "['gcc', '-I/usr/local/include/ncursesw', '-m64', '-g', '-Wall', '-Wstrict-prototypes', '-fPIC', '-IInclude', '-I/tmp/z/3.1', '-c', '/tmp/tmp8M7aOH/xxmodule.c', '-o', '/tmp/tmp8M7aOH/tmp/tmp8M7aOH/xxmodule.o']".
- "test_distutils.py" linking steps fails. The command line used is "'gcc', '-shared', '/tmp/tmp8M7aOH/tmp/tmp8M7aOH/xxmodule.o', '-o', '/tmp/tmp8M7aOH/xx.so'". It doesn't include the "LDFLAGS" parameter we want.
- Modifying the source code to add a "-m64" to the linking step solved the issue.
- Python 2.7, 3.2 and 3.x works ok. |
|
Date |
User |
Action |
Args |
2011-03-16 12:22:51 | jcea | set | recipients:
+ jcea |
2011-03-16 12:22:51 | jcea | set | messageid: <1300278171.06.0.772927158799.issue11570@psf.upfronthosting.co.za> |
2011-03-16 12:22:50 | jcea | link | issue11570 messages |
2011-03-16 12:22:49 | jcea | create | |
|