[mod_python] Re: Cross compiling mod_python

Graham Dumpleton graham.dumpleton at gmail.com
Fri Nov 28 07:07:54 EST 2008

2008/11/28 Paul Herring <pauljherring at gmail.com>:
> On Fri, Nov 28, 2008 at 9:17 AM, Graham Dumpleton
> <graham.dumpleton at gmail.com> wrote:
> [...]
>>> cannot open /usr/local/conf/build/config_vars.mk: No such file or
>>> directory at /f15_nsb/usr/local/bin/apxs line 218.
>>> ./configure: line 2714: /: is a directory
>> This indicates that the apxs installation you are trying to use is
>> broken in some way.
> It's not broken. It also shouldn't be executed as part of the build process....

It has to be executed. You seem to fail to understand that 'apxs' is
the Apache tool for building Apache modules. You therefore can't avoid
it being used.

You would need to fudge a version of 'apxs' which is capable of doing
cross compilation. This will likely be non trivial as it is more than
just configuration but also it usage of 'libtool', which would also
need to be made cross compilation aware.

The 'httpd' is executed only to determine Apache version, that could
be hacked around, but you can't avoid 'apxs'. Even if you avoid it in
'configure' script, it is still used from Makefile to do the build.


>> Specifically, appears to be looking in a location
>> for its files where they aren't.
> Indeed.
> Assuming that I should be/could run  target binaries on the host
> system, apxs needs to look in the target directory of
> /f15_nsb/usr/local/conf/build/config_vars.mk, for the cross compile to
> work ( - instead it's looking in the host directory.)  Yes I realise
> that apxs is a perl script, but further along in the configure script
> it attempts to run httpd. Something that almost certainly shouldn't be
> executed on the host during a cross compile.
> This goes back to my earlier comment about the ./configure script
> trying to run the target binaries/whatever.
>> On the command line run:
>>  /f15_nsb/usr/local/bin/apxs -q LIBDIR
> On the host system:
> =====>8-----
> cannot open /usr/local/conf/build/config_vars.mk: No such file or
> directory at /f15_nsb/usr/local/bin/apxs line 218.
> =====>8-----
>> If that errors, then definitely broken.
> It's not broken, it's just being run under circumstances it shouldn't.
> It works fine when run on the target.
> In summary, during the build process:
> 1) I can't use the target version of apxs, since it's not running on
> the target (and cannot find the files it needs in the places it
> expects them.)
> 2) I can't use the local/host version of apxs, since it doesn't refer
> to the version of apache that will be on the target system.
> I'm currently looking into modifying configure.in to be able to supply
> overrides to everything that currently uses target binaries, in much
> the same way that httpd does.
> --

More information about the Mod_python mailing list