[prev in list] [next in list] [prev in thread] [next in thread]
List: freebsd-java
Subject: Re: Tomcat's mod_jk initialization error
From: Michel Otte <FreeBSD-Java () scoop ! demon ! nl>
Date: 2001-04-14 11:09:50
[Download RAW message or body]
Hello,
In general, I used the directions I found on this mailing list to modify
the Makefile and to compile mod_jk. The Makefile I used looks like this:
### jakarta-tomcat-3.2.1/src/native/apache1.3/Makefile
## You need to edit this file - configure later :-)
APACHE_HOME=/usr/local/apache
OS=freebsd
APXS=${APACHE_HOME}/bin/apxs
A13_FLAGS=-I${APACHE_HOME}/include
## I assume this one is set up already
JAVA_HOME=/usr/local/jdk1.2.2
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
CFLAGS=-DHAVE_CONFIG_H -g -fpic -DSHARED_MODULE -O2 -D_REENTRANT -pthread
-DFREEBSD -Wall
JK=../jk/
SRCS=jk_ajp12_worker.c jk_connect.c jk_msg_buff.c jk_util.c jk_ajp13.c \
jk_jni_worker.c jk_pool.c jk_worker.c jk_ajp13_worker.c jk_lb_worker.c \
jk_sockbuf.c jk_map.c jk_uri_worker_map.c
OBJS=${patsubst %.c,%.o,${SRCS}}
%.o: ../jk/%.c
${CC} -c ${CFLAGS} ${JAVA_INCL} ${A13_FLAGS} $< -o $@
.c.o:
${APXS} -c ${JAVA_INCL} -DFREEBSD ${A13_FLAGS} -I../jk $<
all: mod_jk.so
mod_jk.so: ${OBJS} mod_jk.o
$(APXS) -c -o mod_jk.so ${OBJS} mod_jk.o
# $(CC) -shared -o mod_jk.so ${OBJS} mod_jk.o
clean:
rm *.o *.so
### EOF
I compiled the module by running "make all" in the current directory.
My Apache install is in /usr/local/apache, the include directory there
exsists. My JDK install is not really "standard". After compiling JDK1.2.2
and running "make install" I saw that running make with "-DNODEBUG" was
needed to compile the JDK without DEBUG support, which - I suppose - would
be better for performance. So I moved the old compile version to
jdk1.2.2_debug and the new compile version to jdk1.2.2_nodebug and made
soft link to the preferred version. Right now I'm in doubt if there's any
difference between the two compiles, but that's not really important.
Anyway, the $JAVA_HOME/include directory exists, as well as the
$JAVA_HOME/include/freebsd directory. The compile succeeded, but the module
was unusable. So I changed:
CFLAGS=-DHAVE_CONFIG_H -g -fpic -DSHARED_MODULE -O2 -D_REENTRANT -pthread
-DFREEBSD -Wall
into:
CFLAGS=-DHAVE_CONFIG_H -g -fpic -DSHARED_MODULE -O2 -DFREEBSD -Wall
The new compiled module was exactly the same size, and also unusable. After
that, I removed the ${A13_FLAGS} from the object parameters, so it looked
like:
%.o: ../jk/%.c
${CC} -c ${CFLAGS} ${JAVA_INCL} $< -o $@
.c.o:
${APXS} -c ${JAVA_INCL} -DFREEBSD -I../jk $<
Anyway, I thought that apxs should take care of the ${A13_FLAGS}, but I'm
only guessing this. Again, a compile with this Makefile resulted in an
exactly the same size mod_jk.so, and was unusable. Of course I've tried any
possible combination of these changes, all with the same effect. I'm far
from an expert in C language or in constructing Makefile's, as you probably
have noticed already.
Any clues are very much appreciated.
Kind regards,
Michel Otte
At 03:39 14-4-01 +0930, Greg Lewis wrote:
>How are you compiling mod_jk? There was a discussion a few weeks ago on
>the list about the patches needed for the Makefile to get things compiled
>correctly. I'd suggest searching the archives to compare the hacks you've
>made.
>
>I've got Tomcat working through mod_jk with pretty much the above set up
>FWIW.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic