tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dibyendu Majumdar" <>
Subject Building mod_jk on AIX 4.3.3
Date Thu, 12 Sep 2002 22:15:23 GMT
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 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:

<project name="jk_native" default="apache13" basedir=".">

The build then failed trying to build native2. So I commented out the line
in jk/build.xml that builds native2 as follows:

    <!-- It's better to call it directly with individual tags -->
    <target name="native" depends="jkant,detect,report" >
        <ant  dir="native" antfile="build.xml"  />
        <!-- <ant  dir="native2" antfile="build.xml"  /> -->

This time the build was successful. However, I could not find any
Instead, I found two files - libmod_jk.a, and in
jk/build/jk/apache13 sub-directory. I also found the following files in the
jk/build/jk/apache13/.libs sub-directory :

I manually copied to apache/libexec/, 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

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
./configure --with-apxs=$APACHE_HOME/bin/apxs

The build succeeded but, I could find no When I looked in
jk/native/apache-1.3 sub-directory, I found:


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 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

My first attempt was as follows:

cd jk/native/common
$APACHE_HOME/bin/apxs -c -o -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:

q(-bexpall -berok -bnogc -H512 -T512 -bhalt:4 -bM:SRE -b
noentry -bI:/teur/cre/erptech/wrk/dibyendu/apache/libexec/httpd.exp -lc); #
tituted via Makefile.tmpl

I ran the apxs command again. It succeeded and finally built

I have tested with the example servlets in tomcat - so far its
worked okay without any problems.


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

View raw message