[unixODBC-support] Re: Conencting to remote DB: ERROR: /opt/gupta/libsqlbaseodbc.so: undefined symbol: SQLConnect

Ryan Churches ryan.churches at gmail.com
Wed Aug 22 00:02:43 BST 2007

I should include some background information I forgot to mention
before.  My distro is gentoo (kernel 2.6.20), and i have version
2.2.12 of unixODBC installed.  I'm am currently doing this to
interface a web application with my company's point of sales software.
 This is not supported by the developers of the applicatiion using the
DB, though I did get it working relatively easily before the flood.

I've spoken with someone who knows a bit more about the linux OS than
I do, and he suspects the problem may be that the driver is not able
to find fucntions (in this case SQLConnect) which it was able to find

He suggested that I recompile the drivers, but this is of course an
impossibility as the driver is binary only.

Not being very esperienced with this type of thing I made sure I had
almost everything odbc related in my distro's (gentoo) package manager
installed, even though ldd implies no broken dependencies:

# ldd /opt/Gupta/SQLBaseintl/libsqlbaseodbc.so
        linux-gate.so.1 =>  (0xffffe000)
        libc.so.6 => /lib/libc.so.6 (0xf7dfe000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xf7de7000)
        libdl.so.2 => /lib/libdl.so.2 (0xf7de3000)
        libstdc++.so.5 => /usr/lib/libstdc++-v3/libstdc++.so.5 (0xf7d26000)
        libodbcinst.so.1 => /usr/lib/libodbcinst.so.1 (0xf7d13000)
        libicuuc.so.36 => /usr/lib/libicuuc.so.36 (0xf7bf9000)
        libicui18n.so.36 => /usr/lib/libicui18n.so.36 (0xf7abe000)
        libicudata.so.36 => /usr/lib/libicudata.so.36 (0xf710e000)
        /lib/ld-linux.so.2 (0x56555000)
        libm.so.6 => /lib/libm.so.6 (0xf70e9000)
        libgcc_s.so.1 =>
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libgcc_s.so.1 (0xf70dd000)
        libstdc++.so.6 =>
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libstdc++.so.6 (0xf6ffc000)

...then I set our to find any references to SQLConnect in /usr/include:

# grep -R SQLConnect /usr/include/
/usr/include/iodbc/sql.h:SQLRETURN SQL_API SQLConnect (
/usr/include/iodbc/sqlucode.h:SQLRETURN SQL_API SQLConnectW (
/usr/include/iodbc/sqlucode.h:SQLRETURN SQL_API SQLConnectA (
/usr/include/iodbc/sqlucode.h:#define SQLConnect                SQLConnectW
/usr/include/sql.h:    SQLRETURN  SQL_API SQLConnect(SQLHDBC ConnectionHandle,
/usr/include/sqlext.h:  (which supports SQLConnectW) when the
application is an ANSI application
/usr/include/sqlext.h:  (which calls SQLConnect, SQLDriverConnect, or
/usr/include/sqlucode.h:SQLRETURN SQL_API SQLConnectW(
/usr/include/sqlucode.h:SQLRETURN SQL_API SQLConnectA(
/usr/include/sqlucode.h:#define SQLConnect                      SQLConnectW

...and I see some macros which may or may not be the ones my driver
needs, but doesn't an "underfined symbol" imply it's looking for a
function?  If that were the case, and grep did infact find the logic
required to connect to my remote DB, wouldnt a recompile in fact be
the only solution?

I've contacted Centura/Gupta/Unify (whoever they are this month),
about trying the older version of the driver, which is no longer
available on thier web site.  Their customer support responded saying
they would forward the request to a tech, who i presume will attach
the older version of the driver and respond.

While that wouldnt really "solve" my problem, it might get it working.

Currently, I'm not looking for the soltuion, I would just like some
concrete notion of what the problem actually is.

On 8/19/07, Ryan Churches <ryan.churches at gmail.com> wrote:
> I don't remember running into this problem the last time I set this
> up.  I copied settings that used to work from my old odbc.ini and
> odbcinst.ini files, so I feel like those probably aren't the problem.
> here's what happens when I try to connect:
> # isql -v gupta1 username password
> [ISQL]ERROR: Could not SQLConnect
> ...  then I remember that I had needed support once before, and during
> the troubleshooting Nick asked me to try this:
> # dltest /opt/gupta/libsqlbaseodbc.so SQLConnect
> SUCCESS: Loaded /opt/gupta/libsqlbaseodbc.so
> ERROR: /opt/gupta/libsqlbaseodbc.so: undefined symbol: SQLConnect
>  Could not find SQLConnect
> The difference here is that last time I did not get that ERROR.
> So, I have no idea why this is happening, I was hoping someone could
> give me a hint.
> Thanks in advance!

More information about the unixODBC-support mailing list