[Pythonmac-SIG] Compiling libhid with python support : configure can't link to test program

Gabriel Rossetti gabriel.rossetti at arimaz.com
Wed Sep 9 16:18:45 CEST 2009


Gabriel Rossetti wrote:
> Hello everyone,
>
> I would like to compile libhid (because I couldn't find it already 
> compiled) on mac os x 10.5.x. When I run configure it dies saying it 
> can't link against my python lib and that it may be installed in an 
> alternative location or that I need to install a dev version of 
> python. I'm using the version shipped with 10.5, does anyone know how 
> to fix this?
>
> Thank you,
> Gabriel
>

Here's some more info, it does this :

Compiled with g++ [i686-apple-darwin9.0]
Please see http://www.swig.org for reporting bugs and further information
checking for python... /usr/bin/python
checking for python version... 2.5
checking for python platform... darwin
checking for python script directory... /Library/Python/2.5/site-packages
checking for python extension module directory... /Library/Python/2.5/site-packages
checking for python2.5... (cached) /usr/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/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5
checking for Python library path... /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config/Python.framework/Versions/2.5/Python
checking for Python site-packages path... /Library/Python/2.5/site-packages
checking python extra libraries...  -ldl
checking python extra linking flags... -u _PyMac_Error -framework Python
checking consistency of all components of python development environment... no
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.
  ============================================================================


I looked at this line :

checking for Python library path... /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config/Python.framework/Versions/2.5/Python

and that path doesn't exist, this one does though :

/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config/

and inside there is libpython2.5.a which is the static python lib, I tried doing as it said :

./configure LDFLAGS="-L/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config/"

with no luck though. 

Thank you,
Gabriel




More information about the Pythonmac-SIG mailing list