0.5.0.pre fails to install/build on Github Actions (Ruby 3.0.1)
See original GitHub issueI’m trying to get our larger test suite running on Apple Silicon which uses mini_racer
for more than just asset compilation. While I was giving 0.5.0.pre
a spin it worked great locally on my Mac mini (M1, 2020), but the build failed on our GH Actions CI.
Env:
- Ruby 3.0.1
- Github Runner:
2.284.0
(Ubuntu 20.04.3 LTS)
I think the relevant error is (find more logs below):
[…]
2021-11-09T19:26:26.5042674Z g++: error:
2021-11-09T19:26:26.5043793Z /home/runner/work/foo/foo/vendor/bundle/ruby/3.0.0/gems/libv8-node-16.10.0.0-x86_64-linux-musl/vendor/v8/x86_64-linux/libv8/obj/libv8_monolith.a:
2021-11-09T19:26:26.5044719Z No such file or directory
[…]
logs
[…]
2021-11-09T19:26:20.9358126Z Installing libv8-node 16.10.0.0 (x86_64-linux-musl)
2021-11-09T19:26:23.8673930Z Fetching mini_racer 0.5.0.pre
2021-11-09T19:26:23.8949075Z Installing mini_racer 0.5.0.pre with native extensions
2021-11-09T19:26:26.4999443Z Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
2021-11-09T19:26:26.5000444Z
2021-11-09T19:26:26.5001449Z current directory:
2021-11-09T19:26:26.5003062Z /home/runner/work/foo/foo/vendor/bundle/ruby/3.0.0/gems/mini_racer-0.5.0.pre/ext/mini_racer_extension
2021-11-09T19:26:26.5004164Z /opt/hostedtoolcache/Ruby/3.0.1/x64/bin/ruby -I
2021-11-09T19:26:26.5005050Z /opt/hostedtoolcache/Ruby/3.0.1/x64/lib/ruby/3.0.0 -r
2021-11-09T19:26:26.5006003Z ./siteconf20211109-1574-yya0rf.rb extconf.rb
2021-11-09T19:26:26.5006882Z checking for -lpthread... yes
2021-11-09T19:26:26.5007430Z creating Makefile
2021-11-09T19:26:26.5007750Z
2021-11-09T19:26:26.5008390Z current directory:
2021-11-09T19:26:26.5009453Z /home/runner/work/foo/foo/vendor/bundle/ruby/3.0.0/gems/mini_racer-0.5.0.pre/ext/mini_racer_extension
2021-11-09T19:26:26.5010254Z make DESTDIR\= clean
2021-11-09T19:26:26.5010567Z
2021-11-09T19:26:26.5010983Z current directory:
2021-11-09T19:26:26.5011989Z /home/runner/work/foo/foo/vendor/bundle/ruby/3.0.0/gems/mini_racer-0.5.0.pre/ext/mini_racer_extension
2021-11-09T19:26:26.5012792Z make DESTDIR\=
2021-11-09T19:26:26.5013330Z compiling mini_racer_extension.cc
2021-11-09T19:26:26.5014478Z mini_racer_extension.cc: In function ‘void* gvl_ruby_callback(void*)’:
2021-11-09T19:26:26.5015434Z mini_racer_extension.cc:1255:92: warning: ‘VALUE
2021-11-09T19:26:26.5016318Z ruby::backward::cxxanyargs::rb_rescue2(VALUE (*)(...), VALUE, VALUE (*)(...),
2021-11-09T19:26:26.5017426Z VALUE, ...)’ is deprecated: Use of ANYARGS in this function is deprecated
2021-11-09T19:26:26.5018415Z [-Wdeprecated-declarations]
2021-11-09T19:26:26.5019204Z 1255 | RUBY_METHOD_FUNC(rescue_callback), callback_data_value,
2021-11-09T19:26:26.5019888Z rb_eException, (VALUE)0);
2021-11-09T19:26:26.5020402Z |
2021-11-09T19:26:26.5020897Z ^
2021-11-09T19:26:26.5021293Z In file included from
2021-11-09T19:26:26.5022177Z /opt/hostedtoolcache/Ruby/3.0.1/x64/include/ruby-3.0.0/ruby/internal/anyargs.h:83,
2021-11-09T19:26:26.5022787Z from
2021-11-09T19:26:26.5023531Z /opt/hostedtoolcache/Ruby/3.0.1/x64/include/ruby-3.0.0/ruby/ruby.h:24,
2021-11-09T19:26:26.5024103Z from
2021-11-09T19:26:26.5024814Z /opt/hostedtoolcache/Ruby/3.0.1/x64/include/ruby-3.0.0/ruby.h:38,
2021-11-09T19:26:26.5025493Z from mini_racer_extension.cc:2:
2021-11-09T19:26:26.5026480Z /opt/hostedtoolcache/Ruby/3.0.1/x64/include/ruby-3.0.0/ruby/backward/cxxanyargs.hpp:282:1:
2021-11-09T19:26:26.5027221Z note: declared here
2021-11-09T19:26:26.5027752Z 282 | rb_rescue2(type *q, VALUE w, type *e, VALUE r, ...)
2021-11-09T19:26:26.5028227Z | ^~~~~~~~~~
2021-11-09T19:26:26.5029213Z mini_racer_extension.cc:1255:92: warning: ‘VALUE
2021-11-09T19:26:26.5029951Z ruby::backward::cxxanyargs::rb_rescue2(VALUE (*)(...), VALUE, VALUE (*)(...),
2021-11-09T19:26:26.5030945Z VALUE, ...)’ is deprecated: Use of ANYARGS in this function is deprecated
2021-11-09T19:26:26.5031854Z [-Wdeprecated-declarations]
2021-11-09T19:26:26.5032580Z 1255 | RUBY_METHOD_FUNC(rescue_callback), callback_data_value,
2021-11-09T19:26:26.5033174Z rb_eException, (VALUE)0);
2021-11-09T19:26:26.5033643Z |
2021-11-09T19:26:26.5034015Z ^
2021-11-09T19:26:26.5034380Z In file included from
2021-11-09T19:26:26.5035262Z /opt/hostedtoolcache/Ruby/3.0.1/x64/include/ruby-3.0.0/ruby/internal/anyargs.h:83,
2021-11-09T19:26:26.5035889Z from
2021-11-09T19:26:26.5036736Z /opt/hostedtoolcache/Ruby/3.0.1/x64/include/ruby-3.0.0/ruby/ruby.h:24,
2021-11-09T19:26:26.5037319Z from
2021-11-09T19:26:26.5038054Z /opt/hostedtoolcache/Ruby/3.0.1/x64/include/ruby-3.0.0/ruby.h:38,
2021-11-09T19:26:26.5038749Z from mini_racer_extension.cc:2:
2021-11-09T19:26:26.5039712Z /opt/hostedtoolcache/Ruby/3.0.1/x64/include/ruby-3.0.0/ruby/backward/cxxanyargs.hpp:282:1:
2021-11-09T19:26:26.5040433Z note: declared here
2021-11-09T19:26:26.5040978Z 282 | rb_rescue2(type *q, VALUE w, type *e, VALUE r, ...)
2021-11-09T19:26:26.5041442Z | ^~~~~~~~~~
2021-11-09T19:26:26.5042131Z linking shared-object mini_racer_extension.so
2021-11-09T19:26:26.5042674Z g++: error:
2021-11-09T19:26:26.5043793Z /home/runner/work/foo/foo/vendor/bundle/ruby/3.0.0/gems/libv8-node-16.10.0.0-x86_64-linux-musl/vendor/v8/x86_64-linux/libv8/obj/libv8_monolith.a:
2021-11-09T19:26:26.5044719Z No such file or directory
2021-11-09T19:26:26.5045327Z make: *** [Makefile:262: mini_racer_extension.so] Error 1
2021-11-09T19:26:26.5045738Z
2021-11-09T19:26:26.5046141Z make failed, exit code 2
2021-11-09T19:26:26.5046425Z
2021-11-09T19:26:26.5046851Z Gem files will remain installed in
2021-11-09T19:26:26.5047751Z /home/runner/work/foo/foo/vendor/bundle/ruby/3.0.0/gems/mini_racer-0.5.0.pre
2021-11-09T19:26:26.5048614Z for inspection.
2021-11-09T19:26:26.5049044Z Results logged to
2021-11-09T19:26:26.5050049Z /home/runner/work/foo/foo/vendor/bundle/ruby/3.0.0/extensions/x86_64-linux/3.0.0/mini_racer-0.5.0.pre/gem_make.out
2021-11-09T19:26:26.5050643Z
2021-11-09T19:26:26.5051214Z An error occurred while installing mini_racer (0.5.0.pre), and Bundler cannot
2021-11-09T19:26:26.5051802Z continue.
2021-11-09T19:26:26.5052502Z Make sure that `gem install mini_racer -v '0.5.0.pre' --source
2021-11-09T19:26:26.5053409Z 'https://rubygems.org/'` succeeds before bundling.
2021-11-09T19:26:26.5053875Z
2021-11-09T19:26:26.5054394Z In Gemfile:
2021-11-09T19:26:26.5054802Z mini_racer
2021-11-09T19:26:26.5532742Z Took 16.81 seconds
2021-11-09T19:26:26.5543323Z ##[endgroup]
2021-11-09T19:26:26.5553008Z ##[error]The process '/opt/hostedtoolcache/Ruby/3.0.1/x64/bin/bundle' failed with exit code 5
2021-11-09T19:26:26.5676829Z Cleaning up orphan processes
On an unrelated: mini_racer
0.5.0.pre works otherwise fine on Docker Desktop on Apple Silicon 🎉! The forking issue still persists, but otherwise it seems to work very well.
/cc @lloeki
Issue Analytics
- State:
- Created 2 years ago
- Reactions:10
- Comments:24
Top Results From Across the Web
Bump mini_racer from 0.4.0 to 0.5.0 getting compile errors #220
I see them in the GitHub Actions as well. Not sure exactly what caused it, but didn't see an existing issue so reporting....
Read more >v0.4.0 fails to build on ruby:3.0-alpine · Issue #199 - GitHub
With #186 being included in v0.4.0 I was hopeful that mini_racer would be installable in alpine containers. Unfortunately, it isn't quite ...
Read more >Bundler 2.2.3 generated Gemfile.lock on a mac cannot be ...
bundle exec rake -P bundler: failed to load command: rake ... 0.5.0.pre fails to install/build on Github Actions (Ruby 3.0.1) ...
Read more >0.4.0 crashes on aarch64-linux for Ruby 2.7 + 3.0; LoadError ...
However, this error only occurs when running rails assets:precompile as part of a Docker build when the host OS is running on Apple...
Read more >Bundler hangs at resolving dependencies on Alpine #5871
I am using the ruby:3.0.4-alpine3.15 Docker image. Which command did you run? gem install bundler --no-document bundle install -- ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Not sure this is useful, here what worked for me on Linux:
This took longer than I’d like to admit; I’m no bundler expert. A combination of @jarthod and @brilnius suggestions fixed this issue for me. My company supports multiple platforms, caches gems locally in
vendor/cache
, and was using bundler version 1.17.3. Here’s what I did:bundle remove mini_racer
.bundle remove libv8-node
if it’s an explicit requirement in yourGemfile
. If you have multiple platforms supported in yourGemfile.lock
, remove them. There should now be no trace of mini_racer or libv8-node.PLATFORM
in yourGemfile.lock
, usingbundle lock --add-platform <platform>
to add those that may be missing.bundle update --bundler
. YourGemfile.lock
should updateBUNDLED WITH
from 1.17.3 to 2.1.x.gem install bundler
BUNDLED WITH
from2.1.x
to2.3.x
or later (I used the latest available, which was2.3.4
)bundle add mini_racer
. This will also install its libv8-node dependencies for your local platform.bundle package --all-platforms
.This was all that was required. Sanity check that you’re good to go with a
bundle install
, which should be a noop.