Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Fails Install OS X El Capitan - 10.11 Beta (15A215h) #359

Closed
karlentwistle opened this issue Jul 14, 2015 · 28 comments
Closed

Fails Install OS X El Capitan - 10.11 Beta (15A215h) #359

karlentwistle opened this issue Jul 14, 2015 · 28 comments

Comments

@karlentwistle
Copy link

gem install therubyracer -v '0.12.2'
Building native extensions.  This could take a while...
ERROR:  Error installing therubyracer:
    ERROR: Failed to build gem native extension.

    /Users/karl/.rbenv/versions/2.2.2/bin/ruby -r ./siteconf20150714-54941-u2qv6y.rb 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=" clean

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

make failed, exit code 2

Gem files will remain installed in /Users/karl/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/therubyracer-0.12.2 for inspection.
Results logged to /Users/karl/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-15/2.2.0-static/therubyracer-0.12.2/gem_make.out
@sbenyaala
Copy link

This helped me: http://stackoverflow.com/a/20145328/275058

@DeLaGuardo
Copy link

brew tap homebrew/versions
brew install v8-315
brew link --force v8-315
gem install libv8 -- --with-system-v8
gem install therubyracer

@karlentwistle
Copy link
Author

brew install v8-315
Warning: You are using OS X 10.11.
We do not provide support for this pre-release version.
You may encounter build failures or other breakage.
==> Installing v8-315 from homebrew/homebrew-versions
==> Downloading https://github.com/v8/v8/archive/3.15.11.tar.gz
Already downloaded: /Library/Caches/Homebrew/v8-315-3.15.11.tar.gz
==> make dependencies
==> make native -j4 library=shared snapshot=on console=readline
ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [/private/tmp/v8-31520150716-53019-4u2nz3/v8-3.15.11/out/native/preparser] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [native] Error 2

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
  https://github.com/homebrew/homebrew-versions/issues

Warning: You are using OS X 10.11.
We do not provide support for this pre-release version.
You may encounter build failures or other breakage.

@bpinto
Copy link

bpinto commented Jul 16, 2015

Newest versions of libv8 are already compatibly with el capitan, but therubyracer gem references an old version of libv8.

Reference: rubyjs/libv8#180

@ignisf
Copy link
Collaborator

ignisf commented Jul 16, 2015

@karlentwistle may I see the output of the gem list libv8 or respectively bundle exec gem list libv8 command on your system?

@karlentwistle
Copy link
Author

Sure thing

gem list libv8

*** LOCAL GEMS ***

libv8 (3.16.14.11)

@dschmura
Copy link

Any more insights on how to resolve or work around this issue? Thanks,

@rmasoni
Copy link

rmasoni commented Aug 10, 2015

I'm having the same problem.

I tried using only the gem version, only the brew version, tried v8-315, tried letting therubyracer install v8, tried specifying the versions, tried building the gem from the repo… nothing worked.

I'm afraid I'll have to roll back to Yosemite to be able to work again 😞

@bpinto
Copy link

bpinto commented Aug 10, 2015

@rmasoni I was able to install the gem using v8-315.
Did you follow @DeLaGuardo instructions?

@rmasoni
Copy link

rmasoni commented Aug 10, 2015

@bpinto Yes. Then I was able to install via @sbenyaala's link (with apple-gcc42).

Later I tried to run bundle again and it stopped on libv8 because it's requesting the 3.16.14.7 version (I have 3.16.14.11 installed). This is a nightmare — but it's on my end now.

@michaelglass
Copy link

here's a binary I built while we wait for 3.16.14.12:

https://github.com/NoRedInk/libv8/blob/2570d0aa3784aa8ab787ec848930886aa25a36ae/pkg/libv8-3.16.14.11-x86_64-darwin-15.gem

this worked for me (while seemingly nothing else did)

$ gem install libv8-3.16.14.11-x86_64-darwin-15.gem
$ gem install therubyracer

@dschmura
Copy link

The @DeLaGuardo instructions? ended up working for me, but not directly. I had to uninstall all libv8 && v8 (brew and gem). Unfortunately, it was one of those 'try a billion paths and stop when one worked' sort of deals, and I didn't have a great record of what ended up working.

I am sorry, and a bit ashamed...

Still...thank you @DeLaGuardo for providing the path towards moving forward!!
Dave

@srpouyet
Copy link

@DeLaGuardo instructions mostly worked for me (with El Capitan Public Beta 3, Xcode 7 Beta, Command Line Tools 7.0 beta), but instead of gem install therubyracer I had to do gem install therubyracer -- --with-system-v8. 🎉

@dschmura
Copy link

So, I got a second bite at the apple with the release of Ruby 2.2.3. I installed 2.2.3 using rbenv

 rbenv install 2.2.3 

Then I switched the 'local' version of my ruby to use the new 2.2.3 install

 rbenv local 2.2.3 

Then installed bundler

 gem install bundler 

Then I using the binary @michaelglass built. Not that once you download the gem, you need to either run the gem install command from the directory that you downloaded it from or pass the path to the downloaded file.

 gem install libv8-3.16.14.11-x86_64-darwin-15.gem 
 gem install therubyracer

From here I was able to do a regular bundle install for my projects and everything worked splendidly.
Thank you @michaelglass! Nice work!

@thehappycoder
Copy link

@DeLaGuardo Can you share the tar.gz file with me? I can't download it. Homebrew/legacy-homebrew#44496

@jszmajda
Copy link

sigh Having trouble with El Capitan also. Here's a gist with the trouble, any ideas? https://gist.github.com/joshsz/300ca553bf3e4fe3ff2d

(The TL;DR is /Users/josh/.rvm/gems/ruby-2.0.0-p594/gems/json-1.8.3/lib/json/ext/parser.bundle: [BUG] Segmentation fault)

@cowboyd
Copy link
Collaborator

cowboyd commented Oct 20, 2015

@joshsz I noticed that the segmentation fault was in the JSON gem, not libv8 or the rubyracer.

Also, We recently released a binary that should be compatible with El Capitan. What happens if you remove all --with-system-v8 flags from your bundle / gem config.

$ gem uninstall libv8
$ bundle update libv8

@louh
Copy link

louh commented Oct 20, 2015

Thanks so much, @cowboyd. Just found this thread when running into this problem, and the updated libv8 works just fine. (Ruby 2.2.3, fresh install of El Capitan)

@jszmajda
Copy link

@cowboyd Awesome, that seems to have fixed it, thanks!

@cowboyd cowboyd closed this as completed Oct 20, 2015
@ferdly
Copy link

ferdly commented Nov 14, 2015

@cowboyd Thanks from me too!

In hind sight I think trying to learn Ruby right after upgrading to El Capitan might have caused me a little bit of consternation (massive understatement!) -- does anyone know of a resource for reading about OSX updates -- especially concerning local development environments -- that I (we) may read to help decide whether the update is "worth it". I have a friend I respect greatly that never upgrades his OSX... okay, but this can't be good long-term? TIA

Again, Thanks to @cowboyd !!

@itssasanka
Copy link

This helped me : http://stackoverflow.com/a/20145328/1981328

@ambirdsall
Copy link

I wasn't able to get any of the above solutions to work (or rather, everything I could get to work would have required the rest of my team to rebundle). After switching from rbenv to RVM, however, bundle install ran without a hitch.

@shayneoAtNorwood
Copy link

bump. Same problem. This gem is kind of broken on macs at this stage. Fresh OS X install and kaboom.

@shayneoAtNorwood
Copy link

@itssasank , this won't work on El Capitan. the /usr/bin is locked at the kernel level so symlinks are not allowed.

@danielwiedeback
Copy link

Tried to install therubyracer with El Capitan. @DeLaGuardo's instructions fixed it for me with one tweak:

$ bundle config build.libv8 --with-system-v8
$ bundle install

@afiedler
Copy link

This seems to be working for me, if you can change your Gemfile.lock on your project.

Change libv8 in Gemfile.lock to libv8 (3.16.14.11)

I also did brew unlink for any system V8s that I installed.

Then run this:

gem uninstall therubyracer
gem uninstall libv8
bundle install

@andywenk
Copy link

simply changing the Gemfile.lock as @afiedler proposed worked while using a older project with an older libv8 version ... thanks

@ignisf
Copy link
Collaborator

ignisf commented May 15, 2016

Install issues on darwin 14 and 15 should be fixed now (by the release of libv8 3.16.14.14 and 3.16.14.15), I'm going to lock this issue to encourage opening new issues.

@rubyjs rubyjs locked and limited conversation to collaborators May 15, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests