[mod_python] Dupe: Undefined symbol "PyEval_AcquireLock"

Graham Dumpleton grahamd at dscpl.com.au
Wed Sep 14 12:29:52 EDT 2005


On 10/09/2005, at 3:20 AM, Andrew Musselman wrote:

> Thanks for the hints; it is strange that Makefile for python 2.4 has
> these lines:
>
> .if !defined(WITHOUT_THREADS)
> CONFIGURE_ARGS+=        --with-threads
>
> This seems to indicate that threads should be built in to the version I
> have running.

Which makefile is this? I can't find anything like this in standard
Python source code distribution, not even a reference to the symbol
called "WITHOUT_THREADS".

> I do not understand how to use "LIBS=-lc_r ./configure
> --with-threads"..  Is it possible to enter the "LIBS=-lc_r" somewhere 
> in
> the Makefile?

If you don't understand about running "configure", I would suggest
you are going to have more problems if you start trying to modify
makefiles to get it to work.

By rights, running "configure" initially to build Python should
correctly find threads on a BSD type system which puts them in the
libc_r library instead of the libc library. Ie., "configure" contains:

     echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
else
   ac_check_lib_save_LIBS=$LIBS
LIBS="-lc_r  $LIBS"

The question is, who installed your Python in the first place. Was it
a prebuilt package which you simply loaded on your box or which was
put there by someone else? BSD packages for Python I have seen in the
past have for some reason deliberately left out threading support.
These were older versions of Python and I believe it was done because
of some funny limit in BSD. Newer versions of Python have been patched
to avoid whatever the problem was, but perhaps packagers haven't learnt
and still build it without threads.

If it was done by you, you should know enough about "configure". If
not, you perhaps want to start finding out about what it is. Start
by trying to install Python from source code yourself by following
its instructions.

Graham



More information about the Mod_python mailing list