Ruby-mysql install woes

OS X 10.4.10
ruby 1.8.4 (ruby installed using http://rubyosx.rubyforge.org/)

Trying to install riuby-mysql 2.7.4

Every blog & refc I can find doesn't work.

Using gem fails. Tried all the suggestions found on blogs.

Using the native package from tmtm.org fails, but I get further with it.

One tip I picked up which helps the native install to get further along
was to add "#define ulong unsigned long" at the top of the mysql.c file
(which does not exist with the gem install).

after I make install I get this response
/usr/bin/install -c -m 0755 mysql.bundle
/usr/local/lib/ruby/site_ruby/1.8/universal-darwin8.0

then I try to do a simple two liner just to see if I get complaints

#! /usr/local/bin/ruby
require 'mysql'

and indeed I get this complaint:

/usr/local/lib/ruby/site_ruby/1.8/universal-darwin8.0/mysql.bundle:
Failed to load
/usr/local/lib/ruby/site_ruby/1.8/universal-darwin8.0/mysql.bundle
(LoadError)

I'm no C geek, so I have no idea what to try next.

Ideas?

-- gw

···

--
Posted via http://www.ruby-forum.com/.

Greg Willits wrote:

OS X 10.4.10
ruby 1.8.4 (ruby installed using http://rubyosx.rubyforge.org/\)

Trying to install riuby-mysql 2.7.4
Using the native package from tmtm.org...
One tip I picked up which helps the native install to get further along
was to add "#define ulong unsigned long" at the top of the mysql.c file
after I make install I get this response
/usr/bin/install -c -m 0755 mysql.bundle
/usr/local/lib/ruby/site_ruby/1.8/universal-darwin8.0
then I try to do a simple two liner just to see if I get complaints
#! /usr/local/bin/ruby
require 'mysql'

and indeed I get this complaint:

/usr/local/lib/ruby/site_ruby/1.8/universal-darwin8.0/mysql.bundle:
Failed to load
/usr/local/lib/ruby/site_ruby/1.8/universal-darwin8.0/mysql.bundle
(LoadError)

btw the gcc I have installed is 4.01

looking closer, after make I get all this rot which maybe is meaningful
to someone. it looked to me like it's just recognizing that there's no
intel CPU, but maybe something in here is problematic?

gcc -I. -I. -I/usr/local/lib/ruby/1.8/universal-darwin8.0 -I.
-DHAVE_MYSQL_H
-I/usr/local/mysql-standard-5.0.27-osx10.4-powerpc/include -Os -arch ppc
-fno-common -fno-common -g -O2 -fno-common -pipe -fno-common -arch
i386 -c mysql.c

cc -dynamic -bundle -undefined suppress -flat_namespace -arch i386
-L"/usr/local/lib" -o mysql.bundle mysql.o -lruby
-L/usr/local/mysql-standard-5.0.27-osx10.4-powerpc/lib -lmysqlclient -lz
-lm -lpthread -ldl -lobjc

/usr/bin/ld: warning
/usr/local/mysql-standard-5.0.27-osx10.4-powerpc/lib/libmysqlclient.a
archive's cputype (18, architecture ppc) does not match cputype (7) for
specified -arch flag: i386 (can't load from it)

/usr/bin/ld: warning
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libz.dylib cputype (18,
architecture ppc) does not match cputype (7) for specified -arch flag:
i386 (file not loaded)

/usr/bin/ld: warning fat file:
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libm.dylib does not
contain an architecture that matches the specified -arch flag: i386
(file ignored)

/usr/bin/ld: warning fat file:
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libpthread.dylib does not
contain an architecture that matches the specified -arch flag: i386
(file ignored)

/usr/bin/ld: warning fat file:
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libdl.dylib does not
contain an architecture that matches the specified -arch flag: i386
(file ignored)

/usr/bin/ld: warning
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libobjc.dylib cputype
(18, architecture ppc) does not match cputype (7) for specified -arch
flag: i386 (file not loaded)

/usr/bin/ld: warning fat file:
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not
contain an architecture that matches the specified -arch flag: i386
(file ignored)

/usr/bin/ld: warning fat file: /usr/lib/libSystem.B.dylib does not
contain an architecture that matches the specified -arch flag: i386
(file ignored)

-- gw

···

--
Posted via http://www.ruby-forum.com/\.

Greg Willits wrote:

OS X 10.4.10
ruby 1.8.6 (ruby installed using http://rubyosx.rubyforge.org/\)

Trying to install mysql-ruby 2.7.4
Every blog & refc I can find doesn't work.
Using gem fails. Tried all the suggestions found on blogs.
Using the native package from tmtm.org fails, but I get further with it.

The gist of the trouble is that if you have a PowerPC Mac, the
instructions don't work as they assume an intel-based Mac.

I figured it out, and wrote up in detail what it took to make it work
for me.

http://www.railsdev.ws/blog/9/compiling-mysql-ruby-for-powerpc/

-- gw

···

--
Posted via http://www.ruby-forum.com/\.

OS X 10.4.10 on Power PC machine
ruby 1.8.4 (ruby installed using http://rubyosx.rubyforge.org/\)

Trying to install mysql-ruby 2.7.4
Using the native package from tmtm.org...
One tip I picked up which helps the native install to get further along
was to add "#define ulong unsigned long" at the top of the mysql.c file

I got it to work. Applied 25 years of engineering in various fields and
disciplines... and guessed. I'll write up details in a while, but just
wanted to say I managed to hack it into working.

-- gw

···

--
Posted via http://www.ruby-forum.com/\.