[freetds] tsql problem

James K. Lowden jklowden at schemamania.org
Fri Jun 18 18:44:10 EDT 2004

On Fri, 18 Jun 2004, "kevin bartz" <kbartz at loyaltymatrix.com> wrote:
> ldd gives
> kevin at redtail:~/test> ldd /usr/local/bin/tsql
>         libreadline.so.4 => /usr/local/lib/libreadline.so.4
>         libtds.so.3 => not found
>         libc.so.6 => /lib64/libc.so.6

You want to understand your runtime linker a little better, not that
that's everyone's favorite pasttime. 

And ELF binary can incorporate runtime link paths.  I'm curious, what does
your machine show for this:

$ readelf -d `which tsql` |sed -ne1,/rpath/p

Dynamic segment at offset 0x2e6c contains 20 entries:
  Tag        Type                         Name/Value
 0x00000001 (NEEDED)                     Shared library: [libcurses.so.5]
 0x00000001 (NEEDED)                     Shared library: [libtds.so.3]
 0x00000001 (NEEDED)                     Shared library: [libc.so.12]
 0x0000000f (RPATH)                      Library rpath: [/usr/local/lib]

(ISTR Linux systems often don't use the RPATH entry.  I guess it would be
set by libtool.)

Regarding readline, 

$ nm /usr/pkg/lib/libreadline.so.4 |grep BC
00028ebc B BC

On my system, libreadline.so.4 points to libreadline.so.4.3.  Yours?  

Note, my binary uses libcurses.so.5 and you (seem to) have three ncurses
installed.  Maybe tsql is linked to the wrong one?  



More information about the FreeTDS mailing list