From owner-freebsd-java Sat Apr 14 5:11:25 2001 Delivered-To: freebsd-java@freebsd.org Received: from scoop.demon.nl (scoop.demon.nl [212.238.112.35]) by hub.freebsd.org (Postfix) with ESMTP id 9169F37B440 for ; Sat, 14 Apr 2001 05:11:19 -0700 (PDT) (envelope-from FreeBSD-Java@scoop.demon.nl) Received: from pentium.localnet.org (pentium.localnet.org [10.1.1.3]) by scoop.demon.nl (8.8.8/8.8.8) with SMTP id NAA09286 for ; Sat, 14 Apr 2001 13:07:29 +0200 Message-Id: <200104141107.NAA09286@scoop.demon.nl> X-Sender: michel@pop3.scoop.demon.nl (Unverified) X-Mailer: QUALCOMM Windows Eudora Pro Version 4.0 Date: Sat, 14 Apr 2001 13:09:50 +0200 To: freebsd-java@FreeBSD.ORG From: Michel Otte Subject: Re: Tomcat's mod_jk initialization error In-Reply-To: <20010414033859.A16352@misty.eyesbeyond.com> References: <200104111816.UAA03748@scoop.demon.nl> <200104111816.UAA03748@scoop.demon.nl> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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