[unixODBC-support] ./configure is taking forever

Reza Taheri rtaheri at vmware.com
Sun Feb 5 03:11:54 GMT 2012


Strace was a good idea. This is what I saw:


-          Using strace on odbcinst -q, saw that we were missing the dbcinst.ini file. How is that possible? Well, we are picking up the odbcinst commands from /usr/local/bin instead of /usr/bin. The new command looks for odbcinst.ini in /usr/local/etc, and that file is empty.

o   Copy /etc/odbcinst.ini /usr/local/etc

o   Make these changes:
Driver64      = /usr/local/lib/psqlodbcw.so
Setup64               = /usr/local/lib/libodbcpsqlS.so

o   odbcinst now runs OK. But we still get error messages from the SUT process:
DBConnector: Failed to connect

The driver reported the following diagnostics whilst running SQLDriverConnect

01000:1:0:[unixODBC][Driver Manager]Can't open lib '/usr/local/lib/psqlodbcw.so' : libodbcinst.so.2: cannot open shared object file: No such  file or directory

The problem is that psqlodbcw.so looks for libodbcinst.so.2, and that file is missing. When I make the unix odbc libraries, I get libodbcinst.so.1

I can fake this out, but I first tried to remake psqlodbc with LDFLAGS set to include /usr/local/lib, but now am running into compilations problems there :(.  Will continue tomorrow.

Thanks for listening!

Reza

From: Nick Gorham [mailto:nick at lurcher.org]
Sent: Saturday, February 04, 2012 2:24 PM
To: Support for the unixODBC project
Cc: Reza Taheri
Subject: Re: [unixODBC-support] ./configure is taking forever

On 04/02/2012 21:47, Reza Taheri wrote:
Hi Nick,
I am running into some issues that I didn't have with the stock unixODBC-2.2.14-11.el6.x86_64 and postgresql-odbc-08.04.0200-1.el6.x86_64.. I'll be willing to move to 2.3.2pre, but my problems appear to be the type that wouldn't be fixed by such a move.


-          Before installing unixODBC from source, I got the source for psqlodbc-08.04.0200. I compiled it and installed it, and switched to it: In odbcinst.ini, changed
Driver64        = /usr/local/lib/psqlodbcw.so

-          It seemed to have worked fine. I could run my test, and using perf record/report, I now get a call graph with function names that I couldn't before (the original psqlodbcw.so library was stripped).

-          I tried to do the same thing for unixODBC. I compiled and installed it. But after making the following change, we were still picking up the original drivers in /usr/lib64:
In odbcinst.ini, changed: Setup64         = /usr/local/lib/libodbcpsqlS.so

-          At this point, I moved all the libodbc* modules in /usr/lib64 to a different directory, and copied all the libodbc* files in /usr/local/lib to /usr/lib64

-          Now when I try to connect to the PGSQL database, I get:
DBConnector: Failed to connect

The driver reported the following diagnostics whilst running SQLDriverConnect

IM002:1:0:[unixODBC][Driver Manager]Data source name not found, and no default driver specified

-          Following the instructions in http://www.easysoft.com/developer/interfaces/odbc/linux.html, looked for missing libraries. Library /usr/lib64/psqlodbc.so is linked to psqlodbcw.so, which is missing libodbcinst.so.2. So I did:
ln -s libodbcinst.so.1.0.0 libodbcinst.so.2

-          I still get the same error

-          Odbcinst gives this error:
# odbcinst -q -s
odbcinst: SQLGetPrivateProfileString failed with .

-          Obviously, my installation was not totally successful. How can get to a clean, sane state?

What is the significance of the .1 and .2 suffixes for the libraries?

Wen 2.3.1 changed to use 64 bit SQLLEN by default, I changed the minor lib number to try and indicate this change has taken place/

Simplest way of seeing whats going on is to use strace to see what goes on under the hood.

--
Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20120204/09fc4081/attachment-0001.html>


More information about the unixODBC-support mailing list