[CMake] FindPythonLibs
James Bigler
bigler at cs.utah.edu
Wed Feb 22 15:36:14 EST 2006
> CMake should prefer the shared versions of libraries. Is there a:
>
> /usr/lib/python2.4/config/libpython2.4.so on your machine?
No. I'm using Suse 9.3, GCC 3.3.5, CMake 2.2-patch 3, SWIG version
1.3.21, and python 2.4.
ls -l /usr/lib/python2.4/config/
total 1682
-rw-r--r-- 1 root root 4952 2005-03-22 14:51 ccpython.o
-rw-r--r-- 1 root root 1777 2005-03-22 14:51 config.c
-rw-r--r-- 1 root root 1191 2005-03-22 14:51 config.c.in
-rwxr-xr-x 1 root root 7122 2005-03-22 14:51 install-sh*
-rw-r--r-- 1 root root 1550468 2005-03-22 14:51 libpython2.4.a
-rw-r--r-- 1 root root 35789 2005-03-22 14:51 Makefile
-rw-r--r-- 1 root root 32934 2005-03-22 14:51 Makefile.pre
-rw-r--r-- 1 root root 32455 2005-03-22 14:51 Makefile.pre.in
-rwxr-xr-x 1 root root 7430 2005-03-22 14:51 makesetup*
-rw-r--r-- 1 root root 17394 2005-03-22 14:51 Setup
-rw-r--r-- 1 root root 368 2005-03-22 14:51 Setup.config
-rw-r--r-- 1 root root 41 2005-03-22 14:51 Setup.local
> Since CMake uses -L, I am thinking there must not be a linkable .so in
> the same directory as the .a. Where is your shared version of python located?
ls -l /usr/lib/libpython2.4.so*
lrwxrwxrwx 1 root root 19 2006-01-13 12:18
/usr/lib/libpython2.4.so -> libpython2.4.so.1.0
-rw-r--r-- 1 root root 1134954 2005-03-22 14:51
/usr/lib/libpython2.4.so.1.0
If you look in FindPythonLibs.cmake you can see that contfig is searched
before /usr/lib or /usr/local/lib:
FIND_LIBRARY(PYTHON_LIBRARY
NAMES python24 python2.4 python2.4.dll
python23 python2.3 python2.3.dll
python22 python2.2 python2.2.dll
python21 python2.1 python2.1.dll
python20 python2.0 python2.0.dll
python16 python1.6 python1.6.dll
python15 python1.5 python1.5.dll
PATHS
/usr/lib/python2.4/config
/usr/lib/python2.3/config
/usr/lib/python2.2/config
/usr/lib/python2.1/config
/usr/lib/python2.0/config
/usr/lib/python1.6/config
/usr/lib/python1.5/config
/usr/lib
/usr/local/lib
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]/libs
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]/libs
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.2\\InstallPath]/libs
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.1\\InstallPath]/libs
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.0\\InstallPath]/libs
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\1.6\\InstallPath]/libs
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\1.5\\InstallPath]/libs
)
Thanks,
James
More information about the CMake
mailing list