You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ron Wolf <RW...@getthere.com> on 2001/05/16 22:20:47 UTC
Problem compiling mod_jk for Solaris
Hi, All!
I'm having a problem getting mod_jk compiled for Solaris.
Here's my setup:
Solaris 2.6
apache 1.3.13 (I know it's old, but it's what we're
using in production, so until that
changes, it's what I have to work with)
Apache was compiled with mod_so enabled and with OpenSSL
tomcat 3.2.1
Java 1.3_0_02
I took our standard apache 1.3.13 with OpenSSL and mod_so
compiled in, have it running and serving pages through https.
I downloaded and installed j2sdk1_3_0_02 and associated
patches.
I applied the patches, and installed java.
I downloaded tomcat 3.2.1, installed it, and have it running correctly on
port 8080.
I downloaded the tomcat source for 3.2.1, and extracted the tar
ball. went to <tomcat-src>/src/native/apache1.3
I read the how-to page at:
http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/mod_jk-howto.html
Which said to use the following command:
apxs -o mod_jk.so -DSOLARIS -I../jk -I/usr/java/include
-I/usr/java/include/solaris -c *.c ../jk/*.c
I, of course, changed it for my environment to read:
apxs -o mod_jk.so -DSOLARIS -I../jk -I/usr/java2/include
-I/usr/java2/include/solaris -c *.c ../jk/*.c
Here's where things started going wrong. The link stage to
take the corresponding object files (*.o) and create the shared
object (mod_jk.so) failed. After much reading in the archives
of this mail list and other resources, and much trial and
error, I modified the apxs script to use "ld" with the "-G"
flag, (which also failed). Finally I used a manual command to
create the *.so file from the object files since the command
generated by apxs were looking in the wrong directory for the
*.o files.
Now, finally, I have a mod_jk.so file. I move it into the
libexec directory under the apache server, put the "Include"
line into the httpd.conf file to get the tomcat auto-generated
file, "mod_jk.conf-auto" (per the instructions).
I started the tomcat server, and started the apache server, and
got another error message. With more research, I found (in the
how-to file) the following explanation of that problem.
It said "On some systems, this will build the module correctly,
but will fail at runtime with a "symbol "fdatasync" not found".
To fix, add -lposix4 just before the -c in the above command".
So I recompiled the mod_jk.so file again with the "-lposix4"
flag and tried again. (stopping both servers, and restarting)
Now I received a slightly different error. After searching the
archives again, and finding nothing. I decided the time has
come to consult my fellow strugglers. Here's the error message
I received this time:
[Wed May 16 15:10:18 2001] [debug] apache_ssl.c(355): Random input
/dev/urandom(1024) -> 0
Syntax error on line 8 of
/apacheSSL/jakarta-tomcat-3.2.1/conf/mod_jk.conf-auto:
Can't locate API module structure `jk_module' in file
/apacheSSL/libexec/mod_jk.so: ld.so.1: /apacheSSL/bin/httpsd: fatal:
jk_module: can't find symbol
Now, I've also looked through the source file, mod_jk.c, and the
definition of jk_module is there, so I can't figure out why it's
complaining that it can't find the symbol.
Please help.
Thanks.
Ron
--
Ron Wolf
http://www.getthere.com
rwolf@getthere.com
(972) 277-3869