Forum: Ruby Re: DB2 Driver on RHEL 4 x86_64

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F3b7b8756d0c7f71cc7460cc33aefaee?d=identicon&s=25 Berger, Daniel (Guest)
on 2006-02-20 20:24
(Received via mailing list)
> 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
191892d384f720c5021c3c9454696758?d=identicon&s=25 Costas (Guest)
on 2006-02-20 22:29
(Received via mailing list)
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...
191892d384f720c5021c3c9454696758?d=identicon&s=25 Costas (Guest)
on 2006-02-20 22:49
(Received via mailing list)
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...
Ea97ad3789541367331966f009f549cb?d=identicon&s=25 Chris McMahon (Guest)
on 2006-02-20 23:02
(Received via mailing list)
I'm using Ruby with DB2.  But I'm using the ODBC interface rather than
the native DB2 libraries.  It works great, no hassles.
F3b7b8756d0c7f71cc7460cc33aefaee?d=identicon&s=25 Daniel Berger (Guest)
on 2006-02-20 23:33
(Received via mailing list)
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
191892d384f720c5021c3c9454696758?d=identicon&s=25 Costas (Guest)
on 2006-02-21 01:04
(Received via mailing list)
I get this:

/usr/bin/ld: cannot find -ldb2
collect2: ld returned 1 exit status
This topic is locked and can not be replied to.