[mod_python] compile mod_python on iSeries (AS/400)

Graham Dumpleton graham.dumpleton at gmail.com
Mon Feb 4 17:10:10 EST 2008


On 05/02/2008, Denes L <denes1951 at yahoo.ca> wrote:
> Graham Dumpleton wrote:
> >>> In src/include/mod_python.h.in (NOTE the extension is .h.in, not
> just.h), change:
>
> The program now compiles but I had to make the change in mod_python.h not in
> the h.in file.
>
> >>> You should do a make distclean and rerun configure.
>
> Since this is not really a unix system I can not do that.
>
> Instead I am creating a SRVPGM, the equivalent of a DLL in windows, but I
> get some undefined symbols which I have been able to reduce to these:
> init_apache

In 'src/_apachemodule.c'.

> MpConn_FromConn

In 'src/connobject.c'.

> MpFilter_FromFilter
> MpHList_FromHLEntry
> MpRequest_FromRequest
> MpServer_FromServer

Above similarly in other files in the 'src' directory.

> unixd_config
> unixd_set_global_mutex_perms

These are symbols which are part of Apache and will not be able to be
resolved when compiling mod_python. Normally apxs would tell the
linker to ignore undefined symbols.

> I think I might be able to get rid of the ones starting with Mp by compiling
> some programs separately but the real question here is that I don't see apxs
> in the iseries Apache.

Build mod_python on a real UNIX system and watch the build output. You
should see apxs echo back the real compiler command. You just need to
perform the equivalent.

> I know that it supports APR (Apache Portable Runtime) but is that equivalent
> to apxs?

No. The APR is a C library used by Apache in its implementation.

The 'apxs' program is a wrapper script to assist in compiling Apache modules.

> The created SRVPGM has to be loaded into Apache using a:
> LoadModule Module in the config file.
>
> Can mod_python work with APR?.

The mod_python code uses APR C library. Has because of how Apache also uses it.

Are you truly trying to get mod_python running so you can use
mod_python features, or do you simply want a way of running Python web
applications under Apache and don't care about what the Python web
server API is?

Graham


More information about the Mod_python mailing list