README.platforms revision 7ad880d6349c598e9740f0c0c866be6101bd0c93
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye Apache HTTP Server
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye Platform specific notes:
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye ------------------------
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye================
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye Darwin (OS X):
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye Apache 2 relies heavily on the use of autoconf and libtool to
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye provide a build environment. Darwin provides these tools as part
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye of the Developers Tools package. Under Darwin, however, GNUlibtool
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye is installed as 'glibtool' to avoid conflicting with the Darwin
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye 'libtool' program. Apache 2 knows about this so that's not a
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye As of OS X 10.2 (Jaguar), the bundled versions work perfectly. Partly
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye this is due to the fact that /bin/sh is now 'bash' and not 'zsh' as
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye well as the fact that the bundled versions are up-to-date:
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye autoconf 2.52 and (g)libtool 1.4.2.
3dc379d98a11243103242e2b43b1ab1322795b7eLubos Kosco Earlier versions of OS X are not so fortunate, and the bundled tools
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye are not only older versions, but also, for the most part, do not work
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye well. If you are interested in developing under Darwin, we
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye recommend that you obtain and install replacement versions of what
eb32a77fdb57f20c042b7b79b28a4fb4060cb949Lubos Kosco are normally installed on Darwin (and OS X, as of v10.1.5). If
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye you build your own versions of autoconf 2.52 and libtool 1.4.2, be
3dc379d98a11243103242e2b43b1ab1322795b7eLubos Kosco aware that there are some Darwin specific patches to the official
eb32a77fdb57f20c042b7b79b28a4fb4060cb949Lubos Kosco code that still must be applied for them to fully work. A useful
3dc379d98a11243103242e2b43b1ab1322795b7eLubos Kosco page to check out is:
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye http://fink.sourceforge.net/doc/porting/libtool.php
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye Pier Fumagalli also provides pre-built Darwin packages of the
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye patched autoconf and libtool suites, available at:
5e0ccd8bb84a766f65680b4cc1e43b356d1d78b8Trond Norbye You will note that GNU libtool should actually be installed as
b6e48c95305391ca75f99817def61159230969faTrond Norbye glibtool, to avoid conflict with a Darwin program of the same
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye name. Pier's packages have this change already. All files are
cd1fe74964370b3f6b4ae79635fd1074f7a94d3dSven-Kristofer Pilz installed under /usr/local/ so to use these versions, and be sure
a90c307564052f582357f820eadec4390e6a86c6Trond Norbye that /usr/local/bin is earlier in your PATH.
a90c307564052f582357f820eadec4390e6a86c6Trond Norbye There have been some reports that autoconf 2.52 prevents Apache's
a90c307564052f582357f820eadec4390e6a86c6Trond Norbye build system from correctly handling passing multi-value envvars
a90c307564052f582357f820eadec4390e6a86c6Trond Norbye to the build system (eg: CFLAGS="-g -O3" ./configure), causing
cd1fe74964370b3f6b4ae79635fd1074f7a94d3dSven-Kristofer Pilz errors. Use of bash does not seem to help in this situation. If
9a4361e23046cda58b9a5b8f4e11910dc433badaLubos Kosco this affects you, downgrading to autoconf 2.13 (which is installed
a90c307564052f582357f820eadec4390e6a86c6Trond Norbye on Darwin) will help.
3dc379d98a11243103242e2b43b1ab1322795b7eLubos Kosco With Leopard (at least up to 10.5.2), when running configure
e8a20bc0a36e5885fa67503ba58be9c29ef96500Vladimir Kotal you will likely see errors such as:
a90c307564052f582357f820eadec4390e6a86c6Trond Norbye rm: conftest.dSYM: is a directory
a90c307564052f582357f820eadec4390e6a86c6Trond Norbye This is a known issue and will be fixed in a later version of the
760369283613b2d5c2449cdc5b7a74e16d929750Trond Norbye autoconf suite. These errors can be safely ignored.
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye With Darwin 10, the default C compiler (gcc) will try to build
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye multi-architecture bundles. This causes problems with APR, which
3dc379d98a11243103242e2b43b1ab1322795b7eLubos Kosco needs to know various data-type sizes which it assumes are universal
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye for platforms. Until this is fully fixed, we recommend using the
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye '-arch i386' gcc option when building both Apache and APR.
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye autoconf 2.52 creates scripts that are incompatible with the Posix
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye shell implementation (/bin/sh) on FreeBSD. Be sure to use v2.13
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye of autoconf.
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye Threaded MPMs are not supported on FreeBSD 4.x. Current releases of
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye FreeBSD 5.x (5.2 or later) support threaded MPMs correctly. You must pass
3dc379d98a11243103242e2b43b1ab1322795b7eLubos Kosco '--enable-threads=yes' to APR's configure in order to enable threads.
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye Additionally, you must use libthr or libkse via libmap.conf as the default
fcb68bae47907ba23c545e379c81c3ee6e19f778Lubos Kosco libc_r is still broken as of this writing. Please consult the man page for
4db6dbfe971f3c68c0945e5da3b6d5a3248054daTrond Norbye libmap.conf for more details about configuring libthr or libkse.
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye================
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye The dlopen() system call in HP-UX has problems when loading/unloading
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye C++ modules. The problem can be resolved by using shl_load() instead
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye of dlopen(). This is fixed in the Apache 2.0.44 release.
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye To enable loading of C++ modules, the httpd binary has to be linked with
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye the following libraries :
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye HP-UX (11.0 / 11i):
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye When using shl_load : "cpprt0_stub.s -lcl"
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye When using dlopen : "cpprt0_stub.s -lcl -lCsup"
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye HP-UX (11i version 1.5 and greater):
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye When using dlopen/shl_load : "cpprt0_stub.s -lcl -lunwind"
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye The cpprt0_stub.s can be downloaded from the web site :
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye http://h21007.www2.hp.com/hpux-devtools/CXX/hpux-devtools.0107/0083.html
9a4361e23046cda58b9a5b8f4e11910dc433badaLubos Kosco Compile cpprt0_stub.s with the PIC option
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye================
4db6dbfe971f3c68c0945e5da3b6d5a3248054daTrond Norbye AIX, using the vendor C compiler with optimization:
4db6dbfe971f3c68c0945e5da3b6d5a3248054daTrond Norbye There is an issue with compiling server/core.c with optimization enabled
4db6dbfe971f3c68c0945e5da3b6d5a3248054daTrond Norbye which has been seen with C for AIX 5.0.2.3 and above. (5.0.2.0, 5.0.2.1,
4db6dbfe971f3c68c0945e5da3b6d5a3248054daTrond Norbye and 5.0.2.2 have an additional problem with Apache 2.0.x, so either upgrade
5e0ccd8bb84a766f65680b4cc1e43b356d1d78b8Trond Norbye the compiler or don't use optimization in order to avoid it.)
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye cc_r works fine with -O2 but xlc_r does not. In order to use xlc_r with
5e0ccd8bb84a766f65680b4cc1e43b356d1d78b8Trond Norbye -O2, apply the patch at
5e0ccd8bb84a766f65680b4cc1e43b356d1d78b8Trond Norbye http://www.apache.org/dist/httpd/patches/apply_to_2.0.49/aix_xlc_optimization.patch
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye (That patch works with many recent levels of Apache 2+.)
5e0ccd8bb84a766f65680b4cc1e43b356d1d78b8Trond Norbye================
5e0ccd8bb84a766f65680b4cc1e43b356d1d78b8Trond Norbye On Solaris, better performance may be achieved by using the Sun Studio
eb32a77fdb57f20c042b7b79b28a4fb4060cb949Lubos Kosco compiler instead of gcc. As of version 11, it is now free (registration
5e0ccd8bb84a766f65680b4cc1e43b356d1d78b8Trond Norbye required). Download the compiler from:
5e0ccd8bb84a766f65680b4cc1e43b356d1d78b8Trond Norbye http://developers.sun.com/prodtech/cc/downloads/index.jsp
e8a20bc0a36e5885fa67503ba58be9c29ef96500Vladimir Kotal If you use Sun Studio, the following compiler flags (CFLAGS) are
5e0ccd8bb84a766f65680b4cc1e43b356d1d78b8Trond Norbye recommended:
5e0ccd8bb84a766f65680b4cc1e43b356d1d78b8Trond Norbye -XO4 -xchip=generic
a90c307564052f582357f820eadec4390e6a86c6Trond Norbye================
a90c307564052f582357f820eadec4390e6a86c6Trond Norbye You will need to ensure that you have either libtool 1.5.6
a90c307564052f582357f820eadec4390e6a86c6Trond Norbye or 2.2.6b, or later. Expat 2.0.1 and PCRE 8.02 are also
eb32a77fdb57f20c042b7b79b28a4fb4060cb949Lubos Kosco recommended to be installed. If building PCRE from source,
a90c307564052f582357f820eadec4390e6a86c6Trond Norbye you'll also need g++.