tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jean-frederic clere <jfrederic.cl...@fujitsu-siemens.com>
Subject Re: [VOTE] JK2 2.1
Date Wed, 02 Oct 2002 07:21:13 GMT
Henri Gomez wrote:
> More comments on APR and JK2.
> 
> While making tomcat-connectors rpm for jk2, and also
> jk2 binaries for Linux, I wanted to have apache 1.3 jk2
> built with JNI support.
> 
> JNI support in JK2 requires APR.
> 
> So I build an apr 0.9.1 rpm, which include apr-utils
> since apr-utils couldn't be built without apr ;-[
> 
> To avoid conflict with Apache 2.0 rpms, I've installed
> apr libs in /usr/lib/apr/ and includes in /usr/include/apr.
> 
> And here we allready discover many interesting things :
> 
> With Apache 2.0, libapr shared lib in name libapr.so.0.9.2.
> With APR build, it's called libapr-0.so.0.9.2.
> 
> What you see also is that is seems that parts of apr-utils
> are included in Apache2 binaries (ie md5 stuff), so when
> you're using APR libs, you should add apr and aprutils to
> ldpath (-lapr -laprutils).
> 
> With that I was thinking being ready to make Apache 1.3
> works with APR, for JNI use purposes.
> 
> I've used :
> 
> ./configure --with-apxs=/usr/sbin/apxs --with-jni 
> --with-apr-lib=/usr/lib/apr --with-apr-include=/usr/include/apr
> 
> The build works but I saw that the mod_jk2.so was linked against
> /usr/lib/libapr.so (the one from Apache 2.0 built) against the one
> in /usr/lib/arp.
> 
> So I patched Makefile.in to change -lapr to -lapr-0.
> 
> here correct build and link.

That is not enough you should use apr-config.
I have already patched mod_webapp for that.

> 
> But the JNI support was still not there since the Makefile.in need
> a little rework. I tried first to use and adapt the one from Apache 2.0
> but this one didn't works since Apache 2.0.42 provide it's own libtool 
> 1.4.2 and make use of rpath, which didn't works with the standard 
> libtool 1.4 bundled with Redhat 7.2
> 
> No problem, I adapted the original Makefile.in from Apache 1.3 (patch
> attached) and do the build.
> 
> I finally got a mod_jk2.so and jkjni.so to be used with my Apache 1.3.
> 
> I installed mod_jk2.so and jkjni.so in Apache 1.3 modules dir, 
> /usr/lib/apache, tried a restart but it failed with :
> 
> Starting httpd: Syntax error on line 1536 of /etc/httpd/conf/httpd.conf:
> Cannot load /etc/httpd/modules/mod_jk2.so into server: 
> /etc/httpd/modules/mod_jk2.so: undefined symbol: jk_jni_status_code
> 
> Urg, I think it could be related to missing stuff in mod_jk2.so, since 
> it's not linked against apr-util shared lib, so I rechange the 
> Makefile.in, does the configure and make.
> 
> But still same error :
> 
> Cannot load /etc/httpd/modules/mod_jk2.so into server: 
> /etc/httpd/modules/mod_jk2.so: undefined symbol: jk_jni_status_code
> 
> 
> When I take a look at binaries, the jkjni.so for Apache 2 is 126180
> long but the one for Apache 1.3 is only 8796 ?
> 
> Here is was ldd -v report about mod_jk2.so / jkjni.so for Apache 1.3 and
> 2.0 :
> 
> mod_jk2.so for Apache 1.3
> 
>     libcrypt.so.1 => /lib/libcrypt.so.1 (0x4002f000)
>     libapr-0.so.0 => /usr/lib/apr/libapr-0.so.0 (0x4005c000)
>     libaprutil-0.so.0 => /usr/lib/apr/libaprutil-0.so.0 (0x4007a000)
>     libc.so.6 => /lib/i686/libc.so.6 (0x4008f000)
>     /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
> 
>     Version information:
>     /usr/lib/apache/mod_jk2.so:
>         libc.so.6 (GLIBC_2.1.3) => /lib/i686/libc.so.6
>         libc.so.6 (GLIBC_2.1) => /lib/i686/libc.so.6
>         libc.so.6 (GLIBC_2.0) => /lib/i686/libc.so.6
>     /lib/libcrypt.so.1:
>         libc.so.6 (GLIBC_2.1.3) => /lib/i686/libc.so.6
>         libc.so.6 (GLIBC_2.0) => /lib/i686/libc.so.6
>     /usr/lib/apr/libapr-0.so.0:
>         libc.so.6 (GLIBC_2.1.3) => /lib/i686/libc.so.6
>         libc.so.6 (GLIBC_2.2) => /lib/i686/libc.so.6
>         libc.so.6 (GLIBC_2.1.2) => /lib/i686/libc.so.6
>         libc.so.6 (GLIBC_2.1) => /lib/i686/libc.so.6
>         libc.so.6 (GLIBC_2.0) => /lib/i686/libc.so.6
>     /usr/lib/apr/libaprutil-0.so.0:
>         libc.so.6 (GLIBC_2.1.3) => /lib/i686/libc.so.6
>         libc.so.6 (GLIBC_2.1) => /lib/i686/libc.so.6
>         libc.so.6 (GLIBC_2.0) => /lib/i686/libc.so.6
>     /lib/i686/libc.so.6:
>         ld-linux.so.2 (GLIBC_2.1.1) => /lib/ld-linux.so.2
>         ld-linux.so.2 (GLIBC_2.2.3) => /lib/ld-linux.so.2
>         ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2
>         ld-linux.so.2 (GLIBC_2.2) => /lib/ld-linux.so.2
>         ld-linux.so.2 (GLIBC_2.0) => /lib/ld-linux.so.2
>     libcrypt.so.1 => /lib/libcrypt.so.1 (0x40012000)
>     libapr-0.so.0 => /usr/lib/apr/libapr-0.so.0 (0x4003f000)
>     libaprutil-0.so.0 => /usr/lib/apr/libaprutil-0.so.0 (0x4005d000)
>     libc.so.6 => /lib/i686/libc.so.6 (0x40072000)
>     /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
> 
> jkjni.so for Apache 1.3
> 
>     Version information:
>     /usr/lib/apache/jkjni.so:
>         libc.so.6 (GLIBC_2.1.3) => /lib/i686/libc.so.6
>         libc.so.6 (GLIBC_2.0) => /lib/i686/libc.so.6
>     /lib/libcrypt.so.1:
>         libc.so.6 (GLIBC_2.1.3) => /lib/i686/libc.so.6
>         libc.so.6 (GLIBC_2.0) => /lib/i686/libc.so.6
>     /usr/lib/apr/libapr-0.so.0:
>         libc.so.6 (GLIBC_2.1.3) => /lib/i686/libc.so.6
>         libc.so.6 (GLIBC_2.2) => /lib/i686/libc.so.6
>         libc.so.6 (GLIBC_2.1.2) => /lib/i686/libc.so.6
>         libc.so.6 (GLIBC_2.1) => /lib/i686/libc.so.6
>         libc.so.6 (GLIBC_2.0) => /lib/i686/libc.so.6
>     /usr/lib/apr/libaprutil-0.so.0:
>         libc.so.6 (GLIBC_2.1.3) => /lib/i686/libc.so.6
>         libc.so.6 (GLIBC_2.1) => /lib/i686/libc.so.6
>         libc.so.6 (GLIBC_2.0) => /lib/i686/libc.so.6
>     /lib/i686/libc.so.6:
>         ld-linux.so.2 (GLIBC_2.1.1) => /lib/ld-linux.so.2
>         ld-linux.so.2 (GLIBC_2.2.3) => /lib/ld-linux.so.2
>         ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2
>         ld-linux.so.2 (GLIBC_2.2) => /lib/ld-linux.so.2
>         ld-linux.so.2 (GLIBC_2.0) => /lib/ld-linux.so.2
>     libc.so.6 => /lib/i686/libc.so.6 (0x40033000)
>     /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
> 
> mod_jk2.so for Apache 2.0
> 
>     Version information:
>     /usr/lib/apache2/mod_jk2.so:
>         libc.so.6 (GLIBC_2.1.3) => /lib/i686/libc.so.6
>         libc.so.6 (GLIBC_2.1) => /lib/i686/libc.so.6
>         libc.so.6 (GLIBC_2.0) => /lib/i686/libc.so.6
>     /lib/i686/libc.so.6:
>         ld-linux.so.2 (GLIBC_2.1.1) => /lib/ld-linux.so.2
>         ld-linux.so.2 (GLIBC_2.2.3) => /lib/ld-linux.so.2
>         ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2
>         ld-linux.so.2 (GLIBC_2.2) => /lib/ld-linux.so.2
>         ld-linux.so.2 (GLIBC_2.0) => /lib/ld-linux.so.2
>     libcrypt.so.1 => /lib/libcrypt.so.1 (0x4002f000)
>     libapr.so.0 => /usr/lib/libapr.so.0 (0x4005c000)
>     libc.so.6 => /lib/i686/libc.so.6 (0x4007a000)
>     /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
> 
> jkjni.so for Apache 2.0
> 
>     Version information:
>     /usr/lib/apache2/jkjni.so:
>         libc.so.6 (GLIBC_2.1.3) => /lib/i686/libc.so.6
>         libc.so.6 (GLIBC_2.1) => /lib/i686/libc.so.6
>         libc.so.6 (GLIBC_2.0) => /lib/i686/libc.so.6
>     /lib/libcrypt.so.1:
>         libc.so.6 (GLIBC_2.1.3) => /lib/i686/libc.so.6
>         libc.so.6 (GLIBC_2.0) => /lib/i686/libc.so.6
>     /usr/lib/libapr.so.0:
>         libc.so.6 (GLIBC_2.1.3) => /lib/i686/libc.so.6
>         libc.so.6 (GLIBC_2.2) => /lib/i686/libc.so.6
>         libc.so.6 (GLIBC_2.1.2) => /lib/i686/libc.so.6
>         libc.so.6 (GLIBC_2.1) => /lib/i686/libc.so.6
>         libc.so.6 (GLIBC_2.0) => /lib/i686/libc.so.6
>     /lib/i686/libc.so.6:
>         ld-linux.so.2 (GLIBC_2.1.1) => /lib/ld-linux.so.2
>         ld-linux.so.2 (GLIBC_2.2.3) => /lib/ld-linux.so.2
>         ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2
>         ld-linux.so.2 (GLIBC_2.2) => /lib/ld-linux.so.2
>         ld-linux.so.2 (GLIBC_2.0) => /lib/ld-linux.so.2
> 
> 
> Ok, I stopped here since I feel there is many works to conduct in JK2 to 
> make Apache 1.3 compatible with APR/JNI.
> 
> Conclusion, let's concentrate on JK2 now, make quickly a 2.0.1 release,
> which will have better support for APR/JNI with Apache 1.3 and will 
> learn many things useable for JK 2.1.
> 
> And will learn from tomcat-dev but much more from tomcat-user lists....
> 
> Regards.
> 
> mod_jk2 linux rpm and binaries will be released today but with Apache 
> 1.3 WITHOUT APR/JNI support ;-)
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> --- jk/native2/server/apache13/Makefile.in.orig	Wed Oct  2 07:01:12 2002
> +++ jk/native2/server/apache13/Makefile.in	Wed Oct  2 07:27:17 2002
> @@ -43,11 +43,14 @@
>  # Excludes are not yet implemented.
>  
>  COMMON_C_FILES := $(wildcard ${JK_DIR}/common/*.c )
> +JNI_C_FILES := $(wildcard ${JK_DIR}/jni/*.c )
>  A_C_FILES := $(wildcard ${JK_DIR}/server/apache13/*.c )
>  H_FILES := $(wildcard ${JK_DIR}/include/*.h )
>  
>  COMMON_LO_FILES := $(patsubst ${JK_DIR}/common/%, ${BUILD_DIR}/%, \
>  			 $(patsubst %c, %lo, ${COMMON_C_FILES} ))
> +JNI_LO_FILES := $(patsubst ${JK_DIR}/jni/%, ${BUILD_DIR}/%, \
> +			$(patsubst %c, %lo, ${JNI_C_FILES} ))
>  A_LO_FILES := $(patsubst ${JK_DIR}/server/apache13/%, ${BUILD_DIR}/%, \
>  			 $(patsubst %c, %lo, ${A_C_FILES} ))
>  
> @@ -65,19 +68,26 @@
>  ${BUILD_DIR}/%.lo: ${JK_DIR}/common/%.c
>  	 ${SH_COMPILE} -c $< -o $@
>  
> +${BUILD_DIR}/%.lo: ${JK_DIR}/jni/%.c
> +	${SH_COMPILE} -c $< -o $@
> +
>  ${BUILD_DIR}/%.lo: ${JK_DIR}/server/apache13/%.c
>  	 ${SH_COMPILE} -c $< -o $@
>  
>  
>  # ---------- Targets -------------------- 
>  
> -all: prepare ${BUILD_DIR}/mod_jk2.so 
> +all: prepare ${BUILD_DIR}/mod_jk2.so ${BUILD_DIR}/jkjni.so
>  
>  ${BUILD_DIR}/mod_jk2.so: ${COMMON_LO_FILES} ${A_LO_FILES}
>  	${MOD_LINK} -o $@ $^ @APR_LDFLAGS@
>  
> +${BUILD_DIR}/jkjni.so: ${JNI_LO_FILES}
> +	$(MOD_LINK) -o $@ $^ @APR_LDFLAGS@
> +
>  ${COMMON_C_FILES} ${A_C_FILES}: ${H_FILES}
>  
> +
>  prepare: 
>  	mkdir -p ${BUILD_DIR}
>  
> 
> 
> 
> ------------------------------------------------------------------------
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>




--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message