tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Manolache <cmanola...@yahoo.com>
Subject Re: [VOTE] JK2 2.1
Date Wed, 02 Oct 2002 15:02:11 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.

Do you have a multithreaded apache1.3 ? It's very important
to compile it as multithreaded and link pthread !

For the apr issues - I still think that apr should be 
treated as a general-purpose library, and we shouldn't 
have more than one varaiant in the system. 

Probably some APR expert could clarify this - but my opinion 
is that on linux the right place for apr is /usr/lib/libapr.so.0.9.2
and /usr/include/apr.
And I think Apache2.0 RPM should just depend on libapr.rpm, 
and same for mod_jk2.rpm

It's just too confusing to have 2 variants of the same library,
and it should be a portability library that can be used outside
apache - without apache having a special copy.

Costin

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

-- 
Costin



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