Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

"bundle install" fails on Mac OS X #1022

Closed
carnesen opened this Issue Aug 24, 2015 · 3 comments

Comments

Projects
None yet
4 participants
Contributor

carnesen commented Aug 24, 2015

I encountered some issues trying to build the site on Mac OS X. "bundle install" completes successfully with Ruby 2.1.2, but fails with 2.0.0, which is what the site uses currently. I'm moving forward by using a Linux VM for development, but wanted to make a note here of the failure.

Installing therubyracer 0.12.1 with native extensions

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

    /Users/carnesen/.rvm/rubies/ruby-2.0.0-p643/bin/ruby -r ./siteconf20150824-63494-3jsklf.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
    --without-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/carnesen/.rvm/rubies/ruby-2.0.0-p643/bin/ruby
    --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}/
/Users/carnesen/.rvm/gems/ruby-2.0.0-p643/gems/libv8-3.16.14.3/ext/libv8/location.rb:50:in `configure': You have chosen to use the version of V8 found on your system (Libv8::Location::System::NotFoundError)
and *not* the one that is bundle with the libv8 rubygem. However,
it could not be located. please make sure you have a version of
v8 that is compatible with 3.16.14.3 installed. You may
need to special --with-v8-dir options if it is in a non-standard
location

thanks,
The Mgmt

    from /Users/carnesen/.rvm/gems/ruby-2.0.0-p643/gems/libv8-3.16.14.3/lib/libv8.rb:7:in `configure_makefile'
    from extconf.rb:32:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /Users/carnesen/.rvm/gems/ruby-2.0.0-p643/gems/therubyracer-0.12.1 for inspection.
Results logged to /Users/carnesen/.rvm/gems/ruby-2.0.0-p643/extensions/x86_64-darwin-14/2.0.0-static/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.
Contributor

harding commented Aug 25, 2015

Not having a Mac, I don't have any advice for this issue. I'm currently waiting for Jekyll 3.0 to be released before starting a general upgrade of all our gems to the latest released versions, so hopefully that will resolve this issue.

For now, I'm going to tag this as Help Needed.

@harding harding added the Help Needed label Aug 25, 2015

Contributor

saivann commented Aug 25, 2015

@carnesen Maybe you can experiment with workarounds from StackOverflow.

https://stackoverflow.com/questions/19673714/rails-gem-install-error-error-installing-libv8-error-failed-to-build-gem-nati
https://stackoverflow.com/questions/8126465/bundle-install-update-libv8-therubyracer-installation-fails-with-native-ex
https://stackoverflow.com/questions/11598655/therubyracer-install-error

Ideally there would a be a clean solution not involving any extra steps than running "bundle install", but according to what I read this may prove difficult. Unfortunately I am also not a Mac OS X user so I am not able to investigate this on my side either. Thanks for reporting the issue!

Contributor

carnesen commented Aug 25, 2015

Thanks to both of you for your replies. I didn't want to spend too much
more time on it because everything "just worked" with Ruby >2.1.2, which I
figured we'd upgrade to at some point in the not-too-distant future. I'm
also still on chapter 1 of Ruby, gems, and all that jazz, so not so good at
debugging such issues. As far as I can tell, besides that failure resolved
by Ruby >2.1.2, the only difference in the developer setup instructions on
Mac is that instead of using apt-get to "Install binary libraries and
tools", one must "Install the Xcode command-line tools", which is super
easy; any time you try to run a command included in the tools (e.g.
"make"), it prompts you to install the tools if you haven't already.

For now I like the workaround of just running the build on an Ubuntu
virtual machine. The combination of Vagrant
and VirtualBox makes that pretty easy to set
up, under 15 minutes. I could document those VM setup steps if we
eventually decide that's the best way to support Mac-based bitcoin.org
development.

On Tue, Aug 25, 2015 at 1:10 PM saivann notifications@github.com wrote:

@carnesen https://github.com/carnesen Maybe you can experiment with
workarounds from StackOverflow.

https://stackoverflow.com/questions/19673714/rails-gem-install-error-error-installing-libv8-error-failed-to-build-gem-nati

https://stackoverflow.com/questions/8126465/bundle-install-update-libv8-therubyracer-installation-fails-with-native-ex
https://stackoverflow.com/questions/11598655/therubyracer-install-error

Ideally there would a be a clean solution not involving any extra steps
than running "bundle install", but according to what I read this may prove
difficult. Unfortunately I am also not a Mac OS X user so I am not able to
investigate this on my side either. Thanks for reporting the issue!


Reply to this email directly or view it on GitHub
#1022 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment