rubyjs / therubyracer

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

Installing with ruby 2.0.0-p195 on Mavericks #261

Closed jwaldrip closed 11 years ago

jwaldrip commented 11 years ago

I can't seem to install the gem on OSX 10.9 mavericks.

$ echo $CC
/usr/local/bin/gcc-4.8
$ gem install therubyracer
Fetching: ref-1.0.5.gem (100%)
Successfully installed ref-1.0.5
Building native extensions.  This could take a while...
ERROR:  Error installing therubyracer:
    ERROR: Failed to build gem native extension.

    /Users/jwaldrip/.rbenv/versions/2.0.0-p195/bin/ruby extconf.rb
creating Makefile
Compiling v8 for x64
Using python 2.7.5
Configured with: --prefix=/Applications/Xcode5-DP.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode5-DP.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/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++
Configured with: --prefix=/Applications/Xcode5-DP.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode5-DP.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/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
/Applications/Xcode5-DP.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: /Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/obj.target/preparser_lib/src/atomicops_internals_x86_gcc.o has no symbols
In file included from ../src/accessors.cc:28:
In file included from ../src/v8.h:60:
In file included from ../src/objects-inl.h:38:
In file included from ../src/elements.h:33:
In file included from ../src/heap.h:41:
../src/store-buffer.h:229:9: error: private field 'heap_' is not used [-Werror,-Wunused-private-field]
  Heap* heap_;
        ^
1 error generated.
make[1]: *** [/Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/obj.target/v8_base/src/accessors.o] Error 1
make: *** [x64.release] Error 2
/Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/ext/libv8/location.rb:36:in `block in verify_installation!': libv8 did not install properly, expected binary v8 archive '/Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/obj.target/tools/gyp/libv8_base.a'to exist, but it was not found (Libv8::Location::Vendor::ArchiveNotFound)
    from /Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/ext/libv8/location.rb:35:in `each'
    from /Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/ext/libv8/location.rb:35:in `verify_installation!'
    from /Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/ext/libv8/location.rb:26:in `install!'
    from extconf.rb:7:in `<main>'
GYP_GENERATORS=make \
    build/gyp/gyp --generator-output="out" build/all.gyp \
                  -Ibuild/standalone.gypi --depth=. \
                  -Dv8_target_arch=x64 \
                  -S.x64  -Dv8_can_use_vfp_instructions=true
  CXX(target) /Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/obj.target/preparser_lib/src/allocation.o
  CXX(target) /Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/obj.target/preparser_lib/src/atomicops_internals_x86_gcc.o
  CXX(target) /Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/obj.target/preparser_lib/src/bignum.o
  CXX(target) /Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/obj.target/preparser_lib/src/bignum-dtoa.o
  CXX(target) /Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/obj.target/preparser_lib/src/cached-powers.o
  CXX(target) /Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/obj.target/preparser_lib/src/conversions.o
  CXX(target) /Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/obj.target/preparser_lib/src/diy-fp.o
  CXX(target) /Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/obj.target/preparser_lib/src/dtoa.o
  CXX(target) /Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/obj.target/preparser_lib/src/fast-dtoa.o
  CXX(target) /Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/obj.target/preparser_lib/src/fixed-dtoa.o
  CXX(target) /Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/obj.target/preparser_lib/src/once.o
  CXX(target) /Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/obj.target/preparser_lib/src/preparse-data.o
  CXX(target) /Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/obj.target/preparser_lib/src/preparser.o
  CXX(target) /Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/obj.target/preparser_lib/src/preparser-api.o
  CXX(target) /Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/obj.target/preparser_lib/src/scanner.o
  CXX(target) /Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/obj.target/preparser_lib/src/strtod.o
  CXX(target) /Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/obj.target/preparser_lib/src/token.o
  CXX(target) /Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/obj.target/preparser_lib/src/unicode.o
  CXX(target) /Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/obj.target/preparser_lib/src/utils.o
  LIBTOOL-STATIC /Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/libpreparser_lib.a
  CXX(target) /Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/obj.target/preparser/preparser/preparser-process.o
  LINK(target) /Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/preparser
  CXX(target) /Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/obj.target/v8_base/src/accessors.o

Gem files will remain installed in /Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17 for inspection.
Results logged to /Users/jwaldrip/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/libv8-3.11.8.17/ext/libv8/gem_make.out
ignisf commented 11 years ago

This is not an issue with therubyracer but with the libv8 gem and it was fixed by https://github.com/cowboyd/libv8/pull/95

du-song commented 11 years ago

Is it possible to release a new version for this? so that ppl on 10.9 can use this gem without specify a git/beta version

cowboyd commented 11 years ago

v 0.12.0 has been released with these fixes, please advise if your problems persist.