  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Struts - A MVC web framework | | Tomcat - JSP/Servlet container | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | | JSP - A mailing list about Java Server Pages specification and reference | |
Struts & Hibernate
|
|
|
  | | | Successful build of mod_jk2 on Mac OS X Panther | Successful build of mod_jk2 on Mac OS X Panther 2004-01-15 - By Timothy Stone
Back List,
I have successfully built mod_jk2 on Mac OS X Panther (10.3.2).
I document my success at:
http://forums.serverlogistics.com/viewtopic.php?t=644
*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] http://www.serverlogistics.com/apache2.php#download
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}. Code: % tar xvzf ${JTC_SRC}.tar.gz
[JTC_SRC] http://jakarta.apache.org/site/sourceindex.cgi
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. Code: % tar xvzf ${PCRE_SRC}.tar.gz
[PCRE_SRC] http://www.pcre.org/
3. PCRE builds out-of-the-box on Mac OS X Panther. I built the default configuration save support for UTF-8 (See http://UTF-8.ora-code.com). Code: % 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/buildconf.sh. Mac OS X does not have the libtoolize tool, but a "generic" libtoolize. vi/bbedit the first line and replace "libtoolize" with "glibtoolize". Code: % cd ${JTC_SRC_ROOT}/jk/native2 vi buildconf.sh
6. Run the fixed buildconf.sh. Code: % ./buildconf.sh
7. Now you're ready to run the configure script. Code: % ./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] http://marc.theaimsgroup.com/?l=tomcat-user&m=105103815630094&w=2
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] http://developer.apple.com/technotes/tn2002/tn2071.html#Section17
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/Makefile.in. Find the JK_LDFLAGS and remove "-lcrypt" references.
Also replace the LIBTOOL value with LIBTOOL=../../libtool .
9. Now you're ready to make. Code: % 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: Code: libtool --finish ...
This has never work for me so I just manually copy the files.
Code: % cp ${JTC_SRC_ROOT}/jk/build/jk2/apache2/mod_jk2.so ${APACHE_ROOT}/modules % cp ${JTC_SRC_ROOT}/jk/build/jk2/apache2/jkjni.so ${TOMCAT_ROOT}/server/lib
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.
Tim
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected) For additional commands, e-mail: tomcat-user-help@(protected)
|
|
 |