Closed brentredd closed 9 years ago
Downgrading Command Line Tools to 6.2 works for now until this gets resolved (I'm guessing by Apple):
gem install therubyracer -v '0.12.2'
Searching for the error message on Google yields results that lead me to believe that it indeed is a bug in the development environment provided by Apple. Thank you for the heads up
+1
This was the only way to install this gem for me as well. :disappointed:
Yes, this is a bug in the Command Line Tools distributed by Apple.
Until they release an official fix, the recommended course of action is to manually install version 6.2
Thanks! Reverting to version 6.2 solved it for me.
Thank you for this solution!
The official fix is Xcode 6.3.1 and/or Command Line Tools 6.3 with release date of Apr 21, 2015. The original buggy CLT 6.3 was released on Apr 9, 2015.
I just installed Command Line Tools 6.4 on 10.10.4, but I cannot install therubyracer 0.12.2. Initially both libv8 and therubyracer failed to install, but I reinstalled ruby 2.0.0-p353 and now libv8 3.16.14.8 installs with no problems but therubyracer still fails. The error does not look the same as reddshack but thought I would ask here since the new tools did not appear to totally solve my problem.
Error message from bundle install:
Installing therubyracer 0.12.2 with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/***/.rbenv/versions/2.0.0-p353/bin/ruby extconf.rb
checking for main() in -lpthread... yes
checking for main() in -lobjc... yes
checking for v8.h... yes
checking for main() in -lv8... yes
creating Makefile
make "DESTDIR="
compiling accessor.cc
clang: warning: argument unused during compilation: '-rdynamic'
In file included from accessor.cc:1:
In file included from ./rr.h:4:
/usr/local/include/v8.h:3915:36: error: 'v8::PropertyHandlerFlags' is not a class, namespace, or scoped enumeration
PropertyHandlerFlags flags = PropertyHandlerFlags::kNone)
^
/usr/local/include/v8.h:3943:36: error: 'v8::PropertyHandlerFlags' is not a class, namespace, or scoped enumeration
PropertyHandlerFlags flags = PropertyHandlerFlags::kNone)
^
In file included from accessor.cc:1:
./rr.h:358:39: error: no member named 'ScriptData' in namespace 'v8'
class ScriptData : public Pointer<v8::ScriptData> {
~~~~^
./rr.h:358:51: error: expected class name
class ScriptData : public Pointer<v8::ScriptData> {
^
./rr.h:360:21: error: no type named 'ScriptData' in namespace 'v8'; did you mean simply 'ScriptData'?
inline ScriptData(v8::ScriptData* d) : Pointer<v8::ScriptData>(d) {};
^~~~~~~~~~~~~~
ScriptData
./rr.h:358:7: note: 'ScriptData' declared here
class ScriptData : public Pointer<v8::ScriptData> {
^
./rr.h:360:54: error: no member named 'ScriptData' in namespace 'v8'
inline ScriptData(v8::ScriptData* d) : Pointer<v8::ScriptData>(d) {};
~~~~^
./rr.h:360:65: error: expected class member or base class name
inline ScriptData(v8::ScriptData* d) : Pointer<v8::ScriptData>(d) {};
^
./rr.h:360:65: error: expected '{' or ','
./rr.h:361:48: error: no member named 'ScriptData' in namespace 'v8'
inline ScriptData(VALUE value) : Pointer<v8::ScriptData>(value) {}
~~~~^
./rr.h:361:59: error: expected class member or base class name
inline ScriptData(VALUE value) : Pointer<v8::ScriptData>(value) {}
^
./rr.h:361:59: error: expected '{' or ','
./rr.h:463:14: error: no type named 'AccessorGetter' in namespace 'v8'
inline v8::AccessorGetter accessorGetter() {return &AccessorGetter;}
~~~~^
./rr.h:464:14: error: no type named 'AccessorSetter' in namespace 'v8'
inline v8::AccessorSetter accessorSetter() {return RTEST(set) ? &AccessorSetter : 0;}
~~~~^
./rr.h:466:14: error: no type named 'NamedPropertyGetter' in namespace 'v8'
inline v8::NamedPropertyGetter namedPropertyGetter() {return &NamedPropertyGetter;}
~~~~^
./rr.h:467:14: error: no type named 'NamedPropertySetter' in namespace 'v8'
inline v8::NamedPropertySetter namedPropertySetter() {return RTEST(set) ? &NamedPropertySetter : 0;}
~~~~^
./rr.h:468:14: error: no type named 'NamedPropertyQuery' in namespace 'v8'
inline v8::NamedPropertyQuery namedPropertyQuery() {return RTEST(query) ? &NamedPropertyQuery : 0;}
~~~~^
./rr.h:469:14: error: no type named 'NamedPropertyDeleter' in namespace 'v8'
inline v8::NamedPropertyDeleter namedPropertyDeleter() {return RTEST(deleter) ? &NamedPropertyDeleter : 0;}
~~~~^
./rr.h:470:14: error: no type named 'NamedPropertyEnumerator' in namespace 'v8'
inline v8::NamedPropertyEnumerator namedPropertyEnumerator() {return RTEST(enumerator) ? &NamedPropertyEnumerator : 0;}
~~~~^
./rr.h:472:14: error: no type named 'IndexedPropertyGetter' in namespace 'v8'
inline v8::IndexedPropertyGetter indexedPropertyGetter() {return &IndexedPropertyGetter;}
~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [accessor.o] Error 1
Gem files will remain installed in /Users/***/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/therubyracer-0.12.2 for inspection.
Results logged to /Users/***/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/therubyracer-0.12.2/ext/v8/gem_make.out
An error occurred while installing therubyracer (0.12.2), and Bundler cannot continue.
Make sure that `gem install therubyracer -v '0.12.2'` succeeds before bundling.
Please open a new issue for a new issue.
facing same issue as reported by @phyzzld,
wait for the new version of libv8 or build the gem yourself with rake https://github.com/cowboyd/libv8/pull/177
After updating my command line to 6.4
and then performing brew upgrade, the problem got resolved.
can confirm updating command line tools to 6.4 and performing brew update, does solve this problem.
Thank you all for reporting back that Command Line Tools 6.4 works.
Running Ruby 2.2.1 and OS X 10.10.3. The latest Command Line Tools update appears to break
therubyracer
orlibv8
. This might actually be a bug with Command Line Tools 6.3 and nottherubyracer
. I've tried uninstallinglibv8 (3.16.14.7 x86_64-darwin-14)
and reinstaling using--with-system-v8
and also deleting myGemfile.lock
and runningbundle
. When I rungem install therubyracer -v '0.12.2'
I get: