[mod_python] What's the deal with _apachemodule?

Gregory (Grisha) Trubetskoy grisha at modpython.org
Mon Apr 15 09:00:38 EST 2002


_apachemodule.o is linked into mod_python.so. It relies on Apache API, so
you can't really use it outside Apache.

Grisha

On Sat, 13 Apr 2002, Markus Demleitner wrote:

> Hi list,
>
> I'm trying to compile modpython 2.7.7 together with apache 1.3.23
> and python 2.2 -- which works after some fiddling with the libs
> python was linked to.  I know that the prerequisites don't state
> that 2.2 is supported, but I couldn't see how my problem could
> be linked with the python version.
>
> When I'm actually trying to let some test script run, I get
> Traceback (most recent call last):
>   File "/home/unimut/www/cgi-bin/modpython.py", line 4, in ?
>     from mod_python import apache
>   File "/usr/local/lib/python2.2/site-packages/mod_python/apache.py", line 55, in ?
>     import _apache
> ImportError: No module named _apache
> in the server log.
>
> That's fair enough, because there is no _apachemodule.so in
> .../site-packages/mod_python, or anywhere else on the
> python path.
>
> Now, I say to myself, it's got be somewhere and check the
> source directory -- lo and behold, there's _apachemodule.o
> all right.  So, I link it to a dso -- and only get an undefined
> symbol MpServer_Type.  That's in one of the .o's in .../src,
> so I simply link all .o together.
>
> The resulting _apachemodule.so says:
>   File "/home/unimut/www/cgi-bin/modpython.py", line 4, in ?
>     from mod_python import apache
>   File "/usr/local/lib/python2.2/site-packages/mod_python/apache.py", line 55, in ?
>     import _apache
> ImportError: /usr/local/lib/python2.2/site-packages/mod_python/_apachemodule.so: undefined symbol: ap_log_error
>
> This symbol is imported by _apachemodule.o itself -- so it's
> unlikely that I have overlinked.
>
> At this point I gave up, thinking I must be doing something extraordinarily
> stupid.
>
> So, what's the deal?  _apachemodule.so isn't mentioned anywhere in the
> source tree, but it seems to be required to satisfy the import _apache
> statement.  What might the solution to this riddle be?
>
>         Markus
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://www.modpython.org/mailman/listinfo/mod_python
>




More information about the Mod_python mailing list