[freetds] Compiling sqsh-2.1.3 against freetds-0.63 on RH9
Reuben Pearse
reuben at presence-systems.com
Wed Oct 12 12:09:14 EDT 2005
Thanks James and Bill.
I used your "regen" script to setup stuff for the configure script. I
then hacked the makefile with:
SYBASE_LIBS = -lct -ltds -lnsl -ldl -lm
I also had to put the following lines in:
SYBASE_LIBDIR = -Wl,-R/usr/pkg/lib \
-Wl,-R/usr/local/lib \
-L$(SYBASE_OCOS)/lib
..otherwise sqsh couldn't find the libct.so.3 and libtds.so.4 library files (I found that on the post http://lists.ibiblio.org/pipermail/freetds/2005q2/018442.html)
I can now connect to MSSQL but when I'm querying textual information I get the error:
Open Client Message
Layer 0, Origin 0, Severity 9, Number 99
WARNING! Some character(s) could not be converted into client's character set. Unconverted bytes
were changed to question marks ('?').
Open Client Message
Layer 0, Origin 0, Severity 78, Number 52
Unknown marker
I'm guessing it's some sort of charset setting in the freetds configuration file?
Thanks for your help
--
Reuben Pearse
Principal Technical Consultant
reuben at presence-systems.com
Lowden, James K wrote:
>>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.
>_______________________________________________
>FreeTDS mailing list
>FreeTDS at lists.ibiblio.org
>http://lists.ibiblio.org/mailman/listinfo/freetds
>
>
More information about the FreeTDS
mailing list