Hi all,
I am new to this list but I have browsed through the archives on
jakarta.apache.org to see if I could find a solution to my problem.
I am trying to compile mod_jk.so on Solaris 2.6 for Tomcat 3.2.3 and
Apache 1.3.20.
Following information in the other posts related to this subject and
the documentation on apache.org or that I have found elsewhere,
I have modified the config section of the apxs script as follows :
"
my $CFG_TARGET = q(httpd);
my $CFG_CC = q(gcc);
my $CFG_CFLAGS = q( -DSOLARIS2=260 -DMOD_PERL -DUSE_PERL_SSI \
-DUSE_EXPAT -I../lib/expat-lite `../apaci`);
my $CFG_CFLAGS_SHLIB = q(-fPIC);
my $CFG_LD_SHLIB = q(ld);
my $CFG_LDFLAGS_SHLIB = q(); # I don't use -G
my $CFG_LIBS_SHLIB = q();
my $CFG_PREFIX = q(/usr/local/apache);
my $CFG_SBINDIR = q(/usr/local/apache/bin);
my $CFG_INCLUDEDIR = q(/usr/local/apache/include);
my $CFG_LIBEXECDIR = q(/usr/local/apache/libexec);
my $CFG_SYSCONFDIR = q(/usr/local/apache/conf);
"
And I am using this makefile :
"
## I assume this one is set up already
# JAVA_HOME=
OS=solaris
JAVA_INCL=-I ${JAVA_HOME}/include -I ${JAVA_HOME}/include/${OS}
JAVA_LIB=-L ${JAVA_HOME}/jre/lib/${ARCH} \
-L ${JAVA_HOME}/lib/${ARCH}/native_threads
#ifndef APXS
APXS=/usr/local/apache/bin/apxs
#endif
SYSLIBS=
APACHE_LIBS=
JK=../jk/
SRCS=../jk/jk_ajp12_worker.c ../jk/jk_connect.c ../jk/jk_msg_buff.c \
../jk/jk_util.c ../jk/jk_ajp13.c ../jk/jk_jni_worker.c ../jk/jk_pool.c \
../jk/jk_worker.c ../jk/jk_ajp13_worker.c ../jk/jk_lb_worker.c \
../jk/jk_sockbuf.c ../jk/jk_map.c ../jk/jk_uri_worker_map.c
all: mod_jk.so
mod_jk.so:
$(APXS) -I ../jk ${JAVA_INCL} ${SYSLIBS} ${APACHE_LIBS} -c -o $@
\
mod_jk.c $(SRCS)
clean:
rm *.o *.so
"
This is quite close to Makefile.linux, on which it's based. If I use it
as it is there, "ld" complains about dozens of undefined symbols (eg
"ap_pnsprintf()", etc...).
So, armed with "nm", I had a look at all the ".a" and ".o" files
generated when compiling Apache, and it appears that by adding :
"
SYSLIBS=-l posix4 -l socket -l nsl
APACHE_LIBS=-L ${APACHE_HOME}/src/ap \
-L ${APACHE_HOME}/src/lib/expat-lite -L ${APACHE_HOME}/src/main \
-L ${APACHE_HOME}/src/modules/standard -L ${APACHE_HOME}/src/os/unix \
-lstandard -lmain -lap -lexpat -los
"
and "${APACHE_HOME}/src/modules.c ${APACHE_HOME}/src/buildmark.c" to
SRCS, I get rid of all these undefined symbols.
This is really bizarre since nobody on this list seems to have had to
do that to compile mod_jk.
Unfortunately, link still fails, but with this message this time :
"
ld: warning: cannot find entry symbol _start; defaulting to 00013448
/usr/local/apache/src/ap/libap.a(ap_snprintf.o): In function
`conv_p2_quad':
ap_snprintf.o(.text+0x1378): undefined reference to `__lshrdi3'
"
What really loses me here is that __lshrdi3 is nowhere to be found in
ap_snprintf.c !
So does anybody know what I am missing here ? I would be most grateful
if somebody could give me an hand ;-)
Compiled mod_jk for Solaris 2.6 would be appreciated, as those I have
found on the Net are either for Solaris 8 or make apache core-dump.
No need to say I am really looking forward to Solaris binaries being
provided on the Jakarta web site 8:)
Thanks a lot.
Fabrice