DB2 Driver on RHEL 4 x86_64

C

Costas

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 */

--------------------
 
C

Costas

If anyone cares, I figured it out...

Apparently the installer doesn't look in DB2's lib64 directory. I
symlinked DB2's lib folder to lib64 and it installed fine.

I feel like suck a dunce for not seeing that. Thanks again for your
help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,967
Messages
2,570,148
Members
46,694
Latest member
LetaCadwal

Latest Threads

Top