So i'm running into this error where incorrect options are getting
passed to GCC when installing.
I recently installed lion from scratch and the new version of XCode
really messed me up. I tried to install gcc from source, which didn't
work, then I just resorted to using `brew install gcc` and that seemed
to fix all my problems for all other gems. However, I still have
problems with this one gem. I believe it may be a one off problem
with my environment, but i really would like to avoid reinstalling or
messing with GCC. Are there any args I can pass to prevent passing
this option or passing the correct option?
============================================================
Installing capybara-webkit (0.10.0) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native
extension.
/Users/davidconner/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
extconf.rb
cd src/ && /usr/local/bin/qmake /Users/davidconner/.rvm/gems/
ruby-1.9.2-p290@market_art_ems/gems/capybara-webkit-0.10.0/src/
webkit_server.pro -spec /usr/local/Cellar/qt/4.8.0/mkspecs/macx-g++ -o
Makefile.webkit_server
cd src/ && make -f Makefile.webkit_server
g++ -c -pipe -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -
Wall -W -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -
DQT_CORE_LIB -DQT_SHARED -I/usr/local/Cellar/qt/4.8.0/mkspecs/macx-g++
-I. -I/usr/local/Cellar/qt/4.8.0/lib/QtCore.framework/Versions/4/
Headers -I/usr/local/Cellar/qt/4.8.0/lib/QtCore.framework/Versions/4/
Headers -I/usr/local/Cellar/qt/4.8.0/lib/QtNetwork.framework/Versions/
4/Headers -I/usr/local/Cellar/qt/4.8.0/lib/QtNetwork.framework/
Versions/4/Headers -I/usr/local/Cellar/qt/4.8.0/lib/QtGui.framework/
Versions/4/Headers -I/usr/local/Cellar/qt/4.8.0/lib/QtGui.framework/
Versions/4/Headers -I/usr/local/Cellar/qt/4.8.0/lib/QtWebKit.framework/
Versions/4/Headers -I/usr/local/Cellar/qt/4.8.0/lib/QtWebKit.framework/
Versions/4/Headers -I/usr/local/Cellar/qt/4.8.0/include -I. -F/usr/
local/Cellar/qt/4.8.0/lib -o CurrentUrl.o CurrentUrl.cpp
g++: unrecognized option '-Xarch_x86_64'
cc1plus: error: unrecognized command line option "-arch"
make[1]: *** [CurrentUrl.o] Error 1
make: *** [sub-src-webkit_server-pro-make_default-ordered] Error 2
make
cd src/ && make -f Makefile.webkit_server
g++ -c -pipe -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -
Wall -W -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -
DQT_CORE_LIB -DQT_SHARED -I/usr/local/Cellar/qt/4.8.0/mkspecs/macx-g++
-I. -I/usr/local/Cellar/qt/4.8.0/lib/QtCore.framework/Versions/4/
Headers -I/usr/local/Cellar/qt/4.8.0/lib/QtCore.framework/Versions/4/
Headers -I/usr/local/Cellar/qt/4.8.0/lib/QtNetwork.framework/Versions/
4/Headers -I/usr/local/Cellar/qt/4.8.0/lib/QtNetwork.framework/
Versions/4/Headers -I/usr/local/Cellar/qt/4.8.0/lib/QtGui.framework/
Versions/4/Headers -I/usr/local/Cellar/qt/4.8.0/lib/QtGui.framework/
Versions/4/Headers -I/usr/local/Cellar/qt/4.8.0/lib/QtWebKit.framework/
Versions/4/Headers -I/usr/local/Cellar/qt/4.8.0/lib/QtWebKit.framework/
Versions/4/Headers -I/usr/local/Cellar/qt/4.8.0/include -I. -F/usr/
local/Cellar/qt/4.8.0/lib -o CurrentUrl.o CurrentUrl.cpp
g++: unrecognized option '-Xarch_x86_64'
cc1plus: error: unrecognized command line option "-arch"
make[1]: *** [CurrentUrl.o] Error 1
make: *** [sub-src-webkit_server-pro-make_default-ordered] Error 2
Gem files will remain installed in /Users/davidconner/.rvm/gems/
ruby-1.9.2-p290@market_art_ems/gems/capybara-webkit-0.10.0 for
inspection.
Results logged to /Users/davidconner/.rvm/gems/ruby-1.9.2-
p290@market_art_ems/gems/capybara-webkit-0.10.0/./gem_make.out
An error occured while installing capybara-webkit (0.10.0), and
Bundler cannot continue.
Make sure that `gem install capybara-webkit -v '0.10.0'` succeeds
before bundling.