我在OS X Mavericks(10.9.4)上安装Ruby libv8 gem时遇到问题,我收到以下错误:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-2.0.0-p451/bin/ruby extconf.rb
creating Makefile
/usr/local/rvm/gems/ruby-2.0.0-p451/gems/libv8-3.11.8.13/ext/libv8/compiler.rb:30: warning: Insecure world writable dir /usr/local/rvm/gems/ruby-2.0.0-p451/bin in PATH, mode 040777
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++
../src/cached-powers.cc:136:18: error: unused variable 'kCachedPowersLength' [-Werror,-Wunused-const-variable]
static const int kCachedPowersLength = ARRAY_SIZE(kCachedPowers);
Run Code Online (Sandbox Code Playgroud)
当使用以下内容时,我试图告诉clang不要输出错误,但无效但结果是相同的:
ARCHFLAGS=-Wno-error=unused-const-variable gem install libv8 -v '3.11.8.13'
Run Code Online (Sandbox Code Playgroud)
我错过了什么命令行选项?
谢谢