Hi all

I've been trying to compile mysql-ruby on MacOS X 10.4 Tiger, but
having no luck.

When I run ruby extconf.rb --with-mysql-dir=/usr/local/mysql:
# ruby extconf.rb --with-mysql-dir=/usr/local/mysql
           checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... no
checking for mysql_query() in -lmysqlclient... no

... from what I can tell, that's because the mac version of MySQL
doesn't come with libmysqlclient.so - apparently the only way to get
that is to build mysql from source, which i'd like to avoid if
possible.

The install guide also suggests a different flag, --with-mysql-config:
# ruby extconf.rb --with-mysql-config
checking for mysql_ssl_set()... no
checking for mysql.h... yes
creating Makefile

Success? Well, just that step. I then run make, and get the following
output:
# make
gcc -fno-common -arch i386 -arch ppc -g -Os -pipe -fno-common -arch
i386 -arch ppc -pipe -pipe -fno-common  -I.
-I/usr/lib/ruby/1.8/powerpc-darwin8.0
-I/usr/lib/ruby/1.8/powerpc-darwin8.0 -I. -DHAVE_MYSQL_H
-I/usr/local/mysql/include -fno-omit-frame-pointer -c mysql.c
gcc: installation problem, cannot exec 'i686-apple-darwin8-gcc-4.0.0':
No such file or directory
mysql.c: In function 'query':
mysql.c:635: error: invalid storage class for function 'res_free'
lipo: can't figure out the architecture type of: /var/tmp//ccoPCQRI.out
make: *** [mysql.o] Error 255

'i686' looks strange to me. The version of gcc is 4.0.0 - if I run the
above gcc command with gcc-3.3 it comes up with a single line:
# gcc-3.3 -fno-common -arch i386 -arch ppc -g -Os -pipe -fno-common
-arch i386 -ar ppc -pipe -pipe -fno-common  -I.
-I/usr/lib/ruby/1.8/powerpc-darwin8.0
-I/usr/lib/ruby/1.8/powerpc-darwin8.0 -I. -DHAVE_MYSQL_H
-I/usr/local/mysql/include -fno-omit-frame-pointer -c mysql.c
gcc-3.3: cannot read specs file for arch `i386'

For reference's sake, I'm using MySQL 4.1.11 from the installer at
dev.mysql.org - which is why I'm not trying Ruby-MySQL (since it
doesn't like 4.1.*)

This happens on both 10.4.0 (which I was using last night) and 10.4.1.
I've not used ruby before, but the gems, rake and rails installs were
fine.

Any clues? Or should I just give in and compile mysql from scratch?