[MacPorts] #39223: incorrect flags from distutils when linking against python27 @2.7.5_0
MacPorts
noreply at macports.org
Fri May 24 09:23:42 PDT 2013
#39223: incorrect flags from distutils when linking against python27 @2.7.5_0
--------------------+----------------------
Reporter: ram@… | Owner: jwa@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.1.3
Keywords: | Port: python27
--------------------+----------------------
I've been having some problems build some software against python27
@2.7.5_0:
{{{
checking for a Python interpreter with version >= 2.6... python
checking for python... /opt/local/bin/python
checking for python version... 2.7
checking for python platform... darwin
checking for python script directory... ${prefix}/lib/python2.7/site-
packages
checking for python extension module directory...
${exec_prefix}/lib/python2.7/site-packages
checking for python2.7... (cached) /opt/local/bin/python
checking for a version of Python >= '2.1.0'... yes
checking for the distutils Python package... yes
checking for Python include path...
-I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
checking for Python library path...
-L/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config
-lpython2.7
checking for Python site-packages path...
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
/site-packages
checking python extra libraries... -ldl -framework CoreFoundation
checking python extra linking flags... -u _PyMac_Error
Python.framework/Versions/2.7/Python
checking consistency of all components of python development
environment... no
configure: error: in `/Users/ram/git/lalsuite/lalburst':
configure: error:
Could not link test program to Python. Maybe the main Python library has
been
installed in some non-standard library path. If so, pass it to
configure,
via the LDFLAGS environment variable.
Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"
============================================================================
ERROR!
You probably have to install the development version of the Python
package
for your distribution. The exact name of this package varies among
them.
============================================================================
See `config.log' for more details
}}}
This seems to be due to distutils reporting incorrectly the flags required
to link against python. With @2.7.5_0:
{{{
Python 2.7.5 (default, May 24 2013, 11:10:07)
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import distutils.sysconfig
>>> conf = distutils.sysconfig.get_config_var
>>> print (conf('LINKFORSHARED'))
-u _PyMac_Error Python.framework/Versions/2.7/Python
>>>
}}}
i.e. it looks like the path is incomplete. Whereas if I revert back to
@2.7.3_1 I get what I would expect:
{{{
Python 2.7.3 (default, Nov 26 2012, 15:06:55)
[GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))] on
darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import distutils.sysconfig
>>> conf = distutils.sysconfig.get_config_var
>>> print (conf('LINKFORSHARED'))
-u _PyMac_Error
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Python
>>>
}}}
--
Ticket URL: <https://trac.macports.org/ticket/39223>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list