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

Nick Gorham nick at lurcher.org
Wed Apr 6 14:15:07 BST 2011

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 

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


More information about the unixODBC-support mailing list