README.platforms 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. Apache HTTP Server
  2. Platform specific notes:
  3. ------------------------
  4. ================
  5. Darwin (OS X):
  6. Apache 2 relies heavily on the use of autoconf and libtool to
  7. provide a build environment. Darwin provides these tools as part
  8. of the Developers Tools package. Under Darwin, however, GNUlibtool
  9. is installed as 'glibtool' to avoid conflicting with the Darwin
  10. 'libtool' program. Apache 2 knows about this so that's not a
  11. problem.
  12. As of OS X 10.2 (Jaguar), the bundled versions work perfectly. Partly
  13. this is due to the fact that /bin/sh is now 'bash' and not 'zsh' as
  14. well as the fact that the bundled versions are up-to-date:
  15. autoconf 2.52 and (g)libtool 1.4.2.
  16. Earlier versions of OS X are not so fortunate, and the bundled tools
  17. are not only older versions, but also, for the most part, do not work
  18. well. If you are interested in developing under Darwin, we
  19. recommend that you obtain and install replacement versions of what
  20. are normally installed on Darwin (and OS X, as of v10.1.5). If
  21. you build your own versions of autoconf 2.52 and libtool 1.4.2, be
  22. aware that there are some Darwin specific patches to the official
  23. code that still must be applied for them to fully work. A useful
  24. page to check out is:
  25. http://fink.sourceforge.net/doc/porting/libtool.php
  26. Pier Fumagalli also provides pre-built Darwin packages of the
  27. patched autoconf and libtool suites, available at:
  28. http://www.apache.org/~pier/macosx/
  29. You will note that GNU libtool should actually be installed as
  30. glibtool, to avoid conflict with a Darwin program of the same
  31. name. Pier's packages have this change already. All files are
  32. installed under /usr/local/ so to use these versions, and be sure
  33. that /usr/local/bin is earlier in your PATH.
  34. There have been some reports that autoconf 2.52 prevents Apache's
  35. build system from correctly handling passing multi-value envvars
  36. to the build system (eg: CFLAGS="-g -O3" ./configure), causing
  37. errors. Use of bash does not seem to help in this situation. If
  38. this affects you, downgrading to autoconf 2.13 (which is installed
  39. on Darwin) will help.
  40. With Leopard (at least up to 10.5.2), when running configure
  41. you will likely see errors such as:
  42. rm: conftest.dSYM: is a directory
  43. This is a known issue and will be fixed in a later version of the
  44. autoconf suite. These errors can be safely ignored.
  45. With Darwin 10, the default C compiler (gcc) will try to build
  46. multi-architecture bundles. This causes problems with APR, which
  47. needs to know various data-type sizes which it assumes are universal
  48. for platforms. Until this is fully fixed, we recommend using the
  49. '-arch i386' gcc option when building both Apache and APR.
  50. ==========
  51. FreeBSD:
  52. autoconf 2.52 creates scripts that are incompatible with the Posix
  53. shell implementation (/bin/sh) on FreeBSD. Be sure to use v2.13
  54. of autoconf.
  55. Threaded MPMs are not supported on FreeBSD 4.x. Current releases of
  56. FreeBSD 5.x (5.2 or later) support threaded MPMs correctly. You must pass
  57. '--enable-threads=yes' to APR's configure in order to enable threads.
  58. Additionally, you must use libthr or libkse via libmap.conf as the default
  59. libc_r is still broken as of this writing. Please consult the man page for
  60. libmap.conf for more details about configuring libthr or libkse.
  61. ================
  62. HP-UX:
  63. The dlopen() system call in HP-UX has problems when loading/unloading
  64. C++ modules. The problem can be resolved by using shl_load() instead
  65. of dlopen(). This is fixed in the Apache 2.0.44 release.
  66. To enable loading of C++ modules, the httpd binary has to be linked with
  67. the following libraries :
  68. HP-UX (11.0 / 11i):
  69. When using shl_load : "cpprt0_stub.s -lcl"
  70. When using dlopen : "cpprt0_stub.s -lcl -lCsup"
  71. HP-UX (11i version 1.5 and greater):
  72. When using dlopen/shl_load : "cpprt0_stub.s -lcl -lunwind"
  73. The cpprt0_stub.s can be downloaded from the web site :
  74. http://h21007.www2.hp.com/hpux-devtools/CXX/hpux-devtools.0107/0083.html
  75. Compile cpprt0_stub.s with the PIC option
  76. cc -c +z cpprt0_stub.s
  77. - OR -
  78. gcc -c -fPIC cpprt0_stub.s
  79. ================
  80. AIX, using the vendor C compiler with optimization:
  81. There is an issue with compiling server/core.c with optimization enabled
  82. which has been seen with C for AIX 5.0.2.3 and above. (5.0.2.0, 5.0.2.1,
  83. and 5.0.2.2 have an additional problem with Apache 2.0.x, so either upgrade
  84. the compiler or don't use optimization in order to avoid it.)
  85. cc_r works fine with -O2 but xlc_r does not. In order to use xlc_r with
  86. -O2, apply the patch at
  87. http://www.apache.org/dist/httpd/patches/apply_to_2.0.49/aix_xlc_optimization.patch
  88. (That patch works with many recent levels of Apache 2+.)
  89. ================
  90. Solaris:
  91. On Solaris, better performance may be achieved by using the Sun Studio
  92. compiler instead of gcc. As of version 11, it is now free (registration
  93. required). Download the compiler from:
  94. http://developers.sun.com/prodtech/cc/downloads/index.jsp
  95. If you use Sun Studio, the following compiler flags (CFLAGS) are
  96. recommended:
  97. -XO4 -xchip=generic