libv8 / therubyracer seg. fault. Doesn't work with musl
v8 error when “bundle exec rake assets:precompile” in
When I try to install ruby from the package on Alpine 3.7 (Alpine 3.4 has a Ruby 2.4 package prebuilt!) the code to build therubyracer segfaults:
LINK(target) /usr/lib/ruby/gems/2.4.0/gems/libv8-184.108.40.206/vendor/v8/out/x64.release/mksnapshot ACTION tools_gyp_v8_gyp_v8_snapshot_target_run_mksnapshot /usr/lib/ruby/gems/2.4.0/gems/libv8-220.127.116.11/vendor/v8/out/x64.release/obj.target/v8_snapshot/geni/snapshot.cc Segmentation fault (core dumped) make: *** [tools/gyp/v8_snapshot.target.x64.mk:13: /usr/lib/ruby/gems/2.4.0/gems/libv8-18.104.22.168/vendor/v8/out/x64.release/obj.target/v8_snapshot/geni/snapshot.cc] Error 139 make: Leaving directory '/usr/lib/ruby/gems/2.4.0/gems/libv8-22.214.171.124/vendor/v8/out' make: *** [Makefile:195: x64.release] Error 2 /usr/lib/ruby/gems/2.4.0/gems/libv8-126.96.36.199/ext/libv8/location.rb:36:in `block in verify_installation!': libv8 did not install properly, expected binary v8 archive '/usr/lib/ruby/gems/2.4.0/gems/libv8-188.8.131.52/vendor/v8/out/x64.release/obj.target/tools/gyp/libv8_snapshot.a'to exist, but it was not found (Libv8::Location::Vendor::ArchiveNotFound) from /usr/lib/ruby/gems/2.4.0/gems/libv8-184.108.40.206/ext/libv8/location.rb:35:in `each' from /usr/lib/ruby/gems/2.4.0/gems/libv8-220.127.116.11/ext/libv8/location.rb:35:in `verify_installation!' from /usr/lib/ruby/gems/2.4.0/gems/libv8-18.104.22.168/ext/libv8/location.rb:26:in `install!' from extconf.rb:7:in `<main>' extconf failed, exit code 1 Gem files will remain installed in /usr/lib/ruby/gems/2.4.0/gems/libv8-22.214.171.124 for inspection. Results logged to /usr/lib/ruby/gems/2.4.0/extensions/x86_64-linux/2.4.0/libv8-126.96.36.199/gem_make.out The command '/bin/sh -c apk add --update --no-cache --virtual build-deps build-base python git bash && gem install libv8 -v 188.8.131.52 && apk del build-deps' returned a non-zero code: 1
This is of course a showstopper for Ruby with libv8/therubyracker that wants to use Alpine. Simply not possible.
Alpine should make libv8/therubyracer work with musl and package it.
(from redmine: issue id 8445, created on 2018-01-29)