Subject: Re: ld.so finds library, loses library
To: None <netbsd-help@NetBSD.org>
From: Patrick Welche <prlw1@newn.cam.ac.uk>
List: netbsd-help
Date: 05/16/2007 22:19:19
On Wed, May 16, 2007 at 05:06:49PM -0400, James K. Lowden wrote:
> I have an executable for which the runtime linker fails to find a shared
> object that ldd admits is there.  I'm hoping someone here can point me in
> the right direction.  I include the output of ldd, readelf, and the link
> command line below.  
> 
> 	$ uname -rs
> 	NetBSD 2.0_BETA
> 	$ .libs/bsqlodbc
> 	Shared object "libodbcinst.so.1" not found
> 
> $ ldd  .libs/bsqlodbc
> .libs/bsqlodbc:
>          -lodbcinst.1 => not found
>          -lc.12 => /usr/lib/libc.so.12
>          -ltdsodbc.0 => /usr/pkg/lib/libtdsodbc.so.0
>          -lpthread.0 => /usr/lib/libpthread.so.0
>          -lodbcinst.1 => /usr/local/lib/libodbcinst.so.1
>          -lodbc.1 => /usr/local/lib/libodbc.so.1

How about ldd for libtdsodbc.so.0?

For me:

libtdsodbc.so.0.0:
        -lpthread.0 => /usr/lib/libpthread.so.0
        -lodbcinst.1 => /usr/local/lib/libodbcinst.so.1
        -lcrypt.0 => /lib/libcrypt.so.0
        -lcrypto.3 => /usr/lib/libcrypto.so.3
        -lssl.4 => /usr/lib/libssl.so.4

so it could be that one which doesn't have an rpath = /usr/local/lib

Cheers,

Patrick