tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Gomez <hgo...@apache.org>
Subject Re: [VOTE] JK2 2.1
Date Wed, 02 Oct 2002 06:48:02 GMT
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.

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 ;-)



Mime
View raw message