Problems building a Python module

Gerhard Häring gerhard.haering at gmx.de
Tue Jul 9 10:03:23 EDT 2002


* Rolf Wester <wester at ilt.fhg.de> [2002-07-09 15:47 +0200]:
> 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(thread.o): In function 
> `PyThread_start_new_thread':
> thread.o(.text+0x7f): undefined reference to `pthread_sigmask'
> [...]

This wants to tell you that you should really use distutils to compile
your Python extension module instead.

> I link against following libraries:
> 
> -lpython2.2 -lm -ldl
> 
> Can someone tell me what other libraries I have to link against? And
> what means:

ldd /path/to/your/python will tell you.

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

This is a warning from the linker that's emitted as soon as certain
functions are linked against. As long as you don't use these functions
in the tmpfile module, you can safely ignore this warning.

Gerhard
-- 
mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    OpenPGP public key id AD24C930
public key fingerprint: 3FCC 8700 3012 0A9E B0C9  3667 814B 9CAA AD24 C930
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))





More information about the Python-list mailing list