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

Failed to build gem native extension - OS X 10.11 #180

Closed
alexrogers opened this issue Jul 6, 2015 · 7 comments
Closed

Failed to build gem native extension - OS X 10.11 #180

alexrogers opened this issue Jul 6, 2015 · 7 comments

Comments

@alexrogers
Copy link

When I am installing libv8 on my OS X 10.11 install with Ruby 2.2.1, I see this (from bundle install)

Installing libv8 3.16.14.11 with native extensions

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

    /Users/alex/.rvm/rubies/ruby-2.2.1/bin/ruby -r ./siteconf20150706-93135-suettf.rb extconf.rb
creating Makefile
/Users/alex/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/open3.rb:193: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
Compiling v8 for x64
Using python 2.7.6
Using compiler: /usr/bin/c++ (clang version 7.0.0)
In file included from ../src/conversions.cc:32:
In file included from ../src/conversions-inl.h:43:
../src/scanner.h:444:5: error: unused typedef '__StaticAssertTypedef__444' [-Werror,-Wunused-local-typedef]
    STATIC_ASSERT(kCharacterLookaheadBufferSize == 1);
    ^
../src/checks.h:283:30: note: expanded from macro 'STATIC_ASSERT'
#define STATIC_ASSERT(test)  STATIC_CHECK(test)
                             ^
../src/checks.h:251:5: note: expanded from macro 'STATIC_CHECK'
    SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__)
    ^
../src/checks.h:240:32: note: expanded from macro 'SEMI_STATIC_JOIN'
#define SEMI_STATIC_JOIN(a, b) SEMI_STATIC_JOIN_HELPER(a, b)
                               ^
../src/checks.h:241:39: note: expanded from macro 'SEMI_STATIC_JOIN_HELPER'
#define SEMI_STATIC_JOIN_HELPER(a, b) a##b
                                      ^
<scratch space>:59:1: note: expanded from here
__StaticAssertTypedef__444
^
1 error generated.
make[1]: *** [/Users/alex/.rvm/gems/ruby-2.2.1/gems/libv8-3.16.14.11/vendor/v8/out/x64.release/obj.target/preparser_lib/src/conversions.o] Error 1
make: *** [x64.release] Error 2
/Users/alex/.rvm/gems/ruby-2.2.1/gems/libv8-3.16.14.11/ext/libv8/location.rb:36:in `block in verify_installation!': libv8 did not install properly, expected binary v8 archive '/Users/alex/.rvm/gems/ruby-2.2.1/gems/libv8-3.16.14.11/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/alex/.rvm/gems/ruby-2.2.1/gems/libv8-3.16.14.11/ext/libv8/location.rb:35:in `each'
    from /Users/alex/.rvm/gems/ruby-2.2.1/gems/libv8-3.16.14.11/ext/libv8/location.rb:35:in `verify_installation!'
    from /Users/alex/.rvm/gems/ruby-2.2.1/gems/libv8-3.16.14.11/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_enable_backtrace=1 -Dv8_can_use_vfp2_instructions=true -Darm_fpu=vfpv2 -Dv8_can_use_vfp3_instructions=true -Darm_fpu=vfpv3 -Dwerror=''
  CXX(target) /Users/alex/.rvm/gems/ruby-2.2.1/gems/libv8-3.16.14.11/vendor/v8/out/x64.release/obj.target/preparser_lib/src/allocation.o
  CXX(target) /Users/alex/.rvm/gems/ruby-2.2.1/gems/libv8-3.16.14.11/vendor/v8/out/x64.release/obj.target/preparser_lib/src/atomicops_internals_x86_gcc.o
  CXX(target) /Users/alex/.rvm/gems/ruby-2.2.1/gems/libv8-3.16.14.11/vendor/v8/out/x64.release/obj.target/preparser_lib/src/bignum.o
  CXX(target) /Users/alex/.rvm/gems/ruby-2.2.1/gems/libv8-3.16.14.11/vendor/v8/out/x64.release/obj.target/preparser_lib/src/bignum-dtoa.o
  CXX(target) /Users/alex/.rvm/gems/ruby-2.2.1/gems/libv8-3.16.14.11/vendor/v8/out/x64.release/obj.target/preparser_lib/src/cached-powers.o
  CXX(target) /Users/alex/.rvm/gems/ruby-2.2.1/gems/libv8-3.16.14.11/vendor/v8/out/x64.release/obj.target/preparser_lib/src/conversions.o

extconf failed, exit code 1

Gem files will remain installed in /Users/alex/.rvm/gems/ruby-2.2.1/gems/libv8-3.16.14.11 for inspection.
Results logged to /Users/alex/.rvm/gems/ruby-2.2.1/extensions/x86_64-darwin-15/2.2.0/libv8-3.16.14.11/gem_make.out
An error occurred while installing libv8 (3.16.14.11), and Bundler cannot continue.
Make sure that `gem install libv8 -v '3.16.14.11'` succeeds before bundling.

I've tried following your advice here #176 (comment) and it installs successfully, however bundle install inside our app (with the same version specified) does not.

/cc @radar

@radar
Copy link

radar commented Jul 6, 2015

(I'm cc'd on this because I am helping @uberweb debug this)

@johndpope
Copy link

@semnil
Copy link

semnil commented Jul 6, 2015

Please refer to this.
#177

@alexrogers
Copy link
Author

Thanks @semnil This has resolved my issue.

@Jo-Ee
Copy link

Jo-Ee commented May 19, 2016

Had the same problem. Did "bundle update" and it solved the problem.

@samnissen
Copy link

@Jo-Ee Thank you -- worked for me too.

@ignisf
Copy link
Collaborator

ignisf commented May 20, 2016

Hello, this issue should be resolved by libv8 3.16.14.15

@rubyjs rubyjs locked and limited conversation to collaborators May 20, 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

7 participants