New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems matching binary gems for OSX Yosemite, ruby > 2.1 #1299

Closed
cowboyd opened this Issue Jun 30, 2015 · 4 comments

Comments

Projects
None yet
3 participants
@cowboyd

cowboyd commented Jun 30, 2015

Since the release of OSX Yosemite, I'm seeing a lot of issues like these (cowboyd/libv8#172, cowboyd/libv8#171, cowboyd/libv8#169, cowboyd/therubyracer#339, cowboyd/therubyracer#318, etc..., etc...)

The problem is that they should never be seeing these gems at all in the first place because there are binary gems for libv8. However, they are not being selected on ruby > 2.1

Note that these do have a different version of ruby gems.

With ruby 2.0

$ ruby -v                                                                                                                                             ✚ ═
ruby 2.0.0p598 (2014-11-13 revision 48408) [x86_64-darwin14.1.0]
$ gem --version                                                                                                                                       ✚ ═
2.2.2
$ ruby -e 'puts Gem::Platform.new(RUBY_PLATFORM)'                                                                                                     x86_64-darwin-14
$ gem install libv8 -v 3.16.14.7                                                                                                                      Fetching: libv8-3.16.14.7-x86_64-darwin-14.gem (100%)
Successfully installed libv8-3.16.14.7-x86_64-darwin-14
1 gem installed

with ruby 2.1 on the same machine, with the same platform, matches to the source gem:

$ ruby -v                                                                                                                                           ⏎ ✚ ═
ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-darwin14.0]
$ gem --version                                                                                                                                     ⏎ ✚ 2.0.14
$ ruby -e 'puts Gem::Platform.new(RUBY_PLATFORM)'                                                                                                     x86_64-darwin-14
gem install libv8 -v 3.16.14.7                                                                                                                      ✚ Fetching: libv8-3.16.14.7.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing libv8:
    ERROR: Failed to build gem native extension.

    /Users/cowboyd/.rbenv/versions/2.1.5/bin/ruby extconf.rb
creating Makefile
Compiling v8 for x64
Using python 2.7.6
Using compiler: /usr/bin/c++ (clang version 6.1.0)
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: /Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/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:35:
In file included from ../src/incremental-marking.h:33:
In file included from ../src/mark-compact.h:32:
../src/spaces.h:896:26: error: 'this' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to true [-Werror,-Wtautological-undefined-compare]
  bool exists() { return this != NULL && code_range_ != NULL; }
                         ^~~~    ~~~~
../src/spaces.h:898:9: error: 'this' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to false [-Werror,-Wtautological-undefined-compare]
    if (this == NULL || code_range_ == NULL) return false;
        ^~~~    ~~~~
2 errors generated.
make[1]: *** [/Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/obj.target/v8_base/src/accessors.o] Error 1
make: *** [x64.release] Error 2
/Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/ext/libv8/location.rb:36:in `block in verify_installation!': libv8 did not install properly, expected binary v8 archive '/Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/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/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/ext/libv8/location.rb:35:in `each'
    from /Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/ext/libv8/location.rb:35:in `verify_installation!'
    from /Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/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/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/obj.target/preparser_lib/src/allocation.o
  CXX(target) /Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/obj.target/preparser_lib/src/atomicops_internals_x86_gcc.o
  CXX(target) /Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/obj.target/preparser_lib/src/bignum.o
  CXX(target) /Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/obj.target/preparser_lib/src/bignum-dtoa.o
  CXX(target) /Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/obj.target/preparser_lib/src/cached-powers.o
  CXX(target) /Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/obj.target/preparser_lib/src/conversions.o
  CXX(target) /Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/obj.target/preparser_lib/src/diy-fp.o
  CXX(target) /Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/obj.target/preparser_lib/src/dtoa.o
  CXX(target) /Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/obj.target/preparser_lib/src/fast-dtoa.o
  CXX(target) /Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/obj.target/preparser_lib/src/fixed-dtoa.o
  CXX(target) /Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/obj.target/preparser_lib/src/once.o
  CXX(target) /Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/obj.target/preparser_lib/src/preparse-data.o
  CXX(target) /Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/obj.target/preparser_lib/src/preparser.o
  CXX(target) /Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/obj.target/preparser_lib/src/preparser-api.o
  CXX(target) /Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/obj.target/preparser_lib/src/scanner.o
  CXX(target) /Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/obj.target/preparser_lib/src/strtod.o
  CXX(target) /Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/obj.target/preparser_lib/src/token.o
  CXX(target) /Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/obj.target/preparser_lib/src/unicode.o
  CXX(target) /Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/obj.target/preparser_lib/src/utils.o
  LIBTOOL-STATIC /Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/libpreparser_lib.a
  CXX(target) /Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/obj.target/preparser/preparser/preparser-process.o
  LINK(target) /Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/preparser
  CXX(target) /Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/vendor/v8/out/x64.release/obj.target/v8_base/src/accessors.o

extconf failed, exit code 1

Gem files will remain installed in /Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7 for inspection.
Results logged to /Users/cowboyd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-14/2.1.0-static/libv8-3.16.14.7/gem_make.out
@aasierra

This comment has been minimized.

Show comment
Hide comment
@aasierra

aasierra Aug 8, 2015

I know this doesn't help a whole lot but this is what I ended up doing. Maybe it will help someone decide the fix? http://anthonysierra.com/08082015

aasierra commented Aug 8, 2015

I know this doesn't help a whole lot but this is what I ended up doing. Maybe it will help someone decide the fix? http://anthonysierra.com/08082015

@djberg96

This comment has been minimized.

Show comment
Hide comment
@djberg96

djberg96 Sep 25, 2015

Contributor

Same platform? First example shows "x86_64-darwin14.1.0". Second one shows "x86_64-darwin14.0".

Contributor

djberg96 commented Sep 25, 2015

Same platform? First example shows "x86_64-darwin14.1.0". Second one shows "x86_64-darwin14.0".

@cowboyd

This comment has been minimized.

Show comment
Hide comment
@cowboyd

cowboyd Sep 25, 2015

That may be related to the problem, but at least from rubygems perspective, they seem indistinguishable:

$ ruby -rubygems -e 'puts Gem::Platform.local'
x86_64-darwin-14

both print the same result with the minor numbers truncated. Since it is this string that determines the name of the platform in both the metadata and the tar archive, it seems like they should select the same gem.

cowboyd commented Sep 25, 2015

That may be related to the problem, but at least from rubygems perspective, they seem indistinguishable:

$ ruby -rubygems -e 'puts Gem::Platform.local'
x86_64-darwin-14

both print the same result with the minor numbers truncated. Since it is this string that determines the name of the platform in both the metadata and the tar archive, it seems like they should select the same gem.

@djberg96

This comment has been minimized.

Show comment
Hide comment
@djberg96

djberg96 Nov 9, 2015

Contributor

@cowboyd Based on @aasierra's comments, and knowing that the install script that libv8 uses is very unconventional, this is most likely an issue between libv8 and Ruby rather than anything to do with rubygems.

If you download the libv8 source and try to build you should see the same error. To wit, in my own experiments I was unable to build libv8 manually against version 3, but was successful with version 4.

Contributor

djberg96 commented Nov 9, 2015

@cowboyd Based on @aasierra's comments, and knowing that the install script that libv8 uses is very unconventional, this is most likely an issue between libv8 and Ruby rather than anything to do with rubygems.

If you download the libv8 source and try to build you should see the same error. To wit, in my own experiments I was unable to build libv8 manually against version 3, but was successful with version 4.

@djberg96 djberg96 closed this Nov 9, 2015

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