ruby-mysql install woes

Discussion in 'Ruby' started by Greg Willits, Oct 27, 2007.

  1. Greg Willits

    Greg Willits Guest

    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, Oct 27, 2007
    #1
    1. Advertising

  2. Greg Willits

    Greg Willits Guest

    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, Oct 27, 2007
    #2
    1. Advertising

  3. Greg Willits

    Greg Willits Guest

    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/.
     
    Greg Willits, Oct 27, 2007
    #3
  4. Greg Willits

    Greg Willits Guest

    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/.
     
    Greg Willits, Oct 28, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. washakie
    Replies:
    4
    Views:
    955
    washakie
    Jan 15, 2008
  2. Randy Lawrence

    mysql-ruby or ruby-mysql?

    Randy Lawrence, May 23, 2004, in forum: Ruby
    Replies:
    3
    Views:
    121
    Randy Lawrence
    May 24, 2004
  3. Ronald Fischer

    MySql+UTF8 woes

    Ronald Fischer, Jul 26, 2007, in forum: Ruby
    Replies:
    0
    Views:
    133
    Ronald Fischer
    Jul 26, 2007
  4. Pierre Pepe

    RMagick Install Woes ;_;

    Pierre Pepe, Mar 9, 2011, in forum: Ruby
    Replies:
    5
    Views:
    192
    Luis Lavena
    Mar 10, 2011
  5. Xevo

    GD.pm install woes

    Xevo, Oct 30, 2004, in forum: Perl Misc
    Replies:
    4
    Views:
    231
Loading...

Share This Page