[unixODBC-support] How to make a 32 bit application work with unixodbc in a 64 bit environment

arkangelboss at gmail.com arkangelboss at gmail.com
Wed Apr 6 14:29:18 BST 2011


Thanks Nick! You gave me the right hint!

I've checked every lib through 'ldd' and I found that a dependency was
broken in the 32 bit chain.
The whole thing now works like a charm: i386 executables get the 32 bit
driver manager and driver, while AMD64 will go through the usual path.

Angelo

On Wed, Apr 6, 2011 at 15:15, Nick Gorham <nick at lurcher.org> wrote:

> On 06/04/11 14:09, arkangelboss at gmail.com wrote:
>
>> Hi all,
>>
>> I'm working with ubuntu 10.10 and unixodbc 2.2.14p2-1ubuntu1 in a AMD64
>> environment.
>> I need to make work a 32 bit application through the odbc interface, but
>> it refuses to SQLConnect. To better debug I've downloaded the i386 versions
>> of both the unixodbc and the driver I need (postgresql-odbc), I've set up
>> the odbcinst.ini to point the i386 driver. When using the i386 isql,
>> downloaded with the i386 unixodbc, it complains
>>
>> [01000][unixODBC][Driver Manager]Can't open lib
>> '/usr/lib32/odbc/psqlodbca.so' : file not found
>>
>> while the file, which is the i386 postgresql driver I downloaded, is
>> actually there.
>>
>> It seems to me that the problem is in the mixed i386/AMD64 chain...
>>
>> Is it possible to set up a unixodbc installation so that a i386 executable
>> will pass through a i386 driver manager and load the appropriate driver as
>> stated in odbcinst.ini?
>>
>
> Yes, just use file on each of the parts in tern to check they are the 32
> bit types.
>
> Also check the file not found, is not a dependent lib of the
> /usr/lib32/odbc/psqlodbca.so
>
> file /usr/lib32/odbc/psqlodbca.so
> kdd /usr/lib32/odbc/psqlodbca.so
>
> Also you should be able to do this
>
>
> [PostgreSQL ANSI]
> Description        = PostgreSQL ODBC driver (ANSI version)
> Driver        = /usr/lib32/odbc/psqlodbca.so
> Driver64        = /usr/lib/odbc/psqlodbca.so
> Setup        = /usr/lib32/odbc/libodbcpsqlS.so
> Setup64        = /usr/lib/odbc/libodbcpsqlS.so
>
> Debug        = 0
> CommLog        = 1
> FileUsage       = 1
> UsageCount    = 1
>
>
> --
> Nick
> _______________________________________________
> unixODBC-support mailing list
> unixODBC-support at mailman.unixodbc.org
> http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20110406/e6f3fa93/attachment.html>


More information about the unixODBC-support mailing list