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