Opened 11 years ago

Closed 11 years ago

#39357 closed defect (duplicate)

python27 @2.7.5 has bad LINKFORSHARED sysconfig

Reported by: wichert@… Owned by: jyrkiwahlstedt
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc: cooljeanius (Eric Gallager)
Port: python27

Description

After doing a port upgrade and getting the latest python27 port autoconf is now breaking on python tests. This is caused by autoconf picking up the linker options from python itself:

>>> import distutils.sysconfig
>>> distutils.sysconfig.get_config_var('LINKFORSHARED')
'-u _PyMac_Error Python.framework/Versions/2.7/Python'

Which shows an incomplete path is used, which causes the autoconf test to fail like this:

clang -o conftest -g  -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7  conftest.c  -L/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config -lpython2.7 -u _PyMac_Error Python.framework/Versions/2.7/Python  -ldl  -framework CoreFoundation
clang: error: no such file or directory: 'Python.framework/Versions/2.7/Python'

Change History (5)

comment:1 Changed 11 years ago by wichert@…

This appears to be due to a change in python itself: in python 2.7.3 distutils.sysconfig._init_posix use to parse /python2.7/config/Makefile, but that was changed to read lib/python2.7/_sysconfigdata.py instead. This suggest a workaround is to do the same replace trick for that file as well.

Version 0, edited 11 years ago by wichert@… (next)

comment:2 Changed 11 years ago by larryv (Lawrence Velázquez)

Owner: changed from macports-tickets@… to jwa@…
Summary: python27 2.7.5 has bad LINKFORSHARED sysconfigpython27 @2.7.5 has bad LINKFORSHARED sysconfig

Thanks for the ticket. In the future, please Cc relevant port maintainers.

Looks like #39337 was caused by this.

comment:3 Changed 11 years ago by ned-deily (Ned Deily)

See also #39223: other apps should not be using Python's LINKEDFORSHARED.

comment:4 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:5 in reply to:  3 Changed 11 years ago by larryv (Lawrence Velázquez)

Resolution: duplicate
Status: newclosed

Replying to nad@…:

See also #39223: other apps should not be using Python's LINKEDFORSHARED.

Guess this is a duplicate of that.

Note: See TracTickets for help on using tickets.