Bugs: Browse | Submit New | Admin

[#12656] can't build mysql gem on PPC

Date:
2007-07-28 18:10
Priority:
3
Submitted By:
Nobody
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
can't build mysql gem on PPC

Detailed description
Tried to build mysql gem but throws an error. Checking the log, lead me to the reason, it sends the i386 flag for compiling
in a PPC, I compiled Ruby in my machine and the error went away.

Excellent install system, no time lost on compiling and includes the basic structure, excellent work! Just wrote to
let you know of that error.

Add A Comment: Notepad

Please login


Followup

Message
Date: 2011-12-01 01:16
Sender: Dave Howell

Seconded. The solution isn't, actually, to change "-arch
i386" to "-arch ppc". The best thing to do is
to set it to "". Hard-coding "i386" into
the rbconfig.rb file of an install package that's intended for
10.4 is going to waste a lot of people's time. It certainly wasted
quite a bit of mine trying to figure out why on earth gem kept
building i386 binaries when it was installed on my G4 TiBook.

My original preference was to have it make universal binaries,
but I quickly discovered there were way too many .dylibs that
weren't universal, and the process errors out unless it can completely
build both parts of the universal binary.
Date: 2008-01-13 21:29
Sender: Mark Reid

I had the same problem but found a quick and dirty fix. 

The problem seems to be that the Rake install that comes with
the package is configured incorrectly for PPC. My fix was to
edit the `rbconfig.rb` file found in
`/usr/local/lib/ruby/1.8/universal-darwin8.0/rbconfig.rb` and
change line 91 from:

  CONFIG["ARCH_FLAG"] = " -arch i386"

to

  CONFIG["ARCH_FLAG"] = " -arch ppc"

This got the hpricot gem installing without any trouble. 
Date: 2007-10-02 01:46
Sender: Michal Fouquette

Seeing the same or a very similar error on my PPC machine attempting
to build the ruby-opengl gem: gem reports that my system is i386
and so sends the wrong arch flag when building the ruby-opengl
gem.

I was able to reproduce this on several PPC machines with the
following steps:
1) Install ruby with the one click installer.
2) set path to include /usr/local/bin
3) sudo gem install -r ruby-opengl
3a) Notice that gem is reporting the machine as universal-darwin
and not powerpc-darwin)
4) in irb attempt to require rubygems and then gl (error on attempting
to require gl)

Investigating the rakefiles created by mkrf for ruby-opengl showed
that the arch flag 'i386' was being passed to gcc.

Recompiling ruby eliminates the error.

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item