Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 69998 invoked from network); 12 Sep 2002 22:14:54 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 12 Sep 2002 22:14:54 -0000 Received: (qmail 20734 invoked by uid 97); 12 Sep 2002 22:15:12 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 20716 invoked by uid 97); 12 Sep 2002 22:15:12 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 20696 invoked by uid 98); 12 Sep 2002 22:15:11 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-ID: <002301c25aa9$e43756c0$0101a8c0@mazumdar> From: "Dibyendu Majumdar" To: Subject: Building mod_jk on AIX 4.3.3 Date: Thu, 12 Sep 2002 23:15:23 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I recently built mod_jk on AIX 4.3.3, and would like to share my experience with you in the hope that it may be useful to some of you. I used the following tool-set/platform: gcc 2.95.2 gmake 3.79 automake 1.6 autoconf 1.53 m4 1.4 libtool 1.4.2 apache 1.3.26 jakarta tomcat 4.1.10 jakarta tomcat connectors 4.1.10 jakarta ant 1.4.1 java 1.3.0 perl 5.005_003 AIX 4.3.3 1. In my first attempt, I was unable to build mod_jk.so. As I investigated, I discovered the following reason for it. The build process invoked "cc" rather than "gcc", even though gcc was in the path first. I worked around this problem by creating a symbolic link called "cc" to "gcc". 2. I ran "ant native" from the jk sub-directory. However, this failed eventually because my Java installation didnot have the JNI bits. To ensure that I build only mod_jk and nothing else, I changed the build.xml file in jk/native, as follows: The build then failed trying to build native2. So I commented out the line in jk/build.xml that builds native2 as follows: This time the build was successful. However, I could not find any mod_jk.so. Instead, I found two files - libmod_jk.a, and mod_jk.la in jk/build/jk/apache13 sub-directory. I also found the following files in the jk/build/jk/apache13/.libs sub-directory : libmod_jk.a libmod_jk.exp libmod_jk.so.0 mod_jk.la mod_jk.lai I manually copied libmod_jk.so.0 to apache/libexec/mod_jk.so, and tried running (after appropriate changes to httpd.conf): apachectl configtest I got a coredmp as follows: 33 terptech[]/teur/cre/erptech/wrk/dibyendu/apache/bin: apachectl configtest /teur/cre/erptech/wrk/dibyendu/apache/bin/apachectl[145]: 35908 Segmentation fault(coredump) At this point, I gave up on this approach and tried another route. 3. My next attempt was to build mod_jk using configure/make combination. After a number of false starts (due to problems in my installation of libtool and automake), I was able to execute following: cd jk/native ./buildconf.sh ./configure --with-apxs=$APACHE_HOME/bin/apxs make The build succeeded but, I could find no mod_jk.so. When I looked in jk/native/apache-1.3 sub-directory, I found: libjk.a libjk.la libjk.module libmod_jk.a mod_jk.c mod_jk.dsp mod_jk.la mod_jk.lo mod_jk.o At this point, I gave up this approach as well, and decided to try another. 4. My final attempt succeeded and this is what I did. I decided to build mod_jk.so directly using apxs and bypass the make/ant tools. I decided this because I found that the real problem was in "libtool" which was broken and didnot know how to build shared libraries on AIX. Hence, it was just not able to build mod_jk.so. My first attempt was as follows: cd jk/native/common $APACHE_HOME/bin/apxs -c -o mod_jk.so -I. *.c ../apache-1.3/mod_jk.c This failed to compile two files which appeared to be related to jni. I removed these two files (jk_jni_worker.c jk_jni_worker.h), and tried again. This time, the link failed with errors. Apparently, the AIX linker expected a .exp file containing a list of exported functions. Since I didnot have this, I decided to try the following linker options: -bexpall -berok -bnogc I added these options to apxs, as follows: my $CFG_LDFLAGS_SHLIB = q(-bexpall -berok -bnogc -H512 -T512 -bhalt:4 -bM:SRE -b noentry -bI:/teur/cre/erptech/wrk/dibyendu/apache/libexec/httpd.exp -lc); # subs tituted via Makefile.tmpl I ran the apxs command again. It succeeded and finally built mod_jk.so. I have tested mod_jk.so with the example servlets in tomcat - so far its worked okay without any problems. Regards Dibyendu -- To unsubscribe, e-mail: For additional commands, e-mail: