Hello,

Since migrating over to 'libtool' with automake to compile my packages, on Solaris 9 and 10 we're now getting the new error:

ld.so.1: /home/user/myprog: fatal: libgcc_s.so.1: open failed: No such file or directory
Killed

Before using libtool and using convenience libraries only, this problem never occurred. I know I can solve this problem by defining the variable LD_LIBRARY_PATH, but the users never had to do this before.

Now, when running with
> ./configure --disable-shared
it works as expected without the LD_LIBRARY_PATH.

When static:
> ldd myprog
       libnsl.so.1 =>   /usr/lib/libnsl.so.1
       libsocket.so.1 =>        /usr/lib/libsocket.so.1
       libc.so.1 =>     /usr/lib/libc.so.1
       libdl.so.1 =>    /usr/lib/libdl.so.1
       libmp.so.2 =>    /usr/lib/libmp.so.2
       /usr/platform/SUNW,Sun-Fire-V440/lib/libc_psr.so.1

When shared:
> cd .libs
> ldd myprog
       liblogger.so.1 =>        (file not found)
       libnsl.so.1 =>   /usr/lib/libnsl.so.1
       libsocket.so.1 =>        /usr/lib/libsocket.so.1
       libc.so.1 =>     /usr/lib/libc.so.1
       libdl.so.1 =>    /usr/lib/libdl.so.1
       libmp.so.2 =>    /usr/lib/libmp.so.2
       /usr/platform/SUNW,Sun-Fire-V440/lib/libc_psr.so.1
> cd mylib/.libs
> ldd mylib.so
       libnsl.so.1 =>   /usr/lib/libnsl.so.1
       libsocket.so.1 =>        /usr/lib/libsocket.so.1
       libc.so.1 =>     /usr/lib/libc.so.1
       libgcc_s.so.1 =>         (file not found)
       libdl.so.1 =>    /usr/lib/libdl.so.1
       libmp.so.2 =>    /usr/lib/libmp.so.2
       /usr/platform/SUNW,Sun-Fire-V440/lib/libc_psr.so.1

As the location of this library is specified by GCC, is there any way to automatically figure out where it is and tell the linker it should look there for the library?

Or do people think this is a bad idea, and just a sideeffect of using shared libraries?

Thanks,
Jason.


_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to