Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Compiling on AIX

Table of Contents

creating an installp package

...

  • xlc and gcc both are reported to work
  • It's strongly suggested to install the coreutils RPM and be sure /opt/freeware/bin/install is high in your PATH and found by APR configure for BSD-compatible install.
    • covener believes this might solve failures to install DSO's.
    • This is probably fixed in trunk (by using CP instead of install)
    Building a recent autoconf, m4, libtool, and zlib (and maybe PCRE?) to some shared prefix doesn't hurt (e.g. $HOME/gnu)
  • You should have the "installp" openssl, but you may want to compile your own openssl into /opt/opensslXYZ and pass it to configure with --with-ssl
  • It is very useful to install prerequisites via the yum available with the AIX toolbox for Linux alpha applications. Once you have yum, you can install e.g.
    • autoconf m4 libtool zlib expat expat-devel pcre pcre-devel libnghttp2 libnghttp2-devel 
      • There are a lot of transitive dependencies if you try not to use yum or try to build them all yourself
  • For something long forgotten, adding that prefix to your LIBPATH helps some stage of the build
    • export PATH=$HOME/gnu/bin:/opt/freeware/bin:$PATH
    • export LIBPATH=$LIBPATH:$HOME/gnu/
  • Setting CONFIG_SHELL=/usr/bin/bash can speed up ./configure significantly.
  • Old tarballs with an old config.guess/config.sub require AIX 6.1 and later to impersonate AIX 5.3
    • export ac_cv_build="powerpc-ibm-aix5.3.0.0"
    • export ac_cv_build_alias="powerpc-ibm-aix5.3.0.0"
  • To build from trunk, you'll need a working python. You can install gdbm and python2.6 from the "AIX Toolbox for Linux" RPMs, or from http://www.perzl.org/.
  • If you didn't use yum for expat or pcre::
  • To find these prerequisites at runtime:
    • Append /opt/freeware/lib64 to LIBPATH in $bindir/envvars
    • If running the Apache Test Framework, pass -httpd $bindir/bin/apachectl

2.4 specific info

  • If you compile mod_unixd as static, you also need this in server/Makefile +EXPORT_DIRS = $(top_srcdir)/include $(top_srcdir)/os/$(OS_DIR) $(top_srcdir)/modules/arch/unix/

64-bit

  • Re-configure after changing any of these.
  • Set both OBJECT_MODE=64 and CC="xlc_r -q64"
  • Sometimes you need to also set:
    • export AR="ar -X64"
    • export lt_cv_path_NM="/usr/bin/nm -B -X64"
  • If you're building with SSL:
    • install pkg-config from perzl or toolbox
    • install openssl and openssl-devel from perzl or toolbox
    • If using third-party openssl packages, export LD_LIBRARY_PATH=/opt/freeware/lib64 before running configure

Link errors with bundled expat and when using DESTDIR

  • If you use a bundled expat, you might find the link of apr-util fails. The following change might help:


    Wiki Markup
    _perl -p -i.orig -e  \"s#\[^ \]+libexpat.la#-L$curdir/srclib/apr-util/xml/expat/lib/ -lexpat#; s#\[^ \]+libapr-1.la##;\" $PWD/srclib/apr-util/Makefile_
    \\


AIX layout discussion

With the latest distributions there is a layout for AIX in config.layout to assist with standardization of packaging on AIX.

...

  • man pages in /usr/share/man/...
  • read only, system independent files in /opt/httpd/...
  • system dependent files in /var/httpd/...
  • no files in /usr - except for man pages

so:

  • no files in /usr/local
  • httpd is used as directory name rather than apache2
  • /opt/httpd for binaries and static files (to be a USR part of an installp package)
  • /var/httpd as base for files that are system dependent and may be modified
  • /var/httpd/etc as base for config files
  • /usr/share/man for the man pages so that man httpd-foo works directly
  • /etc/httpd/* is used for config files
  • this layout will directly support multiple installations in system WPARs
  • Optional: If all server related files are to be in a separate filesystem (e.g., /var/httpd you can consider moving /etc/httpd to /var/httpd/etc and creating a symbolic link from /etc/httpd to /var/httpd/etc

Testing on AIX

To test httpd functionality you need (per 2014-08-06) at least perl v5.10 in order to add the needed modules and modules. So, using standard AIX provided perl you must test on AIX 7.1 as AIX 5.3 has perl v5.8.2 and AIX 6.1 has perl v5.8.8.

...

  • Have apache httpd installed and configured normally (e.g. ServerName is defined, or you will get a warned about this for EVERY test)
No Format
 svn checkout  http://svn.apache.org/repos/asf/httpd/test/framework/trunk ./test 

...

No Format
 # su testuser
 % find /opt/httpd -name apxs
 % perl Makefile.PL -apxs ''full-path from find above''
 % t/TEST

Using OpenSSL 1.1

In my experience, openssl OpemSSL 1.1.0/1.f and 1.1 .0.g causes SIGILL crashes at process termination. A simple workaround is to add LoadFile to libcrypto.so.1.1 before loading mod_ssl. This prevents libcrypto from being unloaded when mod_ssl is dlclose()'ed. Secondly, since having openssl 1.1 in your LIBPATH breaks most other tools like perl and wget, you should only add this path to bin/envvarsprior to mid-2018 would produce a SIGILL on shutdown.  If you use LoadFile of libcrypto as a workaround, it is safe to remove.