我在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);
当使用以下内容时,我试图告诉clang不要输出错误,但无效但结果是相同的:
ARCHFLAGS=-Wno-error=unused-const-variable gem install libv8 -v '3.11.8.13'
我错过了什么命令行选项?
谢谢
我的机器上有同样的问题.使用该--with-system-v8
标志解决了问题.这里有关于此标志的完整文档.