New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lib/test/test_distutils.py tries to mix 32 and 64 bits object files, doesn't obey LDFLAGS #55779
Comments
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:
|
This patch is hacky, but 3.1 is in maintenance mode. This patch should be safe. It only touch SunOS compilation. It passes the testsuite, and it should allow 64 bit compilation of extension packages. This patch is not needed in 3.2 and 3.x. It only affects 3.1. The patch: """
diff -r f2ac5bbc1623 configure.in
--- a/configure.in Wed Mar 16 12:48:54 2011 +0200
+++ b/configure.in Wed Mar 16 14:10:53 2011 +0000
@@ -1758,8 +1758,8 @@
IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
SunOS/5*)
if test "$GCC" = "yes"
- then LDSHARED='$(CC) -shared'
- else LDSHARED='$(CC) -G';
+ then LDSHARED='$(CC) -shared $(LDFLAGS)'
+ else LDSHARED='$(CC) -G $(LDFLAGS)';
fi ;;
hp*|HP*)
if test "$GCC" = "yes"
""" Please, review. If everything is OK, I will commit the patch myself. |
Benjamin, could you possibly accept this for 3.1?. It solves a buildbot issue that cold mask othe problems. It seems pretty trivial and safe. If you approve, I will commit the patch myself. Thanks. |
That should be okay. 3.1 is still open for normal bugfixes. 2011/3/16 Jesús Cea Avión <report@bugs.python.org>:
|
New changeset d108a7dff2a0 by Jesus Cea in branch '3.1': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: