Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 28526 - sqsh not using freetds
Summary: sqsh not using freetds
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-12 08:02 UTC by chris strom
Modified: 2003-09-22 05:03 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Replacement for the current config.patch in the sqsh ebuild (config.patch,543 bytes, patch)
2003-09-12 10:57 UTC, chris strom
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description chris strom 2003-09-12 08:02:41 UTC
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.
Comment 1 chris strom 2003-09-12 10:57:09 UTC
Created attachment 17581 [details, diff]
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!
Comment 2 Seemant Kulleen (RETIRED) gentoo-dev 2003-09-22 05:03:04 UTC
nice work chris