Apache 2.0 + Tomcat 4.1 + mod_jk build on FreeBSD 4.4
Matthew Seaman
m.seaman at infracaninophile.co.uk
Mon Mar 28 23:02:11 PST 2005
On Fri, Mar 25, 2005 at 09:08:42AM -0500, Danny Rubis wrote:
> Can you direct me to someone who can give some clues about
> this "jakarta-tomcat-connectors-1.2.8-src" (mod_jk) build error
> message:
>
> /bin/sh /usr/local/share/apache2/build/libtool --silent --mode=install
> cp `pwd`/mod_jk.so
> libtool: install: you must specify a destination
> Try `libtool --help --mode=install' for more information.
> *** Error code 1
>
> Notice the cp `pwd`/mod_jk.so
>
> Seems something is missing after the cp. Hmm. But what?
>
> mod_jk is the connector between Apache and Tomcat. It handles
> the passoff of JSP requests from Apache webserver to Tomcat
> servlet engine.
As I recall, this error comes about because the autoconf stuff in
mod_jk doesn't find the location of some C header files included with
the JDK. Typical value should be something like:
/usr/local/jdk1.4.2/include
However, passing this value on the configure command line does not
work, which seems to be a bug in the mod_jk-1.2.8 autoconf stuff that
I don't have enough autoconf-fu to be able to fix. Instead, you need
to define JAVA_HOME in the environment before running configre.
I've attached a diff against the www/mod_jk port (currently
mod_jk-1.2.6) which works for me. I have submitted this to the mod_jk
port maintainer but he says he's getting strange slowdowns from
mod_jk-1.2.8, so he's not happy about committing it. This patch also
adds a build dependency on Java to the port. Personally I haven't
seen any slowdown problems. I guess the upshot is: use at your own
risk.
Cheers,
Matthew
--
Dr Matthew J Seaman MA, D.Phil. 8 Dane Court Manor
School Rd
PGP: http://www.infracaninophile.co.uk/pgpkey Tilmanstone
Tel: +44 1304 617253 Kent, CT14 0JL UK
-------------- next part --------------
diff -Nur /usr/ports/www/mod_jk/Makefile mod_jk/Makefile
--- /usr/ports/www/mod_jk/Makefile Mon Dec 6 09:38:40 2004
+++ mod_jk/Makefile Thu Feb 17 15:47:33 2005
@@ -6,17 +6,22 @@
#
PORTNAME= mod_jk
-PORTVERSION= 1.2.6
+PORTVERSION= 1.2.8
PORTEPOCH?= 1
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_APACHE_JAKARTA}
-MASTER_SITE_SUBDIR= tomcat-connectors/jk/source
-DISTNAME= jakarta-tomcat-connectors-jk-${PORTVERSION}-src
+MASTER_SITE_SUBDIR= tomcat-connectors/jk/source/jk-${PORTVERSION}
+DISTNAME= jakarta-tomcat-connectors-${PORTVERSION}-src
MAINTAINER?= girgen at FreeBSD.org
COMMENT?= Apache JK module for connecting to Tomcat using AJP1X
USE_APACHE= YES
+USE_JAVA= YES
+JAVA_BUILD= YES
+
+SUB_FILES= pkg-message mod_jk.conf.sample
+SUB_LIST+= "APACHE_CONF=${APACHE_CONF}"
.include <bsd.port.pre.mk>
@@ -36,15 +41,15 @@
.endif
APACHE_CONF= ${LOCALBASE}/etc/apache${APACHE2}
-WRKSRC= ${WRKDIR}/jakarta-tomcat-connectors-jk-${PORTVERSION}-src/jk/native
+WRKSRC= ${WRKDIR}/jakarta-tomcat-connectors-${PORTVERSION}-src/jk/native
USE_GMAKE= YES
GNU_CONFIGURE= YES
+CONFIGURE_ENV= JAVA_HOME=${JAVA_HOME}
CONFIGURE_ARGS+= --with-apxs=${APXS}
do-install:
${APXS} -i -A -n jk ${WRKSRC}/apache-${APACHE_VER}/mod_jk.so
- ${SED} -e "s#%%APACHE_CONF%%#${APACHE_CONF}#g" ${FILESDIR}/mod_jk.conf.sample > ${WRKDIR}/mod_jk.conf.sample
${INSTALL_DATA} ${WRKDIR}/mod_jk.conf.sample ${APACHE_CONF}
${INSTALL_DATA} ${FILESDIR}/workers.properties.sample ${APACHE_CONF}
diff -Nur /usr/ports/www/mod_jk/distinfo mod_jk/distinfo
--- /usr/ports/www/mod_jk/distinfo Thu Nov 25 13:23:57 2004
+++ mod_jk/distinfo Tue Feb 8 14:56:48 2005
@@ -1,2 +1,2 @@
-MD5 (jakarta-tomcat-connectors-jk-1.2.6-src.tar.gz) = 018b91a0ce874cbc3dae7700f452838b
-SIZE (jakarta-tomcat-connectors-jk-1.2.6-src.tar.gz) = 849481
+MD5 (jakarta-tomcat-connectors-1.2.8-src.tar.gz) = eb579c47f8dd71e526d7561c919ce06d
+SIZE (jakarta-tomcat-connectors-1.2.8-src.tar.gz) = 798199
diff -Nur /usr/ports/www/mod_jk/files/mod_jk.conf.sample mod_jk/files/mod_jk.conf.sample
--- /usr/ports/www/mod_jk/files/mod_jk.conf.sample Wed Jun 11 11:30:58 2003
+++ mod_jk/files/mod_jk.conf.sample Thu Jan 1 01:00:00 1970
@@ -1,14 +0,0 @@
-# Replace jsp-hostname with the hostname of your JSP server, as
-# specified in workers.properties.
-#
-<IfModule mod_jk.c>
- JkWorkersFile %%APACHE_CONF%%/workers.properties
- JkLogFile logs/jk.log
- JkLogLevel warn
-
- # Sample JkMounts. Replace these with the paths you would
- # like to mount from your JSP server.
- JkMount /*.jsp jsp-hostname
- JkMount /servlet/* jsp-hostname
- JkMount /examples/* jsp-hostname
-</IfModule>
diff -Nur /usr/ports/www/mod_jk/files/mod_jk.conf.sample.in mod_jk/files/mod_jk.conf.sample.in
--- /usr/ports/www/mod_jk/files/mod_jk.conf.sample.in Thu Jan 1 01:00:00 1970
+++ mod_jk/files/mod_jk.conf.sample.in Wed Jun 11 11:30:58 2003
@@ -0,0 +1,14 @@
+# Replace jsp-hostname with the hostname of your JSP server, as
+# specified in workers.properties.
+#
+<IfModule mod_jk.c>
+ JkWorkersFile %%APACHE_CONF%%/workers.properties
+ JkLogFile logs/jk.log
+ JkLogLevel warn
+
+ # Sample JkMounts. Replace these with the paths you would
+ # like to mount from your JSP server.
+ JkMount /*.jsp jsp-hostname
+ JkMount /servlet/* jsp-hostname
+ JkMount /examples/* jsp-hostname
+</IfModule>
diff -Nur /usr/ports/www/mod_jk/files/patch-common::jk_mt-h mod_jk/files/patch-common::jk_mt-h
--- /usr/ports/www/mod_jk/files/patch-common::jk_mt-h Wed Sep 24 09:55:01 2003
+++ mod_jk/files/patch-common::jk_mt-h Tue Feb 8 15:01:10 2005
@@ -4,7 +4,7 @@
* All WIN32 code is MT, UNIX code that uses pthreads is marked by the POSIX
* _REENTRANT define.
*/
--#if defined (WIN32) || defined(_REENTRANT)
+-#if defined (WIN32) || defined(_REENTRANT) || defined(NETWARE)
+#if defined (WIN32) || ( defined(FREEBSD_THREAD_HACK) && defined(_THREAD_SAFE) )
/*
diff -Nur /usr/ports/www/mod_jk/files/pkg-message.in mod_jk/files/pkg-message.in
--- /usr/ports/www/mod_jk/files/pkg-message.in Thu Jan 1 01:00:00 1970
+++ mod_jk/files/pkg-message.in Thu Feb 10 22:51:52 2005
@@ -0,0 +1,5 @@
+*****************************************************************************
+Make sure mod_jk.so is enabled in %%APACHE_CONF%%/httpd.conf and
+mod_jk is configured. Have a look at
+%%APACHE_CONF%%/mod_jk.conf.sample for an example.
+*****************************************************************************
diff -Nur /usr/ports/www/mod_jk/pkg-message mod_jk/pkg-message
--- /usr/ports/www/mod_jk/pkg-message Wed Jun 11 11:30:58 2003
+++ mod_jk/pkg-message Thu Jan 1 01:00:00 1970
@@ -1,5 +0,0 @@
-*****************************************************************************
-Make sure mod_jk.so is enabled in /usr/local/etc/apache/httpd.conf and
-mod_jk is configured. Have a look at
-/usr/local/etc/apache/mod_jk.conf.sample for an example.
-*****************************************************************************
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 305 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20050328/aaeaf0a4/attachment.bin
More information about the freebsd-questions
mailing list