tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Stone <>
Subject Successful build of mod_jk2 on Mac OS X Panther
Date Thu, 15 Jan 2004 19:49:33 GMT

I have successfully built mod_jk2 on Mac OS X Panther (10.3.2).

I document my success at:

*where comments are welcome.* NB: My success in part may be due to using 
ServerLogistic's Complete Apache 2.0.48 distro, so it is somewhat 
specific to this Apache build, however, I intend to extend my experience 
with an Apache build from source on Mac OS X, something that I have done 
serveral times on Linux.

For posterity and convenience, I'm including my notes posted at 
ServerLogistics here:

How did you build mod_jk2 for Mac OS X? I answer my own question but 
solicit review and feedback as IANAUD (I Am Not A UNIX Developer). I 
made "best guesses" about what should be done to fix build errors I 
encountered from my experiences with building software on Linux.

!!! I have not tested this build in a test or production environment 
very extensively.

Make sure you have installed the Developer Tools for Panther. You will 
find these on the XCode CD.

The following guide may require that you have installed Complete Apache 
2.0.48 from ServerLogistics.

[Complete Apache 2.0.48]

    1. Download and unpack the JTC source. Where you download it to is 
not important, but will be referred to later as ${JTC_SRC_ROOT}.
       % tar xvzf ${JTC_SRC}.tar.gz


    2. Download and unpack the PERL Compatability Regular Expression 
Library. Again, I will refer to it as ${PCRE_SRC_ROOT}. I used v4.4. It 
is stated on the home page (1/7/2004) as the most recent version. 
However, FTP has a v4.5 available.
       % tar xvzf ${PCRE_SRC}.tar.gz


    3. PCRE builds out-of-the-box on Mac OS X Panther. I built the 
default configuration save support for UTF-8.
       % cd ${PCRE_SRC_ROOT}
       % ./configure --enable-utf8
       % make
       % make install

       This installs the pcre libs in /usr/local/lib. One can use the 
--prefix=[DIR] flag during configure if wanted. ./configure --help 
explains this and much more.

    4. I originally said something about the Apache Portable Runtime. 
APR is included with Complete Apache 2.0.48. See note above about 
installing Complete Apache2 before continuing further.

    5. Fix ${JTC_SRC_ROOT}/jk/native2/ Mac OS X does not 
have the libtoolize tool, but a "generic" libtoolize. vi/bbedit the 
first line and replace "libtoolize" with "glibtoolize".
       % cd ${JTC_SRC_ROOT}/jk/native2

    6. Run the fixed
       % ./

    7. Now you're ready to run the configure script.
       % ./configure \
       > --with-apxs2=${APACHE_ROOT}/bin/apxs \
       > --with-tomcat41=${TOMCAT_ROOT} \
       > --with-java-home=/Library/Java/Home \
       > --with-jni \
       > --with-pcre

       [from Tomcat User and Jakarta Tip]

       The configure script is going to create a bunch of Makefiles. The 
Makefiles do not seem to account for the idiosyncroacies of Mac OS X 
Panther. You have to find references to "-lcrypt". The -lcrypt flag is 
not supported in Mac OS X. These functions are builtin to the OS and 
found in unistd.

[lcrypt flag support notes]

       Also, configure is going to build a libtool in the current 
directory, but the Makefiles are going to reference the libtool found in 
/Library/Apache2. I don't know why. So we need to edit this variable too.

    8. Two files are of interest... ${JTC_SRC_ROOT} 
/jk/native2/server/apache2/Makefile and ${JTC_SRC_ROOT} 
/jk/native2/server/apache2/ Find the JK_LDFLAGS and remove 
"-lcrypt" references.

       Also replace the LIBTOOL value with LIBTOOL=../../libtool .

   9. Now you're ready to make.
       % cd ${JTC_SRC_ROOT}/jk/native2
       % make

   10. Hopefully you should have a successful build.

   11. At the end of make there is a request that one invoke libtool to 
finish with:
       libtool --finish ...

       This has never work for me so I just manually copy the files.

       % cp ${JTC_SRC_ROOT}/jk/build/jk2/apache2/ 
       % cp ${JTC_SRC_ROOT}/jk/build/jk2/apache2/ 

       Double check your module permissions!

   12. The rest of the configuration is well documented at Jakarta.

I'm very interested in feedback and will attempt to answer questions 
when possible.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message