<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>28526</bug_id>
          
          <creation_ts>2003-09-12 08:02 0000</creation_ts>
          <short_desc>sqsh not using freetds</short_desc>
          <delta_ts>2003-09-22 05:03:04 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Development</component>
          <version>1.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>cstrom@speakeasy.net</reporter>
          <assigned_to>bug-wranglers@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>cstrom@speakeasy.net</who>
            <bug_when>2003-09-12 08:02:41 0000</bug_when>
            <thetext>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 &apos;\warranty&apos;

And it just hangs there.  I&apos;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&apos;ve tried compiling directly from source &amp; with the latest Debian patches,
but without success.  Could this be an issue with ~x86 (where I&apos;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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>cstrom@speakeasy.net</who>
            <bug_when>2003-09-12 10:57:09 0000</bug_when>
            <thetext>Created an attachment (id=17581)
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&apos; 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!</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>seemant@gentoo.org</who>
            <bug_when>2003-09-22 05:03:04 0000</bug_when>
            <thetext>nice work chris</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>17581</attachid>
            <date>2003-09-12 10:57 0000</date>
            <desc>Replacement for the current config.patch in the sqsh ebuild</desc>
            <filename>config.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">NTksNjBjNTksNjAKPCAvKiAjdW5kZWYgSEFWRV9TVFJDQVNFQ01QICovCjwgLyogI3VuZGVmIEhB
VkVfU1RSRVJST1IgKi8KLS0tCj4gI2RlZmluZSBIQVZFX1NUUkNBU0VDTVAgMQo+ICNkZWZpbmUg
SEFWRV9TVFJFUlJPUiAxCjYyLDY3YzYyLDY3CjwgLyogI3VuZGVmIEhBVkVfU1RSRlRJTUUgKi8K
PCAvKiAjdW5kZWYgSEFWRV9NRU1DUFkgKi8KPCAvKiAjdW5kZWYgSEFWRV9NRU1NT1ZFICovCjwg
LyogI3VuZGVmIEhBVkVfTE9DQUxUSU1FICovCjwgLyogI3VuZGVmIEhBVkVfVElNRUxPQ0FMICov
CjwgLyogI3VuZGVmIEhBVkVfU1RSQ0hSICovCi0tLQo+ICNkZWZpbmUgSEFWRV9TVFJGVElNRSAx
Cj4gI2RlZmluZSBIQVZFX01FTUNQWSAxCj4gI2RlZmluZSBIQVZFX01FTU1PVkUgMQo+ICNkZWZp
bmUgSEFWRV9MT0NBTFRJTUUgMQo+ICNkZWZpbmUgSEFWRV9USU1FTE9DQUwgMQo+ICNkZWZpbmUg
SEFWRV9TVFJDSFIgMQo2OWM2OQo8IC8qICN1bmRlZiBIQVZFX0dFVFRJTUVPRkRBWSAqLwotLS0K
PiAjZGVmaW5lIEhBVkVfR0VUVElNRU9GREFZIDEK
</data>        

          </attachment>
    </bug>

</bugzilla>