Hi everyone,

I'm messing around with the latest sqlrelay-0.53.1 source, and I can't get the configure script to detect my DB2 client correctly.

This is a CentOS 5.6 machine, 64 bit.  gcc 4.1.2.

The config.log shows:

configure:34754: checking for 32-bit build
configure:34780: g++ -o conftest   -I/opt/ibm/db2/V9.7/include  conftest.cc -L/opt/ibm/db2/V9.7/lib32 -ldb2 >&5
/usr/bin/ld: skipping incompatible /opt/ibm/db2/V9.7/lib32/libdb2.so when searching for -ldb2
/usr/bin/ld: cannot find -ldb2
collect2: ld returned 1 exit status
configure:34786: $? = 1
configure: failed program was:
| /* confdefs.h.  */
|
   ....



I copied the contents of the C++ test script into a new file, and tried to compile it from the command line:

sqlrelay-0.53.1]$ g++ -o conftest   -I/opt/ibm/db2/V9.7/include test.cpp -L/opt/ibm/db2/V9.7/lib32 -ldb2
/usr/bin/ld: skipping incompatible /opt/ibm/db2/V9.7/lib32/libdb2.so when searching for -ldb2
/usr/bin/ld: cannot find -ldb2
collect2: ld returned 1 exit status


I guess my first question, is why is it trying to compile a 32 bit binary on a 64-bit system?  I'd like to just create a 64-bit SQL Relay binary, but I don't see any architecture parameters on the configure script.

Second question, is if the 32-bit test is required, why does my gcc think the 32bit shared lib is incompatible?  I do have it set in ld.so.conf too:

$ ldconfig -p |grep libdb2.so
        libdb2.so.1 (libc6,x86-64) => /opt/ibm/db2/V9.7/lib64/libdb2.so.1
        libdb2.so.1 (libc6) => /opt/ibm/db2/V9.7/lib32/libdb2.so.1
        libdb2.so (libc6,x86-64) => /opt/ibm/db2/V9.7/lib64/libdb2.so
        libdb2.so (libc6) => /opt/ibm/db2/V9.7/lib32/libdb2.so

Thanks for any help!

--Cal