0

As I had major troubles installing ruby 1.8.7 on OSX Lion I did like it was proposed i.e. in one answer to Why can't I install Rails on Lion using RVM? and set my CC environment variable. I also used https://github.com/kennethreitz/osx-gcc-installer to get the non-LLVM gcc. I read that there could be problems with brews also, and gcc_select doesn't seem to be available anymore, so I decided to put this into my .zshrc:

# Lion ships with llvm-gcc-4.2 as default compiler, fix that as it breaks rubies and brews
export CC=/usr/bin/gcc-4.2
export CXX=/usr/bin/g++-4.2  

Now I'm wondering if there are other variables I should set, like CPP, CXXPP, LD, you name it. I'm not a gcc expert so could anyone lighten me up? What's the best practice here? I don't want to compile everything again so I figured I better ask :-)

Community
  • 1
  • 1
Paul Schyska
  • 666
  • 8
  • 17

1 Answers1

1

There should be nothing else to set. If you install ox-gcc-installer alone, it will handle installing any and all ruby and gem setups. Ruby uses C, and thus, gems that are natively compiled are also C based. Setting CPP and CXX are basically the same thing as CXX is for the C++ compiler binary, as well as CPP.

The only issue you should have with osx-gcc-installer and what you can do with RVM is that Node.js relies on Carbon headers which are only in the Xcode installer package, not osx-gcc-installer as its a strip job. That can easily be fixed by simply installing Xcode directly over osx-gcc-installer. Xcode sees it as an upgradable Xcode install.

ddd
  • 1,925
  • 12
  • 19