[mod_python] Error building mod_python

pm5 at matilda.fiorile.org pm5 at matilda.fiorile.org
Mon Jan 12 14:32:31 EST 2004


On Mon, Jan 12, 2004 at 01:47:03PM +0800, pm5 at matilda.fiorile.org wrote:
> Hi,
> 
> I ran into trouble when compiling mod_python.  This is the
> configuration I use:
> 
>  * mod_python 2.7.9, from source tarball
>  * Apache 1.3.29, from source tarball
>  * Python 2.3.3, from source tarball
>  * Debian stable (woody)
> 

I hit the send button too soon.  It turned out I should do a
'configure; make' on the Apache part first.  The ap_config_auto.h file
would show up and mod_python can be installed to the Apache
source tree.

Now the problem came when I tried to build Apache again with
this module.  I did:

 % ./configure \
         --activate-module=src/modules/python/libpython.a
 % make

And ran into the following error:


gcc  -DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -I./lib/expat-lite -DNO_DL_NEEDED `./a
paci` -Xlinker -export-dynamic       \
      -o httpd buildmark.o modules.o modules/standard/libstandard.a modules/pyth
on/libpython.a main/libmain.a ./os/unix/libos.a ap/libap.a regex/libregex.a lib/
expat-lite/libexpat.a  -lm -lcrypt -lm  /usr/local/src/build/Python-2.3.3/libpyt
hon2.3.a
/usr/local/src/build/Python-2.3.3/libpython2.3.a(posixmodule.o): In function `po
six_tmpnam':
/usr/local/src/build/Python-2.3.3/./Modules/posixmodule.c:5833: the use of `tmpn
am_r' is dangerous, better use `mkstemp'
/usr/local/src/build/Python-2.3.3/libpython2.3.a(posixmodule.o): In function `po
six_tempnam':
/usr/local/src/build/Python-2.3.3/./Modules/posixmodule.c:5788: the use of `temp
nam' is dangerous, better use `mkstemp'
/usr/local/src/build/Python-2.3.3/libpython2.3.a(dynload_shlib.o): In function `
_PyImport_GetDynLoadFunc':
/usr/local/src/build/Python-2.3.3/Python/dynload_shlib.c:129: undefined referenc
e to `dlopen'
/usr/local/src/build/Python-2.3.3/Python/dynload_shlib.c:132: undefined referenc
e to `dlerror'
/usr/local/src/build/Python-2.3.3/Python/dynload_shlib.c:137: undefined referenc
e to `dlsym'
/usr/local/src/build/Python-2.3.3/libpython2.3.a(thread.o): In function `find_ke
y':
/usr/local/src/build/Python-2.3.3/Python/thread_pthread.h:406: undefined referen
ce to `sem_wait'
/usr/local/src/build/Python-2.3.3/Python/thread_pthread.h:431: undefined referen
ce to `sem_post'
/usr/local/src/build/Python-2.3.3/libpython2.3.a(thread.o): In function `PyThrea
d_delete_key':
/usr/local/src/build/Python-2.3.3/Python/thread_pthread.h:406: undefined referen
ce to `sem_wait'
/usr/local/src/build/Python-2.3.3/Python/thread_pthread.h:431: undefined referen
ce to `sem_post'
/usr/local/src/build/Python-2.3.3/libpython2.3.a(thread.o): In function `PyThrea
d_delete_key_value':
/usr/local/src/build/Python-2.3.3/Python/thread_pthread.h:406: undefined referen
ce to `sem_wait'
/usr/local/src/build/Python-2.3.3/Python/thread_pthread.h:431: undefined referen
ce to `sem_post'
/usr/local/src/build/Python-2.3.3/libpython2.3.a(thread.o): In function `PyThrea
d_start_new_thread':
/usr/local/src/build/Python-2.3.3/Python/thread_pthread.h:215: undefined reference to `pthread_sigmask'
/usr/local/src/build/Python-2.3.3/Python/thread_pthread.h:217: undefined referen
ce to `pthread_create'
/usr/local/src/build/Python-2.3.3/Python/thread_pthread.h:242: undefined referen
ce to `pthread_sigmask'
/usr/local/src/build/Python-2.3.3/Python/thread_pthread.h:253: undefined referen
ce to `pthread_detach'
/usr/local/src/build/Python-2.3.3/libpython2.3.a(thread.o): In function `PyThrea
d_allocate_lock':
/usr/local/src/build/Python-2.3.3/Python/thread_pthread.h:353: undefined referen
ce to `sem_init'
/usr/local/src/build/Python-2.3.3/libpython2.3.a(thread.o): In function `PyThrea
d_free_lock':
/usr/local/src/build/Python-2.3.3/Python/thread_pthread.h:377: undefined referen
ce to `sem_destroy'
/usr/local/src/build/Python-2.3.3/libpython2.3.a(thread.o): In function `PyThrea
d_acquire_lock':
/usr/local/src/build/Python-2.3.3/Python/thread_pthread.h:406: undefined referen
ce to `sem_wait'
/usr/local/src/build/Python-2.3.3/Python/thread_pthread.h:408: undefined referen
ce to `sem_trywait'
/usr/local/src/build/Python-2.3.3/libpython2.3.a(thread.o): In function `PyThrea
d_release_lock':
/usr/local/src/build/Python-2.3.3/Python/thread_pthread.h:431: undefined referen
ce to `sem_post'
/usr/local/src/build/Python-2.3.3/libpython2.3.a(thread.o): In function `PyThrea
d_create_key':
/usr/local/src/build/Python-2.3.3/Python/thread_pthread.h:353: undefined referen
ce to `sem_init'
/usr/local/src/build/Python-2.3.3/libpython2.3.a(posixmodule.o): In function `po
six_openpty':
/usr/local/src/build/Python-2.3.3/./Modules/posixmodule.c:2590: undefined refere
nce to `openpty'
/usr/local/src/build/Python-2.3.3/libpython2.3.a(posixmodule.o): In function `po
six_forkpty':
/usr/local/src/build/Python-2.3.3/./Modules/posixmodule.c:2648: undefined refere
nce to `forkpty'
collect2: ld returned 1 exit status
make[2]: *** [target_static] Error 1
make[2]: Leaving directory `/usr/local/src/build/apache_1.3.29/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/usr/local/src/build/apache_1.3.29'
make: *** [build] Error 2



Is this about pthread support in Python?  I admit I'm clueless on
this issue, but I built Python with default configuration and according
to my build log, it seems to have pthread compiled in.

Anyone can help me on this?



More information about the Mod_python mailing list