You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Greg W. Smith" <gr...@winstontitle.com> on 2008/03/05 18:54:03 UTC

[users@httpd] Apache 2.2.8 on Solaris 10 (libgcc_s.so problems after compiling)

All -- I know there have been some messages in the past, however I have not run into this problem until I upgraded from Solaris 2.9 to Solaris 2.10.  Everything seems to compile correctly however upon closer inspection libgcc_s.so.1 is not found at runtime.  I am currently using
gcc version 3.4.6 on Solaris 2.10. After a compilation a ldd reveals:

# ldd httpd
        libssl.so.0.9.8 =>       /usr/local/lib/libssl.so.0.9.8
        libcrypto.so.0.9.8 =>    /usr/local/lib/libcrypto.so.0.9.8
        libdl.so.1 =>    /lib/libdl.so.1
        libm.so.2 =>     /lib/libm.so.2
        libaprutil-1.so.0 =>     /usr/local/apache/lib/libaprutil-1.so.0
        libexpat.so.0 =>         /usr/local/apache/lib/libexpat.so.0
        libiconv.so.2 =>         /usr/local/lib/libiconv.so.2
        libapr-1.so.0 =>         /usr/local/apache/lib/libapr-1.so.0
        libuuid.so.1 =>  /lib/libuuid.so.1
        libsendfile.so.1 =>      /lib/libsendfile.so.1
        librt.so.1 =>    /lib/librt.so.1
        libsocket.so.1 =>        /lib/libsocket.so.1
        libnsl.so.1 =>   /lib/libnsl.so.1
        libpthread.so.1 =>       /lib/libpthread.so.1
        libc.so.1 =>     /lib/libc.so.1
        libgcc_s.so.1 =>         (file not found)
        libgcc_s.so.1 =>         (file not found)
        libgcc_s.so.1 =>         /usr/local/lib/libgcc_s.so.1
        libaio.so.1 =>   /lib/libaio.so.1
        libmd.so.1 =>    /lib/libmd.so.1
        libmp.so.2 =>    /lib/libmp.so.2
        libscf.so.1 =>   /lib/libscf.so.1
        libdoor.so.1 =>  /lib/libdoor.so.1
        libuutil.so.1 =>         /lib/libuutil.so.1
        libgen.so.1 =>   /lib/libgen.so.1
        /platform/SUNW,Sun-Fire-280R/lib/libc_psr.so.1
        /platform/SUNW,Sun-Fire-280R/lib/libmd_psr.so.1
#

Here are my compile options:

./configure --prefix=/usr/local/apache --enable-so --enable-ssl --with-ssl=/usr/local LD_OPTIONS='-L/usr/local/lib' 

This occurs without setting LD_LIBRARY_PATH (I prefer not to take that route). Although, I could edit envvars to include /usr/loca/lib and everything works fine.  Has anyone else run into this problem?  Just a guess but things changed quite drastically in Solaris 2.10.






---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache 2.2.8 on Solaris 10 (libgcc_s.so problems after compiling)

Posted by "Greg W. Smith" <gr...@winstontitle.com>.
Lloyd -- thanks for all your help. Lari revealed the following:

# lari httpd
libgcc_s.so.1 => (file not found)
libgcc_s.so.1 => (file not found)
[2:0]: __ashldi3(): /usr/local/lib/libgcc_s.so.1
[2:0P]: __ashldi3(): httpd
[2:0]: __ashrdi3(): /usr/local/lib/libgcc_s.so.1
[2:0P]: __ashrdi3(): httpd
[2:0]: __divdi3(): /usr/local/lib/libgcc_s.so.1
[2:1EP]: __divdi3(): httpd
[7:0]: __dso_handle[0]: /usr/local/apache/lib/libapr-1.so.0
[7:0]: __dso_handle[0]: /usr/local/apache/lib/libaprutil-1.so.0
[7:0]: __dso_handle[0]: /usr/local/apache/lib/libexpat.so.0
[7:0P]: __dso_handle[0]: /usr/local/lib/libcrypto.so.0.9.8
[7:0]: __dso_handle[0]: /usr/local/lib/libiconv.so.2
[7:0P]: __dso_handle[0]: /usr/local/lib/libssl.so.0.9.8
[7:0P]: __dso_handle[0]: httpd
[2:0]: __floatdisf(): /usr/local/lib/libgcc_s.so.1
[2:0P]: __floatdisf(): httpd
[2:0]: __lshrdi3(): /usr/local/lib/libgcc_s.so.1
[2:2EP]: __lshrdi3(): httpd
[2:0]: __moddi3(): /usr/local/lib/libgcc_s.so.1
[2:1EP]: __moddi3(): httpd
[2:0]: __udivdi3(): /usr/local/lib/libgcc_s.so.1
[2:2EP]: __udivdi3(): httpd
[2:0]: __umoddi3(): /usr/local/lib/libgcc_s.so.1
[2:1EP]: __umoddi3(): httpd
[24:1EP]: _end: httpd
[10:2EP]: _lib_version: httpd

Then it occured to me to try lari -s which revealed:

1525:
21525: hardware capabilities - 0x6b [ VIS2 VIS V8PLUS DIV32 MUL32 ]
21525:
21525:
21525: configuration file=/var/ld/ld.config: unable to process file
21525:
21525: file=/usr/local/apache/bin/httpd [ ELF ]; generating link map
21525: dynamic: 0xb298c base: 0x10000
21525: size: 0xa9ed0 entry: 0x2b540
21525: lmid: BASE lmco: 0xc
21525:
21525: file=httpd; analyzing [ RTLD_NOW RTLD_GLOBAL RTLD_WORLD 
RTLD_NODELETE ]
21525:
21525: file=libssl.so.0.9.8; needed by httpd
21525: file=/usr/local/lib/libssl.so.0.9.8 [ ELF ]; generating link map
21525: dynamic: 0xff1ecad4 base: 0xff1a0000
21525: size: 0x50000 entry: 0xff1a0000
21525: lmid: BASE lmco: 0xc
21525:
21525: notify debugger: event: RD_DLACTIVITY state: RT_ADD
21525:
21525: file=httpd; add binding to:
21525: file=/usr/local/lib/libssl.so.0.9.8 [ NEEDED ]

It turns out that openssl was my problem (it couldn't locate 
libgcc_s.so) I had to reconfigure openssl with the following:

LD_OPTIONS=”-R/usr/local/lib –L/usr/local/lib”; export LD_OPTIONS
./Configure solaris-sparcv9-gcc –prefix=/usr/local shared

Thanks for leading my down the right path.

Greg


Lloyd Parkes wrote:

> Greg W. Smith wrote:
>
>> Lloyd -- thanks for the information. I actually tried the 
>> LD_OPTIONS='-L/usr/local/lib -R/usr/local/lib' as well with no luck. 
>> I got the same
>> output as you noted in your message.
>
>
> If you run a Solaris program with LD_DEBUG set to suitable values, the 
> runtime linker will tell you which library is loading what from where. 
> This doesn't work with ldd. See the ld.so.1 and lari manual pages.
>
> Cheers





---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache 2.2.8 on Solaris 10 (libgcc_s.so problems after compiling)

Posted by Lloyd Parkes <Ll...@ird.govt.nz>.
Greg W. Smith wrote:
> Lloyd -- thanks for the information. I actually tried the 
> LD_OPTIONS='-L/usr/local/lib -R/usr/local/lib' as well with no luck.  I 
> got the same
> output as you noted in your message.

If you run a Solaris program with LD_DEBUG set to suitable values, the runtime 
linker will tell you which library is loading what from where. This doesn't work 
with ldd. See the ld.so.1 and lari manual pages.

Cheers
-- 
Lloyd Parkes
Senior Systems Programmer
Open Systems
Ph: +64 4 890 2437

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache 2.2.8 on Solaris 10 (libgcc_s.so problems after compiling)

Posted by "Greg W. Smith" <gr...@winstontitle.com>.
Lloyd -- thanks for the information. I actually tried the 
LD_OPTIONS='-L/usr/local/lib -R/usr/local/lib' as well with no luck.  I 
got the same
output as you noted in your message.

Greg


Lloyd Parkes wrote:

> Greg W. Smith wrote:
>
>>        libgcc_s.so.1 =>         (file not found)
>>        libgcc_s.so.1 =>         (file not found)
>>        libgcc_s.so.1 =>         /usr/local/lib/libgcc_s.so.1
>
>
> libgcc is sometimes found.
>
>> Here are my compile options:
>>
>> ./configure --prefix=/usr/local/apache --enable-so --enable-ssl 
>> --with-ssl=/usr/local LD_OPTIONS='-L/usr/local/lib'
>> This occurs without setting LD_LIBRARY_PATH (I prefer not to take 
>> that route). Although, I could edit envvars to include /usr/loca/lib 
>> and everything works fine.  Has anyone else run into this problem?  
>> Just a guess but things changed quite drastically in Solaris 2.10.
>
>
> I've seen this before on Solaris when shared libraries that need 
> libgcc were not compiled with the correct library search path. The 
> main application can find libgcc just fine, but the shared libraries 
> don't inherit the applications library path.
>
> I've also noticed that you have LD_OPTIONS='-L/usr/local/lib'. I would 
> use LD_OPTIONS='-L/usr/local/lib -R/usr/local/lib' to ensure that the 
> runtime library path is set correctly.
>
> Cheers





---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache 2.2.8 on Solaris 10 (libgcc_s.so problems after compiling)

Posted by Lloyd Parkes <Ll...@ird.govt.nz>.
Greg W. Smith wrote:
>        libgcc_s.so.1 =>         (file not found)
>        libgcc_s.so.1 =>         (file not found)
>        libgcc_s.so.1 =>         /usr/local/lib/libgcc_s.so.1

libgcc is sometimes found.

> Here are my compile options:
> 
> ./configure --prefix=/usr/local/apache --enable-so --enable-ssl 
> --with-ssl=/usr/local LD_OPTIONS='-L/usr/local/lib'
> This occurs without setting LD_LIBRARY_PATH (I prefer not to take that 
> route). Although, I could edit envvars to include /usr/loca/lib and 
> everything works fine.  Has anyone else run into this problem?  Just a 
> guess but things changed quite drastically in Solaris 2.10.

I've seen this before on Solaris when shared libraries that need libgcc were not 
compiled with the correct library search path. The main application can find 
libgcc just fine, but the shared libraries don't inherit the applications 
library path.

I've also noticed that you have LD_OPTIONS='-L/usr/local/lib'. I would use 
LD_OPTIONS='-L/usr/local/lib -R/usr/local/lib' to ensure that the runtime 
library path is set correctly.

Cheers
-- 
Lloyd Parkes
Senior Systems Programmer
Open Systems
Ph: +64 4 890 2437

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org