[mod_python] Dupe: Undefined symbol "PyEval_AcquireLock"

Andrew Musselman Andrew at cwu.EDU
Fri Sep 9 13:20:49 EDT 2005


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.  Nevertheless, when I try "import threading" from within
python, I get this error:

Andrew Musselman
andrew at cwu.edu


>>> import threading
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/local/lib/python2.4/threading.py", line 6, in ?
    import thread
ImportError: No module named thread

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?

Thanks again.

Andrew

>>> Graham Dumpleton <grahamd at dscpl.com.au> 9/8/2005 6:50 PM >>>
My experience with FreeBSD systems is that threading wasn't builtin to
Python by default. To see if threading is builtin, from the command
line run Python and then do:

   import threading

If it fails, probably indicates Python wasn't built with threading
support in the first place. If this is the case, you will need to
rebuild Python with threading enabled. Note that on FreeBSD I believe
the POSIX thread library functions are in -lc_r, ie., reentrant
version of standard C library. Command line for configure probably
something like:

   LIBS=-lc_r ./configure --with-threads

Graham

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

> Hi List, sorry for the dupe; I tried subscribing with another email 
> account but wasn't able to confirm.  Here is my question again:
>
>  I am trying to run mod_python-3.1.4_1 with apache2 on FreeBSD 5.4 
> STABLE.  My python version is python-2.4.1_1.
>
>  Everything is built from ports.
>
>  Here is the error I receive when starting apache:
>  Syntax error on line 281 of /usr/local/etc/apache2/httpd.conf:
>  Cannot load /usr/local/libexec/apache2/mod_python.so into server: 
> /usr/local/libexec/apache2/mod_python.so: Undefined symbol 
> "PyEval_AcquireLock"
>
>  Here is line 281 of httpd.conf:
>  LoadModule python_module      libexec/apache2/mod_python.so
>
>  Has anyone seen this error before, or does anyone have suggestions
on 
> how to isolate the problem?
>
>  Thank you for your time.
>
>  Best,
>  Andrew
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org 
> http://mailman.modpython.org/mailman/listinfo/mod_python 


_______________________________________________
Mod_python mailing list
Mod_python at modpython.org 
http://mailman.modpython.org/mailman/listinfo/mod_python


More information about the Mod_python mailing list