[CMake] CMake 2.8 FindPythonLibs.cmake broken for default python2.5 install

Marcus D. Hanwell marcus.hanwell at kitware.com
Mon Nov 23 10:38:27 EST 2009


On Monday 23 November 2009 10:03:35 Mark Moll wrote:
> Between cmake 2.6.4 and cmake 2.8 the following lines were removed from the
>  FIND_LIBRARY(PYTHON_LIBRARY ...) command in FindPythonLibs.cmake:
> 
> -    PATH_SUFFIXES
> -      python${_CURRENT_VERSION}/config
> 
> I don’t understand why this was done, because this is where python
>  libraries are found with the default settings. How do I make cmake find
>  the python library now?
> 
What Linux distribution is this on? I tested these changes on quite a few 
different distributions and the shared object in 
python${_CURRENT_VERSION}/config was a symlink to python${_CURRENT_VERSION}.so 
in the /usr/lib directory. Does your installation not have 
/usr/lib[64]/libpython2.5.so?

Quite a few Linux distributions do not have the symlink in 
python${_CURRENT_VERSION}/config, whereas all the ones I came across had it in 
/usr/lib. So this would lead to link errors as only the static lib would be 
found, and that cannot be used on x86_64 for example.

If you could provide more details then I will look into this further (I 
committed the change in response to a bug report, and numerous reports I had 
from users who had trouble linking to Python on 64 bit platforms).

Marcus
-- 
Marcus D. Hanwell, Ph.D.
R&D Engineer, Kitware Inc.
(518) 881-4937


More information about the CMake mailing list