rubyjs / therubyracer

Embed the V8 Javascript Interpreter into Ruby
1.66k stars 192 forks source link

OSX 10.10 Yosemite beta 3 Failed #307

Closed edolyne closed 10 years ago

edolyne commented 10 years ago

I know that I am running BETA software and that it's not fully supported but wanted to raise this issue. Prior to beta 3 therubyracer would not recognize libv8 if it was using the system v8, but it is now recognizing it and failing with the message below. I am not familiar with ruby, but one of the environments I work in relies on it and wanted to put this out to someone who might be able to work a fix. I also tried installing from develop and had the same results.

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/Users/edolyne/.rvm/rubies/ruby-2.1.2/bin/ruby extconf.rb 

checking for main() in -lpthread... yes checking for main() in -lobjc... yes checking for v8.h... yes creating Makefile

make "DESTDIR=" clean

make "DESTDIR=" compiling accessor.cc clang: warning: argument unused during compilation: '-rdynamic' In file included from accessor.cc:1: ./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;}
         ~~~~^
./rr.h:473:14: error: no type named 'IndexedPropertySetter' in namespace 'v8'
  inline v8::IndexedPropertySetter indexedPropertySetter() {return RTEST(set) ? &IndexedPropertySetter : 0;}
         ~~~~^
./rr.h:474:14: error: no type named 'IndexedPropertyQuery' in namespace 'v8'
  inline v8::IndexedPropertyQuery indexedPropertyQuery() {return RTEST(query) ? &IndexedPropertyQuery : 0;}
         ~~~~^
./rr.h:475:14: error: no type named 'IndexedPropertyDeleter' in namespace 'v8'
  inline v8::IndexedPropertyDeleter indexedPropertyDeleter() {return RTEST(deleter) ? &IndexedPropertyDeleter : 0;}
         ~~~~^
./rr.h:476:14: error: no type named 'IndexedPropertyEnumerator' in namespace 'v8'
  inline v8::IndexedPropertyEnumerator indexedPropertyEnumerator() {return RTEST(enumerator) ? &IndexedPropertyEnumerator : 0;}
         ~~~~^
./rr.h:482:16: error: no type named 'AccessorInfo' in namespace 'v8'; did you mean 'Accessor'?
    Info(const v8::AccessorInfo& info);
               ^~~~~~~~~~~~~~~~
               Accessor
./rr.h:456:7: note: 'Accessor' declared here
class Accessor {
      ^
./rr.h:488:18: error: no type named 'AccessorInfo' in namespace 'v8'; did you mean 'Accessor'?
    inline const v8::AccessorInfo\* operator->() {return this->info;}
                 ^~~~~~~~~~~~~~~~
                 Accessor
./rr.h:456:7: note: 'Accessor' declared here
class Accessor {
      ^
./rr.h:502:11: error: no type named 'AccessorInfo' in namespace 'v8'; did you mean 'Accessor'?
    const v8::AccessorInfo\* info;
          ^~~~~~~~~~~~~~~~
          Accessor
./rr.h:456:7: note: 'Accessor' declared here
class Accessor {
      ^
./rr.h:506:85: error: no type named 'AccessorInfo' in namespace 'v8'; did you mean 'Accessor'?
  static v8::Handlev8::Value AccessorGetter(v8::Localv8::String property, const v8::AccessorInfo& info);
                                                                                    ^~~~~~~~~~~~~~~~
                                                                                    Accessor
./rr.h:456:7: note: 'Accessor' declared here
class Accessor {
      ^
./rr.h:507:96: error: no type named 'AccessorInfo' in namespace 'v8'; did you mean 'Accessor'?
  static void AccessorSetter(v8::Localv8::String property, v8::Localv8::Value value, const v8::AccessorInfo& info);
                                                                                               ^~~~~~~~~~~~~~~~
                                                                                               Accessor
./rr.h:456:7: note: 'Accessor' declared here
class Accessor {
      ^
./rr.h:509:90: error: no type named 'AccessorInfo' in namespace 'v8'; did you mean 'Accessor'?
  static v8::Handlev8::Value NamedPropertyGetter(v8::Localv8::String property, const v8::AccessorInfo& info);
                                                                                         ^~~~~~~~~~~~~~~~
                                                                                         Accessor
./rr.h:456:7: note: 'Accessor' declared here
class Accessor {
      ^
./rr.h:510:118: error: no type named 'AccessorInfo' in namespace 'v8'; did you mean 'Accessor'?
  static v8::Handlev8::Value NamedPropertySetter(v8::Localv8::String property, v8::Localv8::Value value, const v8::AccessorInfo& info);
                                                                                                                     ^~~~~~~~~~~~~~~~
                                                                                                                     Accessor
./rr.h:456:7: note: 'Accessor' declared here
class Accessor {
      ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: **\* [accessor.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/edolyne/.rvm/gems/ruby-2.1.2/gems/therubyracer-0.12.1 for inspection.
Results logged to /Users/edolyne/.rvm/gems/ruby-2.1.2/extensions/x86_64-darwin-14/2.1.0/therubyracer-0.12.1/gem_make.out
An error occurred while installing therubyracer (0.12.1), and Bundler cannot
continue.
Make sure that `gem install therubyracer -v '0.12.1'` succeeds before bundling.
shanbhardwaj commented 10 years ago

+1

maintux commented 10 years ago

+1 same error on mavericks!

dallasbpeters commented 10 years ago

:+1:

krazyjakee commented 10 years ago

+1

sanderbrauwers commented 10 years ago

We need this +1

lephyrius commented 10 years ago

+1

AdamMarkowski commented 10 years ago

+1

ankushagarwal commented 10 years ago

+1

jpascal commented 10 years ago

+1

gotar commented 10 years ago

+1

cowboyd commented 10 years ago

I don't have Yosemite, and don't plan to install it, but I would be willing to pair program with somebody who does to address this issue. Please let me know if you're interested.

ignisf commented 10 years ago

If any of you guys decides to reflect the v8 API changes in therubyracer (which I suspect are causing this issue), please take into account this issue, too https://github.com/cowboyd/therubyracer/issues/302

cowboyd commented 10 years ago

Also, I believe this is a dup of #304

ankushagarwal commented 10 years ago

@cowboyd : I run Yosemite and I can pair program to help you address this issue.

cowboyd commented 10 years ago

@ankushagarwal great! I can't promise we'll get to the bottom of it, but we just might. What time works well for you? You can email me at cowboyd@frontside.io

graffzon commented 9 years ago

Guys, do you have any success here? I have the same issue on current Yosemit and rubyracer-0.12.1

shanbhardwaj commented 9 years ago

@graffzon recompile your ruby using the command line tools on Yosemite and then try to build the gem

graffzon commented 9 years ago

@shanbhardwaj Could you give me a link to this solution, please. V8 installed successful for me, but therubyracer falling down.

sribalakumar commented 9 years ago

This Stack Overflow solution helped to solve the issue when I did a OS X Mavericks to Yosemite upgrade. http://stackoverflow.com/questions/19630154/gem-install-therubyracer-v-0-10-2-on-osx-mavericks-not-installing/19762877#19762877 Instead of brew install gcc46 as suggested in the solutions I used the command line tools path of the mentioned libraries to create the symlink: sudo ln -s /Library/Developer/CommandLineTools/usr/bin/cpp /usr/bin/cpp sudo ln -s /Library/Developer/CommandLineTools/usr/bin/gcc /usr/bin/gcc sudo ln -s /Library/Developer/CommandLineTools/usr/bin/g++ /usr/bin/g++ brew uninstall v8 gem install libv8 gem install therubyracer