Here's an excerpt from the notes I made when I did this for SunOS 5.7 a few
months ago. I hope it helps:
"For the Solaris 7 server with the gcc compiler, the command was:
/usr/local/apache/bin/apxs -o mod_jk.so -c -I /usr/java/include -I
/usr/java/include/solaris -I ../jk -DSOLARIS -l posix4 *.c ../jk/*.c
Please note that the order in which the options are listed is critical.
I originally got a clean compile with the "-l posix4" option in front of
the "-DSOLARIS" option; however, Apache wouldn't start, and generated the
following error:
"Cannot load /usr/local/apache/libexec/mod_jk.so into server: ld.so.1:
/usr/local/apache/bin/httpd: f
atal: relocation error: file /usr/local/apache/libexec/mod_jk.so: symbol
fdatasync: referenced symbol not found"
When the positions of the two options were flipped, the size of "mod_jk.so"
changed from 141'808 to 141'880, and Apache started."
At 01:50 PM 4/4/01 -0400, Xiaoyu Zhang wrote:
>Hi All,
>
>I tried to configuring Apache 1.3.17 to use mod_jk compiled from tomcat
>3.2.1, my platform is SunOS 5.6. Under TOMCAT_HOME/src/native/apache1.3, I
>run the following command to compile the code:
> apxs -o mod_jk.so -DSOLARIS -I../jk -I/usr/java/include
> -I/usr/java/include/solaris -c *.c ../jk/*.c
>
>Then I copied mod_jk.so to APACHE_HOME/libexec . Modified httpd.conf to
>include mod_jk.conf-auto from TOMCAT_HOME. At runtime, I got symbol
>"fdatasync" not found error. Then I added -lposix4, recompiled tomcat
>source code with following command :
> apxs -o mod_jk.so -DSOLARIS -I../jk -I/usr/java/include
> -I/usr/java/include/solaris -lposix4 -c *.c ../jk/*.c
>
>At the run time, I got another error as following
>
>Cannot load /rims-app/apache/libexec/mod_jk.so into server: ld.so.1:
>/rims-app/apache/bin/httpd: fatal: relocation error: file
>/rims-app/apache/libexec/mod_jk.so: symbol ap_psprintf: referenced symbol
>not found
>./apachectl start: httpd could not be started
>
>Any suggestion or hint will be appreciated.
>
>Thanks.
>Xiaoyu