[freetds] Compiling sqsh-2.1.3 against freetds-0.63 on RH9

Lowden, James K LowdenJK at bernstein.com
Wed Oct 12 09:35:24 EDT 2005


> From: Reuben Pearse
> Sent: Wednesday, October 12, 2005 9:06 AM
>
> I am having problems compiling sqsh-2.1.3 against freetds-0.63 on a 
> Redhat9 Linux server. I managed to compile freetds-0.63 OK and I have 
> verified that it works by using tsql utility to query one of our SQL 
> Servers. However, I now want to get Sqsh working. The "configure"
script 
> runs OK, but when running "make" I get the errors:
> 
> cmd_bcp.o(.text+0x3fb): In function `cmd_bcp':
> /home/psl/sqsh/sqsh-2.1.3/src/cmd_bcp.c:927: undefined reference
> to `cs_loc_drop'
> cmd_bcp.o(.text+0x40b):/home/psl/sqsh/sqsh-2.1.3/src/cmd_bcp.c:922:
> undefined reference to `ct_close'
...
> Has anyone managed to compile Sqsh against freetds-0.63 before?

Yes.  

$ ldd `which sqsh`
/usr/local/bin/sqsh:
         -lc.12 => /usr/lib/libc.so.12
         -lct.3 => /usr/pkg/lib/libct.so.3
         -ltds.5 => /usr/local/lib/libtds.so.5
         -lm.0 => /usr/lib/libm387.so.0
         -lm.0 => /usr/lib/libm.so.0
         -lcrypt.0 => /usr/lib/libcrypt.so.0
         -lreadline.5 => /usr/pkg/lib/libreadline.so.5
         -lcurses.6 => /usr/lib/libcurses.so.6

It looks like your linker is not finding libct.  Try pointing your
LDFLAGS to the installed FreeTDS libraries.  I have a little script
"regen" that sets the environment before building sqsh:

$ head regen
export LDFLAGS="${LDFLAGS} -L /usr/pkg/lib"
export CFLAGS="${CFLAGS}  -g -I/usr/pkg/include"
export SYBASE=/usr/local
./configure  --with-readline=/usr/pkg

HTH.  

--jkl

-----------------------------------------
The information contained in this transmission may be privileged and
confidential and is intended only for the use of the person(s) named
above. If you are not the intended recipient, or an employee or agent responsible
for delivering this message to the intended recipient, any review, dissemination,
distribution or duplication of this communication is strictly prohibited. If you are
not the intended recipient, please contact the sender immediately by reply e-mail
and destroy all copies of the original message. Please note that we do not accept
account orders and/or instructions by e-mail, and therefore will not be responsible
for carrying out such orders and/or instructions.  If you, as the intended recipient
of this message, the purpose of which is to inform and update our clients, prospects
and consultants of developments relating to our services and products, would not
like to receive further e-mail correspondence from the sender, please "reply" to the
sender indicating your wishes.  In the U.S.: 1345 Avenue of the Americas, New York,
NY 10105.


More information about the FreeTDS mailing list