rubyjs/therubyracer

Gem install fails on Mac OS 10.12 Beta 3

bhushangahire opened this issue · 5 comments

`Installing therubyracer 0.12.2 with native extensions

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

current directory: /Users/bahire/.rvm/gems/ruby-2.3.1/gems/therubyracer-0.12.2/ext/v8

/Users/bahire/.rvm/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20160726-95834-1pe7cug.rb extconf.rb
checking for main() in -lpthread... yes
checking for main() in -lobjc... yes
checking for v8.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/bahire/.rvm/rubies/ruby-2.3.1/bin/$(RUBY_BASE_NAME)
--with-pthreadlib
--without-pthreadlib
--with-objclib
--without-objclib
--enable-debug
--disable-debug
--with-v8-dir
--without-v8-dir
--with-v8-include
--without-v8-include=${v8-dir}/include
--with-v8-lib
--without-v8-lib=${v8-dir}/lib
/Users/bahire/.rvm/gems/ruby-2.3.1/gems/libv8-3.16.14.15/ext/libv8/location.rb:50:in `configure': By using --with-system-v8, you have chosen to use the version (Libv8::Location::System::NotFoundError)
of V8 found on your system and not the one that is bundled with
the libv8 rubygem.

However, your system version of v8 could not be located.

Please make sure your system version of v8 that is compatible
with 3.16.14.15 installed. You may need to use the
--with-v8-dir option if it is installed in a non-standard location
from /Users/bahire/.rvm/gems/ruby-2.3.1/gems/libv8-3.16.14.15/lib/libv8.rb:7:in configure_makefile' from extconf.rb:32:in

'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

/Users/bahire/.rvm/gems/ruby-2.3.1/extensions/x86_64-darwin-16/2.3.0/therubyracer-0.12.2/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Users/bahire/.rvm/gems/ruby-2.3.1/gems/therubyracer-0.12.2 for inspection.
Results logged to /Users/bahire/.rvm/gems/ruby-2.3.1/extensions/x86_64-darwin-16/2.3.0/therubyracer-0.12.2/gem_make.out`

I do have libv8 successfully installed.

Hello,

By using --with-system-v8, you have chosen to use the version (Libv8::Location::System::NotFoundError)
of V8 found on your system and not the one that is bundled with
the libv8 rubygem.

Please check the output of bundle config build.libv8 and if you have the --with-system-v8 option set, delete it by issuing bundle config --delete build.libv8.

There is a binary version of libv8 for your OS version, so there should be no issues.

I've documented the gotchas when using the --with-system-v8 flag here: https://github.com/cowboyd/libv8#bring-your-own-v8. I'm closing this issue, feel free to reopen it if need be.

I tried all the above possibilities. I get the libv8 installed perfectly fine. But I have issues installing the rubyracer. Not sure what is wrong.

Please provide a log of the failure after cleaning up the libv8 build settings from your bundle configuration

rlue commented

To elaborate on @ignisf's directions, if you have --with-system-v8 set in your Bundler config, be sure to reinstall the libv8 gem between the time you remove that setting and attempt to reinstall therubyracer.