tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Wachter <Stefan.Wach...@gmx.de>
Subject Re: APR not found under Linux
Date Mon, 03 Jul 2006 12:39:28 GMT
Hi Martina,

success! Thanks for your hints. In the following I summarize the steps 
taken in order to help others with simmilar problems:

I was able to compile and install 32-bit versions of the tcnative and 
the apr library on my 64-bit system. First I had to install some missing 
32-bit dependencies using Yast. After that the following two commands 
created 32-bit versions of the apr and tcnative libraries:

1. APR: ./configure CFLAGS=-m32 && make && make install
2. TcNative: ./configure --with-apr=/usr/local/apr CFLAGS=-m32 && make 
&& make install

The "file" command now outputs the following for these two libraries:

apr/lib/libtcnative-1.so.0.1.3: ELF 32-bit LSB shared object, Intel 
80386, version 1 (SYSV), not stripped
apr/lib/libapr-1.so.0.2.7: ELF 32-bit LSB shared object, Intel 80386, 
version 1 (SYSV), not stripped

Now the linker dependencies for tcnative are 32-bit libraries only:

alpha:/usr/local # ldd apr/lib/libtcnative-1.so.0.1.3
        linux-gate.so.1 =>  (0xffffe000)
        libapr-1.so.0 => /usr/local/apr/lib/libapr-1.so.0 (0x55597000)
        librt.so.1 => /lib/tls/librt.so.1 (0x555bf000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x555c7000)
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0x555f9000)
        libdl.so.2 => /lib/libdl.so.2 (0x5560a000)
        libssl.so.0.9.7 => /usr/lib/libssl.so.0.9.7 (0x5560e000)
        libcrypto.so.0.9.7 => /usr/lib/libcrypto.so.0.9.7 (0x5563e000)
        libc.so.6 => /lib/tls/libc.so.6 (0x55732000)
        /lib/ld-linux.so.2 (0x56555000)

Having a setenv.sh with the following line now allows Tomcat to use the 
APR with a 32-bit JVM:

export LD_LIBRARY_PATH=/usr/local/apr/lib:/lib/tls:/lib:/usr/lib

Similarly, I compiled and installed 64-bit versions of APR and TcNative 
using:

1. APR: ./configure --prefix=/usr/local/apr64 && make && make install
2. TcNative: ./configure --prefix=/usr/local/apr64 
--with-apr=/usr/local/apr64 && make && make install

The 64-bit versions of the libraries are "enabled" by the following line 
in setenv.sh:

export LD_LIBRARY_PATH=/usr/local/apr64/lib:/lib64/tls:/lib64:/usr/lib64

Unfortunately it seems not to be possible to offer both sets of 
libraries simultaneously to Java and let Java do the choice. (I tried 
concatenating the two library paths. But it seems that the first found 
library wins and that additional matches are not considered.)

Regards,
--Stefan









Holst, Martina wrote:
> Hi Steffen,
>
> yes, it's possible. RPMs install 32-bit libraries into /lib rather than
> /lib64.
> Choose a different installation directory for self-compiled libraries
> using --prefix option of configure, and set the -m32 option for gcc.
>
> Regards,
> Martina
>
> -----Original Message-----
> From: Stefan Wachter [mailto:Stefan.Wachter@gmx.de] 
> Sent: Monday, July 03, 2006 09:47
> To: Tomcat Users List
> Subject: Re: APR not found under Linux
>
> Hi Martina,
>
> you are right! Switching to the AMD-64-Bit virtual machine Tomcat does
> no longer inform: "The Apache Native library...". Therefore I assume
> that with that virtual machine the APR is used. Many thanks for your
> hint!
>
> Some time ago I compared the performance of the AMD-64-Bit VM with the
> Intel-32-Bit VM and had the impression that the AMD-64-Bit VM is slower.
>
> Now I have to take new measurements that consider Tomcat/APR/64Bit <->
> Tomcat/32Bit.
>
> Another option would be to install 32-Bit versions of the needed
> libraries. Do you know if it is possible to install 32-Bit versions of
> the needed libraries in addition to the already present 64-Bit versions?
>
> Regards,
> --Stefan
>
>
>
> Holst, Martina wrote:
>   
>> Hi Stefan,
>>
>> Looking at your library path: I think you are trying to use a 32bit 
>> Java JDK with 64-bit APR/OprnSSL libraries. Java does not find the 
>> 32-bit binaries it needs, hence the error message.
>>  
>> Best regards,
>> Martina
>>     


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message