I have created a new project for AIX Porting in sourceforge, as long as I know sf don't provides a prowerpc-aix platform in its compiler farm. Somebody knows how can i get it? I have already done a support request for it

If somebody want to help...wellcomed and thanks.

At the moment we can only compile information like tips&tricks, experiences, documentation, and so on, about AIX Porting.

Note i use autotools to create configure files, those delivered with apache don't work right

Well, next, i create a clean build system

cd $source_dir
./buildconf

I don't execute build/binbuild.sh for to several reasons, as you can see below I need to change some things in middle of process... btw, apr and apr-util don't know Apache Layout, then, i usually set LAYOUT=apr and LAYOUT=apr-util in respective configures, just before sed command use it.

Adding -blibpath=/usr/lib:/lib to LDFLAGS isn't sometimes enought to solve this. Sometimes, libtool removes this flag. If configure generated Makefiles with libraries full names in LIBS, or libtool doesn't find libraries in .libs, it will search for it in another places and full paths will be generated

This problem mainly affect module libraries and libapr-util.so, the trick to solve it is, i think, to give to libtool flags in following way:

For modules, it could be enought modifying build/config_vars.mk, for apr-util, I didn't find the right place to properly fix it, so I dump libtool command to a log, then, after make and make install, I launch the xlc command manually, some like this:

Something strange ... make build .so right, but make install "relinks" libaprutil-0.so (why?) taking other flags and producing a library with a wrong load header.

Another problem is about mod_dav, after a proper build and install, I start httpd and looks ok, but when i try to connect, a core is generated ... debugging, I have found that a request is arriving to mod_dav. This request isn't for mod_dav, probably, mod_dav was loaded too soon, or another module that would should have processed the request previously, hasn't done it. I have found two solutions for this.

1. Modifying modules/dav/main/mod_dav.c

static int dav_fixups(request_rec *r)
{
dav_dir_conf *conf;
...
if (strcmp(r->handler, DAV_HANDLER_NAME) != 0) /* This is the fix, if program is allowed to continue */
return DECLINED; /* without this check, a core could be generated */
conf = (dav_dir_conf *)ap_get_module_config(r->per_dir_config,
&dav_module);
if (conf->provider == NULL) { /* This could become a core if conf isn't a valid pointer */
return DECLINED;
}
...
}

2. A colleague told me a different solution, this is to statically link mod_dav.a into mod_dav_fs.so, something like this:

... and, well, it is true, httpd don't crash after this ... but I don't understand why this is done ... if we build a different provider, must we statically link mod_dav too? ... I dont know if mod_dav will work properly.

This is all, I have finally create several scripts to pack .tar.gz file in the usual way, taking parts from original build/binbuild.sh, ... previously I copy sources to local directory in order to remove temporary .nfs files, taking care that my script sets original paths in httpd-std.conf, in order to ensure a future proper execution of install-bindist.sh.

From Apache 2.0.39 (from bug in core.c), I have seen that AIX have been forgotten by the community, I think that if Apache for AIX's build system isn't fixed now, the next apache versions could probably become too hard to build.