[issue18235] _sysconfigdata.py wrong on AIX installations

Michael Felt report at bugs.python.org
Mon Jan 23 09:50:18 EST 2017


Michael Felt added the comment:

This is "only" for Python-2.7 (for now). The others will be tested as I am able.

Working with the patch submitted 2013-10-19 (aka https://bugs.python.org/file32229/issue18235.patch)

A) Without/before the patch:

root at x064:[/data/prj/python/Python-2.7.13.0]grep LDSHARED ./build/lib.aix-5.3-2.7/_sysconfigdata.py
 'BLDSHARED': 'Modules/ld_so_aix xlc_r -bI:Modules/python.exp',
 'LDSHARED': 'Modules/ld_so_aix xlc_r -bI:Modules/python.exp',

B) Apply the patch:
diff -r 0a26ef834a49 Lib/sysconfig.py
--- a/Lib/sysconfig.py	Sat Oct 19 14:24:44 2013 +0200
+++ b/Lib/sysconfig.py	Sat Oct 19 11:46:10 2013 -0700
@@ -368,7 +368,7 @@
     # -- these paths are relative to the Python source, but when installed
     # the scripts are in another directory.
     if _PYTHON_BUILD:
-        vars['LDSHARED'] = vars['BLDSHARED']
+        vars['BLDSHARED'] = vars['LDSHARED']

After the patch:

root at x064:[/data/prj/python/Python-2.7.13.0]grep LDSHARED ./build/lib.aix-5.3-2.7/_sysconfigdata.py
 'BLDSHARED': '/opt/lib/python2.7/config/ld_so_aix xlc_r -bI:/opt/lib/python2.7/config/python.exp',
 'LDSHARED': '/opt/lib/python2.7/config/ld_so_aix xlc_r -bI:/opt/lib/python2.7/config/python.exp',

Which makes me think - maybe NOTHING is needed - as 'BLDSHARED' should be Modules/ld_so_aix,
while  'LDSHARED' should be '/opt/lib/python2.7/config/ld_so_aix

Rather than actual deletes: commented out to (after patch was applied)

C: if: statement and assignment - commented out
diff -ru Python-2.7.13/Lib/sysconfig.py Python-2.7.13.0/Lib/sysconfig.py
--- Python-2.7.13/Lib/sysconfig.py      2016-12-17 20:05:06 +0000
+++ Python-2.7.13.0/Lib/sysconfig.py    2017-01-23 14:39:31 +0000
@@ -310,8 +310,8 @@
     # On AIX, there are wrong paths to the linker scripts in the Makefile
     # -- these paths are relative to the Python source, but when installed
     # the scripts are in another directory.
-    if _PYTHON_BUILD:
-        vars['LDSHARED'] = vars['BLDSHARED']
+#    if _PYTHON_BUILD:
+#        vars['BLDSHARED'] = vars['LDSHARED']

root at x064:[/data/prj/python/Python-2.7.13.0]grep LDSHARED ./build/lib.aix-5.3-2.7/_sysconfigdata.py
 'BLDSHARED': 'Modules/ld_so_aix xlc_r -bI:Modules/python.exp',
 'LDSHARED': '/opt/lib/python2.7/config/ld_so_aix xlc_r -bI:/opt/lib/python2.7/config/python.exp',
root at x064:[/data/prj/python/Python-2.7.13.0]

So, perhaps the best patch 'today', versus what may have been best in 2013 - is to remove the 5 lines starting with # On AIX, ...

----------

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


More information about the Python-bugs-list mailing list