Date: Fri, 9 Mar 2001 21:27:18 +0900 (JST) From: Daichi GOTO <daichi@ongs.gr.jp> To: Tim Zingelman <zingelman@fnal.gov> Cc: freebsd-java@FreeBSD.ORG Subject: Re: Tomcat for BSD (was: RE: Trying to Create a simple Bean) Message-ID: <84744572.984140838459.JavaMail.daichi@localhost> In-Reply-To: <Pine.GSO.4.30.0103081437590.15709-400000@nova.fnal.gov>
next in thread | previous in thread | raw e-mail | index | archive | help
(snip) > You will also need to build a mod_jk.o shared library to hook tomcat to > apache... here's the diff to the makefile included in the apache tarball: > jakarta-tomcat-3.2.1-src.tar.gz (snip) > jakarta-tomcat-3.2.1-src/src/native/apache1.3/Makefile.freebsd > (snip) > +OS=linux > +APXS=/usr/local/sbin/apxs (snip) > -CFLAGS=-DHAVE_CONFIG_H -g -fpic -DSHARED_MODULE -O2 -D_REENTRANT > -pthread -DLINUX -Wall > +CFLAGS=-DHAVE_CONFIG_H -g -fpic -DSHARED_MODULE -O2 -pthread -DFREEBSD > -Wall (snip) > %.o: ../jk/%.c > - ${CC} -c ${CFLAGS} ${JAVA_INCL} ${A13_FLAGS} $< -o $@ > + ${CC} -c ${CFLAGS} ${JAVA_INCL} $< -o $@ > > .c.o: > - ${APXS} -c ${JAVA_INCL} -DFREEBSD ${A13_FLAGS} -I../jk $< > + ${APXS} -c ${JAVA_INCL} -DFREEBSD -I../jk $< Please teach me why your patch leads success to run apache-tomcat on FreeBSD. I am wondering that your patch leads success without pthread install. I have made patch to run apache-tomcat as follow: ------------ diff -urP native/apache1.3/Makefile.orig native/apache1.3/Makefile --- native/apache1.3/Makefile.orig Thu Jan 1 09:00:00 1970 +++ native/apache1.3/Makefile Sun Mar 4 03:42:30 2001 @@ -0,0 +1,39 @@ +## You need to edit this file - configure later :-) + +#APACHE_HOME=/usr/local/apache +OS=freebsd +APXS=/usr/local/sbin/apxs + +A13_FLAGS=-I/usr/local/include/apache + +## 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 -DLINUX -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) -L/usr/local/lib -lpthread -c -o mod_jk.so ${OBJS} mod_jk.o + +# $(CC) -shared -o mod_jk.so ${OBJS} mod_jk.o + +clean: + rm *.o *.so diff -urP native/jk/jk_util.c.orig native/jk/jk_util.c --- native/jk/jk_util.c.orig Wed Dec 13 07:51:56 2000 +++ native/jk/jk_util.c Sun Mar 4 03:42:21 2001 @@ -90,6 +90,8 @@ #define HUGE_BUFFER_SIZE (8*1024) #define LOG_LINE_SIZE (1024) +#define fdatasync(param1) (fsync(param1)) + struct file_logger { FILE *logfile; }; ------------ And this patch requres pth(/usr/deve/pth) before gmake all. And the mod_jk.so genereted by above works fine. But your patch do not requre pthead. But that works fine. There are some magic? Daichi T.GOTO(ONGS) http://www.ongs.net/daichi, daichi@ongs.gr.jp To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?84744572.984140838459.JavaMail.daichi>