Hello,
i’m new to Ruby, but i have plenty of experience with Perl, C and Perl
extensions. I’m trying to set up the ruby-db2 extension (DB2CLI) on
ruby 1.6.7, RedHat 7.1 Linux.
After a little bit of manipulation in the generated Makefile (to make
it look for include files in $DB2DIR/include), i got everything to
compile and install. But, when i try to run the test samples, i get:
ruby: relocation error:
/usr/local/lib/ruby/site_ruby/1.6/i686-linux/db2/db2cli.so: undefined
symbol: SQLAllocHandle
I checked to make sure the directory with the DB2 shared libraries
is included in the LD_LIBRARY_PATH environment variable.
I’d appreciate any ideas on what’s causing this error and how to fix
it.
Thank you very much.
glauber
Well, nobody helped me :-), so i’m adding a followup in case someone
finds this thread by searching the archives.
In the end, the solution was to run ext/db2/extconf.rb by itself,
passing the 2 parameters:
ruby extconf.rb --with-db2-include=${DB2DIR}/include
–with-db2-lib=${DB2DIR}/lib
(Of course, use whatever directories make sense in your installation,
the places where the CLI include files are and where the libdb2.so
file is.)
Then, run the make, cd up 2 levels and do
ruby setup.rb install
It works fine now.
g
theglauber@my-deja.com (glauber) wrote in message news:892f97d1.0211111212.48e48cab@posting.google.com…
···
Hello,
i’m new to Ruby, but i have plenty of experience with Perl, C and Perl
extensions. I’m trying to set up the ruby-db2 extension (DB2CLI) on
ruby 1.6.7, RedHat 7.1 Linux.
After a little bit of manipulation in the generated Makefile (to make
it look for include files in $DB2DIR/include), i got everything to
compile and install. But, when i try to run the test samples, i get:
ruby: relocation error:
/usr/local/lib/ruby/site_ruby/1.6/i686-linux/db2/db2cli.so: undefined
symbol: SQLAllocHandle
I checked to make sure the directory with the DB2 shared libraries
is included in the LD_LIBRARY_PATH environment variable.
I’d appreciate any ideas on what’s causing this error and how to fix
it.
Thank you very much.
glauber