[CMake] Problem embedding Python in C
Ángel Alonso
feler at archlinux.us
Wed Jun 10 00:52:52 EDT 2009
Hi,
I'm using cmake for a project that embed Python in C.
For include the Python libs i use: include(FindPythonLibs)
But compiling, I get this errors:
/usr/lib/python2.6/config/libpython2.6.a(posixmodule.o): In function
`posix_tmpnam':
(.text+0x8f4): warning: the use of `tmpnam_r' is dangerous, better use
`mkstemp'
/usr/lib/python2.6/config/libpython2.6.a(posixmodule.o): In function
`posix_tempnam':
(.text+0xa04): warning: the use of `tempnam' is dangerous, better use
`mkstemp'
/usr/lib/python2.6/config/libpython2.6.a(thread.o): In function
`PyThread_set_stacksize':
(.text+0xbc): undefined reference to `pthread_attr_setstacksize'
/usr/lib/python2.6/config/libpython2.6.a(thread.o): In function
`PyThread_release_lock':
(.text+0xf9): undefined reference to `sem_post'
/usr/lib/python2.6/config/libpython2.6.a(thread.o): In function
`PyThread_acquire_lock':
(.text+0x149): undefined reference to `sem_trywait'
/usr/lib/python2.6/config/libpython2.6.a(thread.o): In function
`PyThread_acquire_lock':
(.text+0x19c): undefined reference to `sem_wait'
/usr/lib/python2.6/config/libpython2.6.a(thread.o): In function
`PyThread_free_lock':
(.text+0x282): undefined reference to `sem_destroy'
/usr/lib/python2.6/config/libpython2.6.a(thread.o): In function
`PyThread_allocate_lock':
(.text+0x2f7): undefined reference to `sem_init'
/usr/lib/python2.6/config/libpython2.6.a(thread.o): In function
`PyThread_start_new_thread':
(.text+0x685): undefined reference to `pthread_attr_setstacksize'
/usr/lib/python2.6/config/libpython2.6.a(thread.o): In function
`PyThread_start_new_thread':
(.text+0x6b6): undefined reference to `pthread_create'
/usr/lib/python2.6/config/libpython2.6.a(thread.o): In function
`PyThread_start_new_thread':
(.text+0x6f7): undefined reference to `pthread_detach'
/usr/lib/python2.6/config/libpython2.6.a(posixmodule.o): In function
`posix_forkpty':
(.text+0x32f9): undefined reference to `forkpty'
/usr/lib/python2.6/config/libpython2.6.a(posixmodule.o): In function
`posix_openpty':
(.text+0x3388): undefined reference to `openpty'
collect2: ld devolvió el estado de salida 1
I also try include(FindThreads) but the problem persist.
I think that is a problem of cmake, because in other tests that I made
(with a simple Makefile, not cmake) it works.
Cheers
More information about the CMake
mailing list