Closed michaelcarter closed 2 years ago
Have you tried updating Rubygems / bundler in case this is fixed in the tip of either?
On Sat, Jan 15, 2022 at 3:30 AM Mike Carter @.***> wrote:
Apologies if this is a duplicate, I’ve been searching around and wrestling with this for a couple of hours but have had no luck.
I'm in the process of upgrading a Heroku rails app to Ruby 3.1.0, and am getting an error deploying to Heroku during the bundle install step:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/tmp/build_daf26635/vendor/bundle/ruby/3.1.0/gems/mini_racer-0.6.1/ext/mini_racer_extension
/tmp/build_daf26635/vendor/ruby-3.1.0/bin/ruby -I
/tmp/build_daf26635/vendor/ruby-3.1.0/lib/ruby/3.1.0 -r
./siteconf20220114-209-758jwm.rb extconf.rb
checking for -lpthread... yes
creating Makefile
current directory:
/tmp/build_daf26635/vendor/bundle/ruby/3.1.0/gems/mini_racer-0.6.1/ext/mini_racer_extension
make DESTDIR\= clean
current directory:
/tmp/build_daf26635/vendor/bundle/ruby/3.1.0/gems/mini_racer-0.6.1/ext/mini_racer_extension
make DESTDIR\=
compiling mini_racer_extension.cc
linking shared-object mini_racer_extension.so
g++: error:
/tmp/build_daf26635/vendor/bundle/ruby/3.1.0/gems/libv8-node-16.10.0.0-x86_64-linux-musl/vendor/v8/x86_64-linux/libv8/obj/libv8_monolith.a:
No such file or directory
make: *** [Makefile:263: mini_racer_extension.so] Error 1
make failed, exit code 2
Gem files will remain installed in
/tmp/build_daf26635/vendor/bundle/ruby/3.1.0/gems/mini_racer-0.6.1 for
inspection.
Results logged to
/tmp/build_daf26635/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0/mini_racer-0.6.1/gem_make.out
/tmp/build_daf26635/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:95:in
`run'
/tmp/build_daf26635/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:44:in
`block in make'
/tmp/build_daf26635/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:36:in
`each'
/tmp/build_daf26635/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:36:in
`make'
/tmp/build_daf26635/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/ext_conf_builder.rb:63:in
`block in build'
/tmp/build_daf26635/vendor/ruby-3.1.0/lib/ruby/3.1.0/tempfile.rb:317:in `open'
/tmp/build_daf26635/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/ext_conf_builder.rb:26:in
`build'
/tmp/build_daf26635/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:161:in
`build_extension'
/tmp/build_daf26635/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:195:in
`block in build_extensions'
/tmp/build_daf26635/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:192:in
`each'
/tmp/build_daf26635/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:192:in
`build_extensions'
/tmp/build_daf26635/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/installer.rb:847:in
`build_extensions'
/tmp/build_daf26635/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/rubygems_gem_installer.rb:71:in
`build_extensions'
/tmp/build_daf26635/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/rubygems_gem_installer.rb:28:in
`install'
/tmp/build_daf26635/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/source/rubygems.rb:204:in
`install'
/tmp/build_daf26635/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/installer/gem_installer.rb:54:in
`install'
/tmp/build_daf26635/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/tmp/build_daf26635/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/installer/parallel_installer.rb:186:in
`do_install'
/tmp/build_daf26635/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/installer/parallel_installer.rb:177:in
`block in worker_pool'
/tmp/build_daf26635/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/worker.rb:62:in
`apply_func'
/tmp/build_daf26635/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/worker.rb:57:in
`block in process_queue'
/tmp/build_daf26635/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/worker.rb:54:in
`loop'
/tmp/build_daf26635/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/worker.rb:54:in
`process_queue'
/tmp/build_daf26635/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/worker.rb:91:in
`block (2 levels) in create_threads'
An error occurred while installing mini_racer (0.6.1), and Bundler cannot
continue.
In Gemfile:
mini_racer
Failed to install gems via Bundler.
Push rejected, failed to compile Ruby app.
Push failed
Versions of things are as follows:
- Heroku stack: heroku-20
- Ruby version: 3.1.0
- Rails version: 6.1.4.4
- mini_racer version: 0.6.1
I've had a look to see if there's some way for me to view those files in /tmp/ for more information, but as far as I can tell they're emphemeral and disppear when the build fails. I thought it best to bring this here in case there's something simple I'm missing.
Thanks in advance for having a look!
— Reply to this email directly, view it on GitHub https://github.com/rubyjs/mini_racer/issues/231, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAABIXIJKWWXVVNGS5H4VVTUWBFUDANCNFSM5L7HPVHA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you are subscribed to this thread.Message ID: @.***>
Same problem here but with different ruby version
Versions of things are as follows:
Heroku stack: heroku-20 Ruby version: 2.7.4 Rails version: 6.0.4.1 mini_racer version: 0.6.2
Can you tell us what version of bundler you're using @victorfgs?
@michaelcarter haven't used Heroku in a long time. Are they running on musl libc?
[…]
/tmp/build_daf26635/vendor/bundle/ruby/3.1.0/gems/libv8-node-16.10.0.0-x86_64-linux-musl/vendor/v8/x86_64-linux/libv8/obj/libv8_monolith.a:
No such file or directory
[…]
Might point to a problem here.
PLATFORM
section of your Gemfile.lock
state? You might need to add your platform via bundle lock --add-platform x86_64-linux-musl
.@tisba Sorry it took a bit to get back to you, I've been battling with this all morning.
Are they running on musl libc?
I'm afraid I don't know. I had a Google but it wasn't clear. Do you know how I might be able to find out?
What does the PLATFORM section of your Gemfile.lock state? You might need to add your platform via bundle lock --add-platform x86_64-linux-musl.
It just had a ruby
entry. I've added x86_64-linux-musl
and re-done a bundle install locally. It took over an hour to complete, but it's now finished (successfully) locally.
Can you make sure to run the latest version of bundler?
Heroku uses fixed bundler versions depending on what version is specified in Gemfile.lock
. The behaviour is detailed here but the tl;dr is it's using 2.2.33
and it doesn't seem I'm able to change that.
Locally I'm running 2.3.3
. I've since downgraded this to 2.2.33
to match Heroku and am able to bundle install without a hitch. It just takes a while the first time, which I assume is because it's needing to rebuild everything.
When I push the above changes up to Heroku the build has a similar error message:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/tmp/build_0eec620e/vendor/bundle/ruby/3.1.0/gems/mini_racer-0.6.1/ext/mini_racer_extension
/tmp/build_0eec620e/vendor/ruby-3.1.0/bin/ruby -I
/tmp/build_0eec620e/vendor/ruby-3.1.0/lib/ruby/3.1.0 -r
./siteconf20220119-208-3cldig.rb extconf.rb
checking for -lpthread... yes
creating Makefile
current directory:
/tmp/build_0eec620e/vendor/bundle/ruby/3.1.0/gems/mini_racer-0.6.1/ext/mini_racer_extension
make DESTDIR\= clean
current directory:
/tmp/build_0eec620e/vendor/bundle/ruby/3.1.0/gems/mini_racer-0.6.1/ext/mini_racer_extension
make DESTDIR\=
compiling mini_racer_extension.cc
linking shared-object mini_racer_extension.so
g++: error:
/tmp/build_0eec620e/vendor/bundle/ruby/3.1.0/gems/libv8-node-16.10.0.0-x86_64-linux-musl/vendor/v8/x86_64-linux/libv8/obj/libv8_monolith.a:
No such file or directory
make: *** [Makefile:263: mini_racer_extension.so] Error 1
make failed, exit code 2
Gem files will remain installed in
/tmp/build_0eec620e/vendor/bundle/ruby/3.1.0/gems/mini_racer-0.6.1 for
inspection.
Results logged to
/tmp/build_0eec620e/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0/mini_racer-0.6.1/gem_make.out
/tmp/build_0eec620e/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:95:in
`run'
/tmp/build_0eec620e/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:44:in
`block in make'
/tmp/build_0eec620e/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:36:in
`each'
/tmp/build_0eec620e/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:36:in
`make'
/tmp/build_0eec620e/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/ext_conf_builder.rb:63:in
`block in build'
/tmp/build_0eec620e/vendor/ruby-3.1.0/lib/ruby/3.1.0/tempfile.rb:317:in `open'
/tmp/build_0eec620e/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/ext_conf_builder.rb:26:in
`build'
/tmp/build_0eec620e/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:161:in
`build_extension'
/tmp/build_0eec620e/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:195:in
`block in build_extensions'
/tmp/build_0eec620e/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:192:in
`each'
/tmp/build_0eec620e/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:192:in
`build_extensions'
/tmp/build_0eec620e/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/installer.rb:847:in
`build_extensions'
/tmp/build_0eec620e/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/rubygems_gem_installer.rb:71:in
`build_extensions'
/tmp/build_0eec620e/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/rubygems_gem_installer.rb:28:in
`install'
/tmp/build_0eec620e/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/source/rubygems.rb:204:in
`install'
/tmp/build_0eec620e/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/installer/gem_installer.rb:54:in
`install'
/tmp/build_0eec620e/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/tmp/build_0eec620e/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/installer/parallel_installer.rb:186:in
`do_install'
/tmp/build_0eec620e/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/installer/parallel_installer.rb:177:in
`block in worker_pool'
/tmp/build_0eec620e/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/worker.rb:62:in
`apply_func'
/tmp/build_0eec620e/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/worker.rb:57:in
`block in process_queue'
/tmp/build_0eec620e/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/worker.rb:54:in
`loop'
/tmp/build_0eec620e/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/worker.rb:54:in
`process_queue'
/tmp/build_0eec620e/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/worker.rb:91:in
`block (2 levels) in create_threads'
An error occurred while installing mini_racer (0.6.1), and Bundler cannot
continue.
In Gemfile:
mini_racer
Failed to install gems via Bundler.
Push rejected, failed to compile Ruby app.
Push failed
Again, no experience with Heroku 🤷
There has been some issues lately with (older) bundler versions, so not being to update that might be a tricky problem.
I would be surprised if Heroku did not document which libc they are using. But you can consult Ruby at runtime by reading the RUBY_PLATFORM
constant. For example:
$ docker run -it --rm ruby:3.1.0-alpine ruby -e "puts RUBY_PLATFORM"
x86_64-linux-musl
$ docker run -it --rm ruby:3.1.0 ruby -e "puts RUBY_PLATFORM"
x86_64-linux
Anyway: I can confirm, with current bundler version libv8-node is fetched and not compiled from source which is very fast. So I suspect that this is a Rubygems/bundler related issue 🤔
Ok, thanks @tisba. That RUBY_PLATFORM tip is good to know! 🏆
I'll keep on trying different things and report back if I get it working.
Thanks again for all your help.
I have a Rails 6.1.4.4 app with Ruby 3.0.3. All I did was upgrade it to Ruby 3.1.0 and I get this error. Nothing to do with Heroku.
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/jason/.rvm/gems/ruby-3.1.0@actioncue/gems/mini_racer-0.6.2/ext/mini_racer_extension
/home/jason/.rvm/rubies/ruby-3.1.0/bin/ruby -I /home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/3.1.0 -r
./siteconf20220127-70754-xb8vxf.rb extconf.rb
checking for -lpthread... yes
creating Makefile
current directory: /home/jason/.rvm/gems/ruby-3.1.0@actioncue/gems/mini_racer-0.6.2/ext/mini_racer_extension
make DESTDIR\= clean
current directory: /home/jason/.rvm/gems/ruby-3.1.0@actioncue/gems/mini_racer-0.6.2/ext/mini_racer_extension
make DESTDIR\=
compiling mini_racer_extension.cc
linking shared-object mini_racer_extension.so
g++: error:
/home/jason/.rvm/gems/ruby-3.1.0@actioncue/gems/libv8-node-16.10.0.0-x86_64-linux-musl/vendor/v8/x86_64-linux/libv8/obj/libv8_monolith.a:
No such file or directory
make: *** [Makefile:263: mini_racer_extension.so] Error 1
make failed, exit code 2
Gem files will remain installed in /home/jason/.rvm/gems/ruby-3.1.0@actioncue/gems/mini_racer-0.6.2 for inspection.
Results logged to /home/jason/.rvm/gems/ruby-3.1.0@actioncue/extensions/x86_64-linux/3.1.0/mini_racer-0.6.2/gem_make.out
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:95:in `run'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:44:in `block in make'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:36:in `each'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:36:in `make'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/ext_conf_builder.rb:63:in `block in build'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/3.1.0/tempfile.rb:317:in `open'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/ext_conf_builder.rb:26:in `build'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:161:in `build_extension'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:195:in `block in build_extensions'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:192:in `each'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:192:in `build_extensions'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/3.1.0/rubygems/installer.rb:847:in `build_extensions'
/home/jason/.rvm/gems/ruby-3.1.0@actioncue/gems/bundler-2.2.32/lib/bundler/rubygems_gem_installer.rb:71:in `build_extensions'
/home/jason/.rvm/gems/ruby-3.1.0@actioncue/gems/bundler-2.2.32/lib/bundler/rubygems_gem_installer.rb:28:in `install'
/home/jason/.rvm/gems/ruby-3.1.0@actioncue/gems/bundler-2.2.32/lib/bundler/source/rubygems.rb:200:in `install'
/home/jason/.rvm/gems/ruby-3.1.0@actioncue/gems/bundler-2.2.32/lib/bundler/installer/gem_installer.rb:54:in `install'
/home/jason/.rvm/gems/ruby-3.1.0@actioncue/gems/bundler-2.2.32/lib/bundler/installer/gem_installer.rb:16:in `install_from_spec'
/home/jason/.rvm/gems/ruby-3.1.0@actioncue/gems/bundler-2.2.32/lib/bundler/installer/parallel_installer.rb:186:in `do_install'
/home/jason/.rvm/gems/ruby-3.1.0@actioncue/gems/bundler-2.2.32/lib/bundler/installer/parallel_installer.rb:177:in `block in
worker_pool'
/home/jason/.rvm/gems/ruby-3.1.0@actioncue/gems/bundler-2.2.32/lib/bundler/worker.rb:62:in `apply_func'
/home/jason/.rvm/gems/ruby-3.1.0@actioncue/gems/bundler-2.2.32/lib/bundler/worker.rb:57:in `block in process_queue'
/home/jason/.rvm/gems/ruby-3.1.0@actioncue/gems/bundler-2.2.32/lib/bundler/worker.rb:54:in `loop'
/home/jason/.rvm/gems/ruby-3.1.0@actioncue/gems/bundler-2.2.32/lib/bundler/worker.rb:54:in `process_queue'
/home/jason/.rvm/gems/ruby-3.1.0@actioncue/gems/bundler-2.2.32/lib/bundler/worker.rb:91:in `block (2 levels) in create_threads'
An error occurred while installing mini_racer (0.6.2), and Bundler cannot continue.
In Gemfile:
mini_racer
@jasonperrone can you please share your Gemfile and Gemfile.lock? And share your bundle version as well.
Nevermind, I see the bundler version in the log. Please update bundler.
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/jason/.rvm/gems/ruby-3.1.0@actioncue/gems/mini_racer-0.6.2/ext/mini_racer_extension
/home/jason/.rvm/rubies/ruby-3.1.0/bin/ruby -I /home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/site_ruby/3.1.0 -r
./siteconf20220127-74773-bqhyji.rb extconf.rb
checking for -lpthread... yes
creating Makefile
current directory: /home/jason/.rvm/gems/ruby-3.1.0@actioncue/gems/mini_racer-0.6.2/ext/mini_racer_extension
make DESTDIR\= clean
current directory: /home/jason/.rvm/gems/ruby-3.1.0@actioncue/gems/mini_racer-0.6.2/ext/mini_racer_extension
make DESTDIR\=
compiling mini_racer_extension.cc
linking shared-object mini_racer_extension.so
g++: error:
/home/jason/.rvm/gems/ruby-3.1.0@actioncue/gems/libv8-node-16.10.0.0-x86_64-linux-musl/vendor/v8/x86_64-linux/libv8/obj/libv8_monolith.a:
No such file or directory
make: *** [Makefile:263: mini_racer_extension.so] Error 1
make failed, exit code 2
Gem files will remain installed in /home/jason/.rvm/gems/ruby-3.1.0@actioncue/gems/mini_racer-0.6.2 for inspection.
Results logged to /home/jason/.rvm/gems/ruby-3.1.0@actioncue/extensions/x86_64-linux/3.1.0/mini_racer-0.6.2/gem_make.out
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/site_ruby/3.1.0/rubygems/ext/builder.rb:95:in `run'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/site_ruby/3.1.0/rubygems/ext/builder.rb:44:in `block in make'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/site_ruby/3.1.0/rubygems/ext/builder.rb:36:in `each'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/site_ruby/3.1.0/rubygems/ext/builder.rb:36:in `make'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/site_ruby/3.1.0/rubygems/ext/ext_conf_builder.rb:63:in `block in build'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/3.1.0/tempfile.rb:317:in `open'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/site_ruby/3.1.0/rubygems/ext/ext_conf_builder.rb:26:in `build'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/site_ruby/3.1.0/rubygems/ext/builder.rb:161:in `build_extension'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/site_ruby/3.1.0/rubygems/ext/builder.rb:195:in `block in build_extensions'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/site_ruby/3.1.0/rubygems/ext/builder.rb:192:in `each'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/site_ruby/3.1.0/rubygems/ext/builder.rb:192:in `build_extensions'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/site_ruby/3.1.0/rubygems/installer.rb:853:in `build_extensions'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/site_ruby/3.1.0/bundler/rubygems_gem_installer.rb:71:in `build_extensions'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/site_ruby/3.1.0/bundler/rubygems_gem_installer.rb:28:in `install'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/site_ruby/3.1.0/bundler/source/rubygems.rb:204:in `install'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/site_ruby/3.1.0/bundler/installer/gem_installer.rb:54:in `install'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/site_ruby/3.1.0/bundler/installer/gem_installer.rb:16:in `install_from_spec'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/site_ruby/3.1.0/bundler/installer/parallel_installer.rb:186:in `do_install'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/site_ruby/3.1.0/bundler/installer/parallel_installer.rb:177:in `block in
worker_pool'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/site_ruby/3.1.0/bundler/worker.rb:62:in `apply_func'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/site_ruby/3.1.0/bundler/worker.rb:57:in `block in process_queue'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/site_ruby/3.1.0/bundler/worker.rb:54:in `loop'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/site_ruby/3.1.0/bundler/worker.rb:54:in `process_queue'
/home/jason/.rvm/rubies/ruby-3.1.0/lib/ruby/site_ruby/3.1.0/bundler/worker.rb:91:in `block (2 levels) in create_threads'
An error occurred while installing mini_racer (0.6.2), and Bundler cannot continue.
In Gemfile:
mini_racer
jason@ubuntu:~/Workspace/actioncue$ bundle version
Bundler version 2.3.6 (2022-01-26 commit 056f64c33a)
We're just going to pull this gem. Thanks.
@jasonperrone the problem is that your version of Bundler can't distinguish between libc
and musl
gem platforms, so you have to upgrade your version of Bundler
I didn't realize there was a version of bundler past 2.3.6
@jasonperrone it seems like your logs are from version 2.2.32 though?
/home/jason/.rvm/gems/ruby-3.1.0@actioncue/gems/bundler-2.2.32/lib/bundler/worker.rb:62:in `apply_func'
/home/jason/.rvm/gems/ruby-3.1.0@actioncue/gems/bundler-2.2.32/lib/bundler/worker.rb:57:in `block in process_queue'
/home/jason/.rvm/gems/ruby-3.1.0@actioncue/gems/bundler-2.2.32/lib/bundler/worker.rb:54:in `loop'
/home/jason/.rvm/gems/ruby-3.1.0@actioncue/gems/bundler-2.2.32/lib/bundler/worker.rb:54:in `process_queue'
/home/jason/.rvm/gems/ruby-3.1.0@actioncue/gems/bundler-2.2.32/lib/bundler/worker.rb:91:in `block (2 levels) in create_threads'
I don't actually know the specific versions that work / don't work, I just know that the musl/libc thing I mentioned is a very common bug in bundler that only got fixed recently.
You don't see my subsequent comment after I upgraded to 2.3.6?
Can not install it...
/Users/valeriidonika/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/psych-4.0.3/lib/psych/class_loader.rb:99:in `find': Tried to load unspecified class: Libv8::Node::Location::Vendor (Psych::DisallowedClass)
from /Users/valeriidonika/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/psych-4.0.3/lib/psych/class_loader.rb:28:in `load'
from /Users/valeriidonika/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/psych-4.0.3/lib/psych/visitors/to_ruby.rb:424:in `resolve_class'
from /Users/valeriidonika/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/psych-4.0.3/lib/psych/visitors/to_ruby.rb:213:in `visit_Psych_Nodes_Mapping'
from /Users/valeriidonika/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/psych-4.0.3/lib/psych/visitors/visitor.rb:30:in `visit'
from /Users/valeriidonika/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/psych-4.0.3/lib/psych/visitors/visitor.rb:6:in `accept'
from /Users/valeriidonika/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/psych-4.0.3/lib/psych/visitors/to_ruby.rb:35:in `accept'
from /Users/valeriidonika/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/psych-4.0.3/lib/psych/visitors/to_ruby.rb:318:in `visit_Psych_Nodes_Document'
from /Users/valeriidonika/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/psych-4.0.3/lib/psych/visitors/visitor.rb:30:in `visit'
from /Users/valeriidonika/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/psych-4.0.3/lib/psych/visitors/visitor.rb:6:in `accept'
from /Users/valeriidonika/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/psych-4.0.3/lib/psych/visitors/to_ruby.rb:35:in `accept'
from /Users/valeriidonika/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/psych-4.0.3/lib/psych.rb:335:in `safe_load'
from /Users/valeriidonika/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/psych-4.0.3/lib/psych.rb:370:in `load'
from /Users/valeriidonika/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/libv8-node-15.14.0.1-arm64-darwin-20/ext/libv8-node/location.rb:21:in `block in load!'
from /Users/valeriidonika/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/libv8-node-15.14.0.1-arm64-darwin-20/ext/libv8-node/location.rb:20:in `open'
from /Users/valeriidonika/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/libv8-node-15.14.0.1-arm64-darwin-20/ext/libv8-node/location.rb:20:in `load!'
from /Users/valeriidonika/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/libv8-node-15.14.0.1-arm64-darwin-20/lib/libv8/node.rb:8:in `configure_makefile'
from extconf.rb:64:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/valeriidonika/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/extensions/arm64-darwin-20/2.7.0/mini_racer-0.4.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Users/valeriidonika/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/mini_racer-0.4.0 for inspection.
Results logged to /Users/valeriidonika/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/extensions/arm64-darwin-20/2.7.0/mini_racer-0.4.0/gem_make.out
An error occurred while installing mini_racer (0.4.0), and Bundler cannot continue.
Make sure that `gem install mini_racer -v '0.4.0' --source 'https://rubygems.org/'` succeeds before bundling.
@DonikaV I think you're running into https://github.com/rubyjs/mini_racer/issues/208. This should be fixed with the current libv8-node
version 16.10.0.0
.
Can you try to uninstall all versions of mini_racer and libv8-node via gem uninstall --all mini_racer libv8-node
and try again? In case you're using bundler, make sure to run bundle update mini_racer libv8-node
as well.
I'm also having this issue with 0.6.2. Logs and files are below.
We've previously deployed other versions of mini_racer to Heroku fine, and this Gemfile builds locally on macOS.
Heroku uses Ubuntu, and we're on the Heroku-20 stack, packages listed here.
We're also using the Aptitude build pack on Heroku, so it's also possible to install apt packages if you think any are missing (but I doubt this is the issue)
I'll add a troubleshooting guide shortly, because it's always the same issue unfortunately 😞
@csuhta please make sure you have set the proper platforms in Gemfile.lock
using:
bundle lock --add-platform x86_64-linux
bundle lock --add-platform x86_64-darwin-21
This is a known issue with Rubygems where the platform is not resolved properly. In your logs you see, that the musl is to be installed (/tmp/build_a1a5338c/vendor/bundle/ruby/3.1.0/gems/libv8-node-16.10.0.0-x86_64-linux-musl/vendor/v8/x86_64-linux/libv8/obj/libv8_monolith.a
) although you probably run glibc.
@tisba Thank you very much, that was the culprit.
For some reason I have a very similar problem, even without using bundler at all! This is on a x86_64 machine runnning ruby 2.7.5: the "-musl" variant gets installed even though it's not a "-musl" ruby.
user@host:~$ ruby --version
ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-linux]
user@host:~$ gem install --platform x86_64-linux libv8-node
Successfully installed libv8-node-16.10.0.0-x86_64-linux-musl
1 gem installed
Do you guys have any idea for a workaround?
@Ecco I'm not 100% sure, but AFAIK gem install libv8-node --version 16.10.0.0 --platform x86_64-linux-libc
should do the trick. https://github.com/rubygems/rubygems/pull/4488 is the (or one?) related issue over at RubyGems.
Thanks, it did the trick indeed. Thank you so much @tisba !
We got distracted in this issue a couple of times, but I think we could resolve all issues as far as I can see.
I've added a PR to add an installation troubleshooting section to the README: https://github.com/rubyjs/mini_racer/pull/240.
Apologies if this is a duplicate, I’ve been searching around and wrestling with this for a couple of hours but have had no luck.
I'm in the process of upgrading a Heroku rails app to Ruby 3.1.0, and am getting an error deploying to Heroku during the
bundle install
step:Versions of things are as follows:
heroku-20
3.1.0
6.1.4.4
0.6.1
I've had a look to see if there's some way for me to view those files in
/tmp/
for more information, but as far as I can tell they're emphemeral and disppear when the build fails. I thought it best to bring this here in case there's something simple I'm missing.Thanks in advance for having a look!