[issue13901] test_get_outputs (test_distutils) failure with --enable-shared on Mac OS X

Ned Deily report at bugs.python.org
Mon Jan 30 02:58:52 CET 2012


Ned Deily <nad at acm.org> added the comment:

On OS X, the linker includes in executables the absolute path to referenced shared libraries and normally --enable-shared builds are only usable from their installed location, i.e. after doing 'make install'.  RUNSHARED is defined as it is on OS X so that during the build of the standard library, the newly built interpreter uses its shared library before being installed.  After a 'make install', RUNSHARED should not be used on OS X; the shared library will always be found via the absolute path linked in the executable.  So I think the right solution for the problem here is to bypass the fixup code, so something like this (note the current 2.7.x is now similar to 3.2.x and differs from 2.7.2):


diff --git a/Lib/distutils/tests/support.py b/Lib/distutils/tests/support.py
--- a/Lib/distutils/tests/support.py
+++ b/Lib/distutils/tests/support.py
@@ -211,5 +211,8 @@
         if runshared is None:
             cmd.library_dirs = ['.']
         else:
-            name, equals, value = runshared.partition('=')
-            cmd.library_dirs = value.split(os.pathsep)
+            if sys.platform == 'darwin':
+                cmd.library_dirs = []
+            else:
+                name, equals, value = runshared.partition('=')
+                cmd.library_dirs = value.split(os.pathsep)

----------
nosy: +ned.deily, ronaldoussoren
versions: +Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13901>
_______________________________________


More information about the Python-bugs-list mailing list