I am unable to install a working version of sqsh on my system that can connect
with a Sybase DB. The emerge process completetes successfully, but the
resulting executable does not connect. I have tried with both versions of
freetds that are currently in portage. I *am* able to connect to the database
using tsql (from freetds).
To connect to my DB, I do the following:
$ export DSQUERY=SYBASE
The [SYBASE] entry in /etc/freetds.conf is as follows:
[SYBASE]
host = sybase.foo.com
port = 4100
tds version = 5.0
When I try to sqsh, I get the following:
$ sqsh
semicolon_hack: Invalid boolean value
exit_failcount: Invalid boolean value
history_shorthand: Invalid boolean value
sqsh-2.1 Copyright (C) 1995-2001 Scott C. Gray
This is free software with ABSOLUTELY NO WARRANTY
For more information type '\warranty'
And it just hangs there. I've used strace to see that sqsh is trying to resolve
SYBASE.foo.com so it seems like sqsh is not interacting properly with freetds.
And yet freetds is installed correctly, because I am able to connect to the DB with:
$ tsql -S SYBASE -U cstrom
Some other interesting notes:
* I've tried compiling directly from source & with the latest Debian patches,
but without success. Could this be an issue with ~x86 (where I'm running)? gcc
3.3.1?
* I have copied a debian executable onto the system that *does* work correctly.
I tried to reproduce the executable with the debian patches, but could not,
which seems to indicate a compiler or glibc issue.
Created an attachment (id=17581) [details]
Replacement for the current config.patch in the sqsh ebuild
Compiler warnings are our friends. Compiler warnings are our friends. We will
not ignore our friends.
FINALLY noticed a `tolower' warning when compiling sqsh. The configure script
does not detect several functions properly. The current patch included in
portage attempts to correct this, but does not include the HAVE_STRCASECMP
definition.
The attachment is a replacement for the current config.patch which corrects
this ommision. After applying the patch to my system, sqsh compiled correctly
and, more importantly, it WORKS!