rubyjs / therubyracer

Embed the V8 Javascript Interpreter into Ruby
1.67k stars 190 forks source link

Install Fails - OS X 10.11.1 (15B42) Ruby 2.2.1 #393

Closed acrlewis closed 8 years ago

acrlewis commented 8 years ago

I've tried multiple suggestions from issue 390 but have not been successful installing therubyracer. Appreciate any help you can provide.

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

    /Users/clewis/.rvm/rubies/ruby-2.2.1/bin/ruby -r ./siteconf20151028-65193-1rt2a6e.rb extconf.rb
checking for main() in -lpthread... yes
checking for main() in -lobjc... yes
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling accessor.cc
g++: error: unrecognized command line option ‘-rdynamic’
make: *** [accessor.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/clewis/.rvm/gems/ruby-2.2.1/gems/therubyracer-0.12.2 for inspection.
Results logged to /Users/clewis/.rvm/gems/ruby-2.2.1/extensions/x86_64-darwin-14/2.2.0-static/therubyracer-0.12.2/gem_make.out
cowboyd commented 8 years ago

Try compiling with clang:

GXX=clang gem install therubyracer

acrlewis commented 8 years ago

same error, not sure what I'm doing wrong

Building native extensions.  This could take a while...
ERROR:  Error installing therubyracer:
    ERROR: Failed to build gem native extension.

    /Users/clewis/.rvm/rubies/ruby-2.2.1/bin/ruby -r ./siteconf20151029-2707-1s6ofd9.rb extconf.rb
checking for main() in -lpthread... yes
checking for main() in -lobjc... yes
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling accessor.cc
g++: error: unrecognized command line option ‘-rdynamic’
make: *** [accessor.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/clewis/.rvm/gems/ruby-2.2.1/gems/therubyracer-0.12.2 for inspection.
Results logged to /Users/clewis/.rvm/gems/ruby-2.2.1/extensions/x86_64-darwin-14/2.2.0-static/therubyracer-0.12.2/gem_make.out
ignisf commented 8 years ago

@cowboyd, it's CXX=clang I think

acrlewis commented 8 years ago

same error

cowboyd commented 8 years ago

From the log output it appears that it is continuing to use g++. What version of GCC are you using?

acrlewis commented 8 years ago
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin14.0.0/4.9.2/lto-wrapper
Target: x86_64-apple-darwin14.0.0
Configured with: ../gcc-4.9-20141029/configure --enable-languages=c++,fortran
Thread model: posix
gcc version 4.9.2 20141029 (prerelease) (GCC) 
ignisf commented 8 years ago

Ah, @cowboyd, remember this? https://github.com/cowboyd/therubyracer/pull/355#issuecomment-120702212 https://github.com/cowboyd/therubyracer/commit/e1fbdb4162361d5ff6769864dbfd70bcb2c5c7df

:D It has not made its way master yet.

dcrockwell commented 8 years ago

+1

ignisf commented 8 years ago

There has been a new release of libv8 that should address most OS X install issues. Closing for now.