Closed Bug 788705 Opened 12 years ago Closed 12 years ago

Bareword "Python.framework/Versions/2.7/Python" in |python-config --ldflags| in OS X Python

Categories

(Release Engineering :: General, defect)

All
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: gps, Unassigned)

Details

While trying to get Python C extensions to compile on buildbot machines for bug 783727, I noticed something peculiar. The output from:

  /tools/python/bin/python2.7-config --ldflags

is

  -L/tools/python-2.7.2/Python.framework/Versions/2.7/lib/python2.7/config -ldl -framework CoreFoundation -lpython2.7 -u _PyMac_Error Python.framework/Versions/2.7/Python

The last argument - "Python.framework/Versions/2.7/Python" - is weird. It's just a bareword argument. You are supposed to be able to use the output of --ldflags verbatim as linker arguments. But, without a flag, "Python.framework/Versions/2.7/Python" is treated as input to the linker, which is wrong.

Looking at the source of python-config, I traced this flag down to presence in the LINKFORSHARED variable. If you dump all the variables from sysconfig.get_config_vars(), you see:
 
  'LINKFORSHARED': '-u _PyMac_Error Python.framework/Versions/2.7/Python',

My guess is this snuck in when the Python package was built. I think this is a bug in the process that builds the Python packages for OS X builders.

Anyway, I can probably work around this in configure by reimplementing python-config logic (it's pretty simple, actually). But, I would much prefer if the Python package on the builders worked properly.
We decided in bug 783727 that we're not going to use python-config. So, this isn't an issue... for now.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
Product: mozilla.org → Release Engineering
You need to log in before you can comment on or make changes to this bug.