luislavena / mysql-gem

MySQL/Ruby Bindings, wrapped as Gem with improved cross-platform support
http://rubyforge.org/projects/mysql-win
Other
53 stars 20 forks source link

Compilation on Snow Leopard #2

Closed kostia closed 14 years ago

kostia commented 14 years ago

Hi,

the extension doesn't compile on Snow Leopard. I fixed it by editing the autogenerated Makefile:

mf = File.read("Makefile")
open("Makefile", "w") do |f| 
  f << mf.gsub(/-ppc/, '').gsub(/-arch i386/, '') 
end 

But i couldn't find out how to make the rake-compiler to do the hook automatically.

luislavena commented 14 years ago

There has been over internet a series of patches about fixing the issue with multiple flags for compilaation for Snow Leopard.

Still didn't find one that solves properly. In your case you're forcing directly to be i386, while it may be x86_64 or even ppc for others.

Would like to integrate in the gem a patch that works for all.

luislavena commented 14 years ago

Fixed by cf0baba6ac03eaa6f61a1876ab9cde054cf14b7f