I am unable to install my gem bundle on my new Mac running Yosemite, because one gem only installs with the C compiler that shipped with the OS, while another requires the C compiler from Homebrew.
I am unable to work at all simply because of this error that the supposedly new gcc
version 4.9.1
has:
cc1: error: -Werror=shorten-64-to-32: no option -Wshorten-64-to-32
I don't understand what this error means, nor how to tell the compiler to ignore it. Or even it that's possible
My specific situation is that running bundle install
fails on the v8
gem:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/me/.rbenv/versions/2.1.0/bin/ruby extconf.rb
creating Makefile
Compiling v8 for x64
Using python 2.7.6
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Unable to find a compiler officially supported by v8.
It is recommended to use GCC v4.4 or higher
Using compiler: g++
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Unable to find a compiler officially supported by v8.
It is recommended to use GCC v4.4 or higher
../src/cached-powers.cc:136:18: error: unused variable 'kCachedPowersLength' [-Werror,-Wunused-const-variable]
static const int kCachedPowersLength = ARRAY_SIZE(kCachedPowers);
The g++
compiler that ships with the new version of XCode
gives this as the version:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
So, 4.2
is pretty old. If I could just configure that one gem to build with the Homebrew gcc
, which is 4.9.1, I would think it would work.
I tried setting my CC
and CXX
variables to the Homebrew gcc
, but then the Nokogiri
gem would not install with the first error message above. So many more gems installed with the Yosemite cc that maybe leaving that there is the best route. I don't know.