You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Lakshmi Venkataraman <la...@foundrynet.com> on 2007/05/13 08:55:23 UTC

RE: [SOLVED]Tomcat native library Not found in Solaris 9

 
I attached an eclipse debugger and found that an UnsatsfiedLinkError was
thrown due to the
Fact that libtcnative-1.so depends on libgcc_s.1.so.  
Then I included /usr/local/lib in LD_LIBRAY_PATH.
Tomcat's Http11AprProtocol connector starts up without any problem.

It is still not clear why on solaris 9 libtcnative-1.so depends on
libgcc_s.1.so
Whereas in Lunux redhat 4 it does NOT do do.

Lakshmi

-----Original Message-----
From: Lakshmi Venkataraman [mailto:lakshmi@foundrynet.com] 
Sent: Saturday, May 12, 2007 5:33 PM
To: Tomcat Users List
Subject: RE: Tomcat native library Not found in Solaris 9

 

I upgraded Tomcat to Tomcat 5.5.23 on Solaris 9. I also compiled
APR-1.2.8, tomcat-native-1.1.8-src and openssl-0.9.8b on Solaris.
I have placed the libtcnative-1.so in /export/home/lakshmi/Ivt55/bin.
Ivt55 is the application directory and have INCLUDED it in
LD_LIBRARY_PATH and PATH.

Yet Tomcat is unable to find libtcnative-1.so.  I get this message:

The Apache Tomcat Native library which allows optimal performance in
production environments was not found on the java.library.path:
/export/home/lakshmi/Ivt55/jre/lib/sparc/client:/export/home/lakshmi/Ivt
55/jre/lib/sparc:/export/home/lakshmi/Ivt55/jre/../lib/sparc:/export/hom
e/lakshmi/Ivt55/3rdPartyPackages/Tomcat/bin:/export/home/lakshmi/Ivt55/b
in:/export/home/lakshmi/Ivt55/database::/usr/lib


I did NOT have a problem on Linux redhat 4 or Windows.

What else is missing on Solaris?

Thanks in advance for your reply,
Lakshmi


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


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


RE: [NOT SOLVED]Tomcat native library Not found in Solaris 9

Posted by Lakshmi Venkataraman <la...@foundrynet.com>.
Thanks for your reply!  I will try the steps suggested below.

Lakshmi 

-----Original Message-----
From: Rainer Jung [mailto:rainer.jung@kippdata.de] 
Sent: Thursday, August 02, 2007 2:20 AM
To: Tomcat Users List
Subject: Re: [NOT SOLVED]Tomcat native library Not found in Solaris 9

Hi,

first of all: this is a gcc question. If you search for a high quality
answer, you should contact the gcc commmunity.

My personal way to do this (and there is definitely more than one wait
to do it):

export CC="gcc -specs=/path/to/my/specs"

Contents of file /path/to/my/specs:

*libgcc:
-lgcc -lgcc_eh

Now whenever you use a build system, that respects the CC env variable
(e.g. most configure based systems), libgcc should get compiled in
statically.

Regards,

Rainer

Lakshmi Venkataraman wrote:
> Please give me some tips for compiling libtcnative on Solaris 9 
> without the dynamic dependence on libgcc_s.1.so.  We ship tomcat with 
> our product.  On customer installations, we cannot assume that 
> libgcc_s will be found in some standard location.
> 
> I have searched a lot on the web. I am also trying to compile gcc with

> --disable-shared option.
> I am running into some issues while trying to compile gcc. 
> 1) How to modify Tomcat native's configure script to link libgcc 
> statically?
> 2) What are the prerequisites before doing step 1)?
> 
> We are using Tomcat 5.5.23. I am using tcnative-1.1.8-src with 
> OpenSSL-0.9.8b.
> 
> --Thanks
> Lakshmi

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


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


RE: [SOLVED]Tomcat native library Not found in Solaris 9

Posted by Lakshmi Venkataraman <la...@foundrynet.com>.
 
Hi Rainer,
Thanks for your suggestion!  Using the specs file as suggested below did
not work.
Also, gcc -dumpspecs > /path/myspecs and then changing the *libgcc rule
did not 
work either.   
What finally worked was 
export CC="gcc -static-libgcc"
But then I had to recompile OpenSSL, APR and then Tomcat native in that
order with the
above value for CC to completely remove the dependency on libgcc_s.so.

So now I have libssl.so, libcrypto.so, libapr-1.so and libtcnative-1.so 
without the dependency on libgcc_s.so.


Thanks
Lakshmi

-----Original Message-----
From: Rainer Jung [mailto:rainer.jung@kippdata.de] 
Sent: Thursday, August 02, 2007 2:20 AM
To: Tomcat Users List
Subject: Re: [NOT SOLVED]Tomcat native library Not found in Solaris 9

Hi,

first of all: this is a gcc question. If you search for a high quality
answer, you should contact the gcc commmunity.

My personal way to do this (and there is definitely more than one wait
to do it):

export CC="gcc -specs=/path/to/my/specs"

Contents of file /path/to/my/specs:

*libgcc:
-lgcc -lgcc_eh

Now whenever you use a build system, that respects the CC env variable
(e.g. most configure based systems), libgcc should get compiled in
statically.

Regards,

Rainer

Lakshmi Venkataraman wrote:
> Please give me some tips for compiling libtcnative on Solaris 9 
> without the dynamic dependence on libgcc_s.1.so.  We ship tomcat with 
> our product.  On customer installations, we cannot assume that 
> libgcc_s will be found in some standard location.
> 
> I have searched a lot on the web. I am also trying to compile gcc with

> --disable-shared option.
> I am running into some issues while trying to compile gcc. 
> 1) How to modify Tomcat native's configure script to link libgcc 
> statically?
> 2) What are the prerequisites before doing step 1)?
> 
> We are using Tomcat 5.5.23. I am using tcnative-1.1.8-src with 
> OpenSSL-0.9.8b.
> 
> --Thanks
> Lakshmi

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


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


Re: [NOT SOLVED]Tomcat native library Not found in Solaris 9

Posted by Rainer Jung <ra...@kippdata.de>.
Hi,

first of all: this is a gcc question. If you search for a high quality 
answer, you should contact the gcc commmunity.

My personal way to do this (and there is definitely more than one wait 
to do it):

export CC="gcc -specs=/path/to/my/specs"

Contents of file /path/to/my/specs:

*libgcc:
-lgcc -lgcc_eh

Now whenever you use a build system, that respects the CC env variable 
(e.g. most configure based systems), libgcc should get compiled in 
statically.

Regards,

Rainer

Lakshmi Venkataraman wrote:
> Please give me some tips for compiling libtcnative on Solaris 9 without
> the dynamic dependence on
> libgcc_s.1.so.  We ship tomcat with our product.  On customer
> installations, we cannot assume
> that libgcc_s will be found in some standard location.
> 
> I have searched a lot on the web. I am also trying to compile gcc with
> --disable-shared option.
> I am running into some issues while trying to compile gcc. 
> 1) How to modify Tomcat native's configure script to link libgcc
> statically?
> 2) What are the prerequisites before doing step 1)?
> 
> We are using Tomcat 5.5.23. I am using tcnative-1.1.8-src with
> OpenSSL-0.9.8b.
> 
> --Thanks
> Lakshmi  

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


RE: [NOT SOLVED]Tomcat native library Not found in Solaris 9

Posted by Lakshmi Venkataraman <la...@foundrynet.com>.
Please give me some tips for compiling libtcnative on Solaris 9 without
the dynamic dependence on
libgcc_s.1.so.  We ship tomcat with our product.  On customer
installations, we cannot assume
that libgcc_s will be found in some standard location.

I have searched a lot on the web. I am also trying to compile gcc with
--disable-shared option.
I am running into some issues while trying to compile gcc. 
1) How to modify Tomcat native's configure script to link libgcc
statically?
2) What are the prerequisites before doing step 1)?

We are using Tomcat 5.5.23. I am using tcnative-1.1.8-src with
OpenSSL-0.9.8b.

--Thanks
Lakshmi  

-----Original Message-----
From: Rainer Jung [mailto:rainer.jung@kippdata.de] 
Sent: Sunday, May 13, 2007 1:45 AM
To: Tomcat Users List
Subject: Re: [SOLVED]Tomcat native library Not found in Solaris 9

It's very likely, that it depends on the same lib in RedHat. You can
check by using "ldd libtcnative-1.so".

The difference is: gcc is a fundamental part of the OS with Linux, so
libgcc_s.so is ususally installed in a standard library location for
Linux. Under Solaris it's an optional add-on installed in a separate
place.

Personally I always find it anoying, that gcc put's a dependency on its
own runtime lib into the compiled code. You could prevent it doing so,
by changing its specs file (tehreby compiling in its convenience
routines statically).

Regards,

Rainer

Lakshmi Venkataraman wrote:
>  
> I attached an eclipse debugger and found that an UnsatsfiedLinkError 
> was thrown due to the Fact that libtcnative-1.so depends on 
> libgcc_s.1.so.
> Then I included /usr/local/lib in LD_LIBRAY_PATH.
> Tomcat's Http11AprProtocol connector starts up without any problem.
> 
> It is still not clear why on solaris 9 libtcnative-1.so depends on 
> libgcc_s.1.so Whereas in Lunux redhat 4 it does NOT do do.
> 
> Lakshmi
> 
> -----Original Message-----
> From: Lakshmi Venkataraman [mailto:lakshmi@foundrynet.com]
> Sent: Saturday, May 12, 2007 5:33 PM
> To: Tomcat Users List
> Subject: RE: Tomcat native library Not found in Solaris 9
> 
>  
> 
> I upgraded Tomcat to Tomcat 5.5.23 on Solaris 9. I also compiled 
> APR-1.2.8, tomcat-native-1.1.8-src and openssl-0.9.8b on Solaris.
> I have placed the libtcnative-1.so in /export/home/lakshmi/Ivt55/bin.
> Ivt55 is the application directory and have INCLUDED it in 
> LD_LIBRARY_PATH and PATH.
> 
> Yet Tomcat is unable to find libtcnative-1.so.  I get this message:
> 
> The Apache Tomcat Native library which allows optimal performance in 
> production environments was not found on the java.library.path:
> /export/home/lakshmi/Ivt55/jre/lib/sparc/client:/export/home/lakshmi/I
> vt 
> 55/jre/lib/sparc:/export/home/lakshmi/Ivt55/jre/../lib/sparc:/export/h
> om 
> e/lakshmi/Ivt55/3rdPartyPackages/Tomcat/bin:/export/home/lakshmi/Ivt55
> /b in:/export/home/lakshmi/Ivt55/database::/usr/lib
> 
> 
> I did NOT have a problem on Linux redhat 4 or Windows.
> 
> What else is missing on Solaris?
> 
> Thanks in advance for your reply,
> Lakshmi

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


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


Re: [SOLVED]Tomcat native library Not found in Solaris 9

Posted by Rainer Jung <ra...@kippdata.de>.
It's very likely, that it depends on the same lib in RedHat. You can 
check by using "ldd libtcnative-1.so".

The difference is: gcc is a fundamental part of the OS with Linux, so 
libgcc_s.so is ususally installed in a standard library location for 
Linux. Under Solaris it's an optional add-on installed in a separate place.

Personally I always find it anoying, that gcc put's a dependency on its 
own runtime lib into the compiled code. You could prevent it doing so, 
by changing its specs file (tehreby compiling in its convenience 
routines statically).

Regards,

Rainer

Lakshmi Venkataraman wrote:
>  
> I attached an eclipse debugger and found that an UnsatsfiedLinkError was
> thrown due to the
> Fact that libtcnative-1.so depends on libgcc_s.1.so.  
> Then I included /usr/local/lib in LD_LIBRAY_PATH.
> Tomcat's Http11AprProtocol connector starts up without any problem.
> 
> It is still not clear why on solaris 9 libtcnative-1.so depends on
> libgcc_s.1.so
> Whereas in Lunux redhat 4 it does NOT do do.
> 
> Lakshmi
> 
> -----Original Message-----
> From: Lakshmi Venkataraman [mailto:lakshmi@foundrynet.com] 
> Sent: Saturday, May 12, 2007 5:33 PM
> To: Tomcat Users List
> Subject: RE: Tomcat native library Not found in Solaris 9
> 
>  
> 
> I upgraded Tomcat to Tomcat 5.5.23 on Solaris 9. I also compiled
> APR-1.2.8, tomcat-native-1.1.8-src and openssl-0.9.8b on Solaris.
> I have placed the libtcnative-1.so in /export/home/lakshmi/Ivt55/bin.
> Ivt55 is the application directory and have INCLUDED it in
> LD_LIBRARY_PATH and PATH.
> 
> Yet Tomcat is unable to find libtcnative-1.so.  I get this message:
> 
> The Apache Tomcat Native library which allows optimal performance in
> production environments was not found on the java.library.path:
> /export/home/lakshmi/Ivt55/jre/lib/sparc/client:/export/home/lakshmi/Ivt
> 55/jre/lib/sparc:/export/home/lakshmi/Ivt55/jre/../lib/sparc:/export/hom
> e/lakshmi/Ivt55/3rdPartyPackages/Tomcat/bin:/export/home/lakshmi/Ivt55/b
> in:/export/home/lakshmi/Ivt55/database::/usr/lib
> 
> 
> I did NOT have a problem on Linux redhat 4 or Windows.
> 
> What else is missing on Solaris?
> 
> Thanks in advance for your reply,
> Lakshmi

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