I'm attempting to install the MySql DBI interface stuff for Ruby, and
am getting spanked for my trouble :-).  I'm on a SPARC machine running
Solaris 2.8.  I've been running Ruby trouble-free for a few weeks now.
 I haven't done any C stuff in a near-lifetime, and I think that's
what's getting me messed up.  Anyway, here are the steps I've
followed:

After having updated my extconf.rb file as follows:

require 'mkmf'
MYSQLDIR = "/opt/mysql"
$CFLAGS = "-I#{MYSQLDIR}/include"
$LDFLAGS = "-L#{MYSQLDIR}/lib/mysql"    <--- what's this for?
$libs = "/opt/mysql/lib/libmysqlclient.a"
create_makefile("mysql")

And hacking the mysql.c file to remove the extra mysql/ in the
#includes, I've got an .so file:

1314 $>ll *.so
-rwxr-xr-x   1 thomasmi staff     261976 Sep 19 12:26 mysql.so*

However, when I run the test utility I get:

1315 $>ruby -I. test.rb yadda yadda yadda
test.rb:11:in `require': ld.so.1: ruby: fatal: relocation error: file
../mysql.so: symbol inet_addr: referenced symbol not found - ./mysql.so
(LoadError)
        from test.rb:11

I went ahead and ran 'make install' just for fun, then ran Ruby
interactively:

irb(main):001:0> require 'mysql.o'  # like in test.rb
LoadError: ld.so.1: ruby: fatal: relocation error: file
/usr/local/lib/ruby/1.6/sparc-solaris2.8/mysql.so: symbol inet_addr:
referenced symbol not found -
/usr/local/lib/ruby/1.6/sparc-solaris2.8/mysql.so
        from (irb):1:in `require'
        from (irb):1
irb(main):002:0> require 'mysql'
false
irb(main):003:0> require 'mysql.so'
false
irb(main):004:0> 


But mysql.so is there, all right:
1317 $>ll /usr/local/lib/ruby/1.6/sparc-solaris2.8/mysql.so  
-r-xr-xr-x   1 root     other     261976 Sep 19 12:31
/usr/local/lib/ruby/1.6/sparc-solaris2.8/mysql.so*

So, what's up?  I'm assuming I've done something ignorant with the
extconf.rb file (note the <--- comment above).  Anyone got any ideas?

TIA, very much...