tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Wachter <>
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/ ELF 32-bit LSB shared object, Intel 
80386, version 1 (SYSV), not stripped
apr/lib/ 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/ =>  (0xffffe000) => /usr/local/apr/lib/ (0x55597000) => /lib/tls/ (0x555bf000) => /lib/ (0x555c7000) => /lib/tls/ (0x555f9000) => /lib/ (0x5560a000) => /usr/lib/ (0x5560e000) => /usr/lib/ (0x5563e000) => /lib/tls/ (0x55732000)
        /lib/ (0x56555000)

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

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 

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


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 [] 
> 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:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message