Problems building a Python module

Rolf Wester wester at ilt.fhg.de
Tue Jul 9 09:47:39 EDT 2002


Hi,

I want to build a Python module from C-files. I made the wrapper file
using swig. During linking I get the following message:

/usr/lib/python2.2/config/libpython2.2.a(posixmodule.o): In function 
`posix_tmpnam':
posixmodule.o(.text+0x3614): the use of `tmpnam_r' is dangerous, better 
use `mkstemp'
/usr/lib/python2.2/config/libpython2.2.a(posixmodule.o): In function 
`posix_tempnam':
posixmodule.o(.text+0x3520): the use of `tempnam' is dangerous, better 
use `mkstemp'
/usr/lib/python2.2/config/libpython2.2.a(thread.o): In function 
`PyThread_start_new_thread':
thread.o(.text+0x7f): undefined reference to `pthread_sigmask'
thread.o(.text+0x98): undefined reference to `pthread_create'
thread.o(.text+0xa7): undefined reference to `pthread_sigmask'
thread.o(.text+0xbd): undefined reference to `pthread_detach'
/usr/lib/python2.2/config/libpython2.2.a(posixmodule.o): In function 
`posix_openpty':
posixmodule.o(.text+0x1706): undefined reference to `openpty'
/usr/lib/python2.2/config/libpython2.2.a(posixmodule.o): In function 
`posix_forkpty':
posixmodule.o(.text+0x177c): undefined reference to `forkpty'
make: *** [opt] Fehler 1


I link against following libraries:

-lpython2.2 -lm -ldl

Can someone tell me what other libraries I have to link against? And
what means:

posixmodule.o(.text+0x3614): the use of `tmpnam_r' is dangerous, better 
use `mkstemp'

I would be very appreciatiev for any help.

Regards

Rolf




More information about the Python-list mailing list