From: Costas Date: 2006-02-21T04:13:31+09:00 Subject: DB2 Driver on RHEL 4 x86_64 Having some trouble getting the Ruby/DB2 Driver going on my x86_64 box... FWIW, I'm using DB2 8.1, and have set DB2DIR=/opt/IBM/db2/V8.1 ; I'm pretty sure the path is correct, and I'm installing as root. I'm trying to install from ruby-db2-0.4.4 ruby setup.rb config setup.rb:714: warning: don't put space before argument parentheses entering config phase... config done. Runs perfectly. However it pukes when I run: ruby setup.rb setup setup.rb:714: warning: don't put space before argument parentheses entering setup phase... /usr/local/bin/ruby extconf.rb checking for SQLConnect() in -ldb2... no ABORT: Could not locate DB2 libraries or headers! Please set DB2DIR to your DB2 directory, e.g. /usr/IBMdb2/V7.1 (UNIX) or C:/SQLLIB (Windows) *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. mkmf.log: have_library: checking for SQLConnect() in -ldb2... -------------------- no "gcc -o conftest -I. -I/usr/local/lib/ruby/1.8/x86_64-linux -I/opt/IBM/db2/V8.1/include -g -O2 conftest.c -L'/opt/IBM/db2/V8.1/lib' -Wl,-R'/opt/IBM/db2/V8.1/lib' -L'/usr/local/lib' -Wl,-R'/usr/local/lib' -lruby-static -ldb2 -ldl -lcrypt -lm -lc" /usr/bin/ld: skipping incompatible /opt/IBM/db2/V8.1/lib/libdb2.so when searching for -ldb2 /usr/bin/ld: cannot find -ldb2 collect2: ld returned 1 exit status checked program was: /* begin */ /*top*/ int main() { return 0; } int t() { SQLConnect(); return 0; } /* end */ "gcc -o conftest -I. -I/usr/local/lib/ruby/1.8/x86_64-linux -I/opt/IBM/db2/V8.1/include -g -O2 conftest.c -L'/opt/IBM/db2/V8.1/lib' -Wl,-R'/opt/IBM/db2/V8.1/lib' -L'/usr/local/lib' -Wl,-R'/usr/local/lib' -lruby-static -ldb2 -ldl -lcrypt -lm -lc" conftest.c: In function `t': conftest.c:5: error: `SQLConnect' undeclared (first use in this function) conftest.c:5: error: (Each undeclared identifier is reported only once conftest.c:5: error: for each function it appears in.) checked program was: /* begin */ /*top*/ int main() { return 0; } int t() { void ((*volatile p)()); p = (void ((*)()))SQLConnect; return 0; } /* end */ --------------------