[mod_python] Weird ob_callback problems

Gregory (Grisha) Trubetskoy grisha at modpython.org
Mon Jan 31 10:28:17 EST 2005

Try defining DYLD_FORCE_FLAT_NAMESPACE=1 environment variable before 
launching httpd. Don't know if it will help, but it might.


On Mon, 31 Jan 2005, Andrew Farmer wrote:

> Installing mod_python 2.7.10 on Mac OS X 10.3.7. I've upgraded Python to 2.4 
> myself (the machine came with 2.3) and installed it in /usr/local. I'm using 
> the stock Apache 1.3.33.
> mod_python installed without trouble -- I added -DEAPI to the CFLAGS to avoid 
> the httpd warning -- but, upon trying to run any Python script, I get an 
> error 500 in the browser. The error log shows the following:
>> make_obcallback(): could not import mod_python.apache.
>> make_obcallback(): could not call init.
>> [Mon Jan 31 00:21:35 2005] [error] [client] python_handler: 
>> make_obcallback returned no obCallBack!
> I inserted a PyErr_Print() into make_obcallback at the critical point and 
> got:
>> Traceback (most recent call last):
>>   File "/usr/local/lib/python2.4/site-packages/mod_python/apache.py", line 
>> 49, in ?
>>     import time
>> ImportError: Failure linking new module: : dyld: /usr/sbin/httpd Undefined 
>> symbols:
>> /usr/local/lib/python2.4/lib-dynload/time.so undefined reference to 
>> _PyArg_Parse expected to be defined in the executable
>> /usr/local/lib/python2.4/lib-dynload/time.so undefined reference to 
>> PyArg_ParseTuple expected to be defined in the executable
>> /usr/local/lib/python2.4/lib-dynload/time.so undefined reference to 
>> PyDict_GetItemString expected to be defined in the executable
>> /usr/local/lib/python2.4/lib-dynload/time.so undefined refer...
> which suggests some sort of Python version mismatch. However, mod_python.so 
> *looks* like it was built against Python 2.4, and the compilation process 
> suggests the same.
> Anyone know what's going on -- and, more importantly, what to do about it?

More information about the Mod_python mailing list