<snip>
Is your Ruby 32 or 64 bit (i.e. what does (2**32).class return)? Was
the underlying DB2 library built as 32 or 64 bit?
My initial guess is that you're trying to link a 64 bit Ruby against a
32 bit DB2 or vice-versa.
Try compiling the following program with "gcc -m64 -ldb2 -o foo foo.c"
and "gcc -m32 -ldb2 -o foo foo.c" and see what happens:
/* foo.c */
int main(){ return 0; }
Regards,
Dan
···
-----Original Message-----
From: Costas [mailto:c_piliotis@yahoo.com]
Sent: Monday, February 20, 2006 12:14 PM
To: ruby-talk ML
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
Costas
(Costas)
2
When I enter ruby -version I get:
ruby 1.8.4 (2005-12-24) [x86_64-linux]
I installed ruby from source using whatever compiler is on RHEL AS 4
I'm not trying to compile the program myself; I'm just using the
setup.rb file... no clue how to compile manually...
Costas
(Costas)
3
Oh, and 2**32 returns Fixnum on my x86_64 box.
Thanks in advance for your help... Mustn't be a lot of people using
Ruby with DB2...
I'm using Ruby with DB2. But I'm using the ODBC interface rather than
the native DB2 libraries. It works great, no hassles.
Costas wrote:
Oh, and 2**32 returns Fixnum on my x86_64 box.
You've got a 64 bit Ruby then.
Thanks in advance for your help... Mustn't be a lot of people using
Ruby with DB2...
What happened when you tried to compile that C program that I mentioned?
Regards,
Dan
Costas
(Costas)
6
I get this:
/usr/bin/ld: cannot find -ldb2
collect2: ld returned 1 exit status