From owner-freebsd-java Thu May 3 12:29:23 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 0D8E737B424 for ; Thu, 3 May 2001 12:29: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 VAA01425; Thu, 3 May 2001 21:28:58 +0200 Message-Id: <200105031928.VAA01425@scoop.demon.nl> X-Sender: michel@pop3.scoop.demon.nl (Unverified) X-Mailer: QUALCOMM Windows Eudora Pro Version 4.0 Date: Thu, 03 May 2001 21:31:01 +0200 To: Pascal Echevest From: Michel Otte Subject: Re: Tomcat's mod_jk initialization error Cc: FreeBSD-Java@freebsd.org In-Reply-To: <3AF15C4C.7E5A5701@experian-scorex.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hello, Yes I've found the solution to this problem after a lot of searching in the tomcat-users mailing list archives. The problem is as follows: The Makefile for FreeBSD (Makefile.freebsd) does simply not compile all the objects which are needed for the shared object to link correctly. In detail, the Makefile only compiles the object mod_jk.o and only links that object into the mod_jk.so Apache shared object. You can reconstruct the Makefile to compile and link the other objects from the ../jk directory, or just compile the shared object by hand with the "apxs" tool. How you should do this, is explained in the - not very detailed - "mod_jk HOWTO" from the tomcat distribution. You should execute the following from the directory tomcat-3.2.1-src/src/native/apache1.3 : $APACHE_HOME/bin/apxs -c -I$JAVA_HOME/include -I$JAVA_HOME/include/freebsd -DFREEBSD -I$APACHE_HOME/include -I../jk mod_jk.c ../jk/*.c "$APACHE_HOME" should be the path to where you have your Apache is installed, for example /usr/local/apache. You should set $JAVA_HOME or replace it with the path to where your JDK version is installed, probably /usr/local/jdk1.2. I executed it as follows: /usr/local/apache/bin/apxs -c -I/usr/local/jdk1.2/include -I/usr/local/jdk1.2/include/freebsd -DFREEBSD -I/usr/local/apache/include -I../jk mod_jk.c ../jk/*.c The Makefile only executed: /usr/local/apache/bin/apxs -c -I/usr/local/jdk1.2/include -I/usr/local/jdk1.2/include/freebsd -DFREEBSD -I/usr/local/apache/include -I../jk mod_jk.c which produces a 18073 bytes mod_jk.so which is NOT usable. I MUST say I had tried this before and it failed, just because I didn't compile Apache with the options --enable-rule=SHARED_CORE. Stupid enough I hadn't tried this _after_ compiling Apache with a SHARED_CORE enabled. So please be sure to compile Apache with --enable-module=so and --enable-rule=SHARED_CORE, otherwise the compile with apxs will definitely fail. I hope this helps you and others. Kind regards, Michel Otte. At 15:25 3-5-01 +0200, you wrote: >Hi, > >I've just seen your message below and I would like >to ask you if you finally found a solution to this >problem. I've exactly the same problem and I cannot >solve it. > >Thanks and regards, >Pascal To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message