UPDATED to mod_jk (1.2.5) and mod_jk2 (2.0.2) (with binaries). 12-14-17/10/2003.


(The old document from Dec 2000 is available here)

Introduction.

These are the instructions to compile mod_jk (1.2.5) and mod_jk2 (2.0.2) on MacOS X 10.2.6 and 10.3 (binaries of both modules are also available, see below).
YOU download any of the software mentioned below, or follow any of the instrucions described in this document, completely at your own risk. If you do not agree with this conditions just leave this page and forget about it!

Prerequisites

  1. tomcat-4.1.27 binary distribution.
  2. Apache2 (I use httpd-2.0.47).
  3. Java 1.4.1 (via Software Update). (Note: there seems to be a problem with the java headers location, probably occurred with the transition from 1.3 to 1.4. If the compilation phase aborts because jni.h cannot be found, you will have to upgrade also the Java Developer tools (and get the Dec 2002 Dev. Tools). You could alternatively find jni.h and make it available in /Library/Java/Home/include (via a symlink, for instance).
  4. if you do not want to build the modules yourself then get the modules: mod_jk.so (132045 bytes) or mod_jk2.so (217634 bytes).
    They must be untarred inside the apache2/modules directory.
    REMINDER: YOU DOWNLOAD AND USE THIS SOFTWARE AT YOUR OWN RISK.
If you also want to compile the modules you will need:
  1. jakarta-tomcat-connectors-jk-1.2.5-src for mod_jk or jakarta-tomcat-connectors-jk2-2.0.2-src for mod_jk2 (both here).
  2. dlcompat-20030522 (local archive of the essential files).
  3. our (trivial) build scripts.
  4. Java 1.4.1 Developer Tools (from the developer connection).
  5. that the apache 2 location is /usr/local/apache2.

Compiling mod_jk (mod_jk2).

  1. untar dlcompat-20030522.tgz in the chosen jakarta-tomcat-connectors and precisely in jakarta-tomcat-connectors-jk-1.2.5/jk/native/ for mod_jk and jakarta-tomcat-connectors-jk2-2.0.2-src/jk/native2/ for mod_jk2.
    So, after cd-ing to one of these two directories, type gnutar xzf dlcompat-20030522.tgz. This will create the dlcompat directory.
  2. Put the appropriate build script (see point 6 above) in the native (native2 for mod_jk2) directory.
  3. sh build_mod_jk.sh (respectively build_mod_jk2.sh).

Notes.

  1. I have decided to link dlcompat statically in the module rather than as an external shared library. Mainly for simplicity.
  2. I haven't tested these extensively.
  3. The scripts work on both 10.2.x and 10.3, allegedly. The modules available here have been compiled on 10.2.6. I have compiled and tested the modules also on 10.3.
  4. You can thank me or damn me at the feedback link below. I am also available to answer questions.


Feedback.
©2003 HUMPH Ltd. All rights reserved. Linking to this page is allowed, any other use requires our permission.