[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: DB2 Driver on RHEL 4 x86_64

Berger, Daniel

2/20/2006 7:23:00 PM

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

<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



5 Answers

Costas

2/20/2006 9:27:00 PM

0

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

2/20/2006 9:47:00 PM

0

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...

Chris McMahon

2/20/2006 9:54:00 PM

0


I'm using Ruby with DB2. But I'm using the ODBC interface rather than
the native DB2 libraries. It works great, no hassles.

Berger, Daniel

2/20/2006 10:32:00 PM

0

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

2/21/2006 12:02:00 AM

0

I get this:

/usr/bin/ld: cannot find -ldb2
collect2: ld returned 1 exit status