I have been trying to do this for some time now, and have been frustrated by
how little info is out there to solve this particular problem. It's
especially difficult on this platform because there are certain changes that
need to be made that are not intuitive at all (at least to me). So I thought
I'd send this info for those who have been in the same boat as me (or are
just as stupid).

Environment:
------------------
IBM AIX 4.3.3
IBM C and C++ compilers version 3.something
Apache 1.3.14
Tomcat 3.1

According to the tomcat user guide, all you need to do is apxs -c -o
mod_jserv.so *.c. 

Not so. This produces compiling errors (C++ comments not recognized) and
linking errors (can't find exports file). The apxs file tha's created with
the apache installation has insufficient options for the IBM compiler.

To solve this, do the following:

1. Open the apxs file

2. Add the option -qcpluscmt to the compiler options line so it looks like
this:
my $CFG_CFLAGS = ' -DAIX=43 -U__STR__ -DAIX_BIND_PROCESSOR -qcpluscmt
-qnogenpcomp -qnousepcomp -DUSE_HSREGEX `../apaci`';        

3. Change the linker options line so it looks like this:
my $CFG_LDFLAGS_SHLIB = q(-H512 -T512 -bhalt:4 -bM:SRE -bnoentry
-bE:mod_jserv.exp -bI:/path/to/apache/libexec/httpd.exp -lc); 
Note: Replace -bE:`echo.....` with -bE:mod_jserv.exp

4. Create a file 'mod_jserv.exp' in /path/to/tomcat/src/native/apache/jserv
containing the lines:
#! /path/to/apache/libexec/mod_jserv.so
jserv_module 
This is the exports file the linker needs.

5. cd to /path/to/tomcat/src/native/apache/jserv and run
/path/to/apache/apxs  -c -o mod_jserv.so *.c. 

You should end up with a compiled mod_jserv.so in the current directory.

Note that I'm not a C programmer by any stretch of imagination, so if you
find a way to do this with one command, let me know how. 
And thanks to Cristoph Leser for help.

Rit


--------------------------------------
Ritwick Dhar

Research & Development
M&I Eastpoint Technology
Bedford, NH
603.647.2030
--------------------------------------

Reply via email to