[mod_python] Cross compiling mod_python

Graham Dumpleton graham.dumpleton at gmail.com
Thu Nov 27 23:33:41 EST 2008

2008/11/28 Paul Herring <pauljherring at gmail.com>:
> Forgive me if this either
> 1) has been asked before, but I've found nothing on google
> (<http://www.google.co.uk/search?q=inurl%3Ahttp%3A//www.modpython.org/pipermail/mod_python+cross+compilation>
> for example, along with general searches involving the terms
> 'mod_python', 'module', 'apache', 'apxs', and 'cross-compile'.)
> 2) is off topic, in which case I'd be grateful for pointers to the
> right place to ask.
> I'm cross-compiling a system, and have successfully (after a steep
> learning curve) managed to get both python and apache to compile to
> the target system, however I've hit a barrier when trying to
> cross-compile mod-python.
> After examining the error messages (no apxs, can't find the apache
> config when the target version of apxs is supplied) and the configure
> script itself, it would appear that the configure process requires
> output from pre-existing binaries.
> Now since I'm cross-compiling, the target binaries aren't necessarily
> able to run on the compiling system (in this case they can, but , for
> example, apxs is expecting a configuration file in a place where it
> doesn't exist on the build system,) so the configure script cannot
> really be expected to run them, but I cannot find any way of
> overriding the need to run the binaries (unlike, say, apache where you
> can supply expected answers/override this behaviour on the ./configure
> invocation.)
> Am I missing something rather obvious in how to cross-compile this
> module, or do I have to resort to 'tweaking' the configure script so
> that I can override this behaviour?
> Apologies for the lack of detail for the moment (especially version
> numbers, command line invocations and output/error messages;) I'm not
> at work where the system is. I can provide more detail if required,
> and will probably follow up this message when I do get to work.

What are you ultimately wanting to run on top of mod_python?

If it is a WSGI capable application you will probably find things a
lot simpler if you use mod_wsgi. It may not compile out of the box
either, but may have a much better chance given it is one C code file

As to mod_python, I'd probably suggest you are going to be on your own
as far as trying to get it built under a cross compilation environment
unless someone else has specifically done it.


More information about the Mod_python mailing list