rubyjs / mini_racer

Minimal embedded v8
MIT License
598 stars 93 forks source link

Bundle install of 0.6.1 fails on Heroku with Ruby 3.1.0 #231

Closed michaelcarter closed 2 years ago

michaelcarter commented 2 years ago

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:

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!

SamSaffron commented 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: @.***>

victorfgs commented 2 years ago

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

tisba commented 2 years ago

Can you tell us what version of bundler you're using @victorfgs?

tisba commented 2 years ago

@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.

  1. 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.
  2. Can you make sure to run the latest version of bundler?
michaelcarter commented 2 years ago

@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
tisba commented 2 years ago

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 🤔

michaelcarter commented 2 years ago

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.

jasonperrone commented 2 years ago

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
tisba commented 2 years ago

@jasonperrone can you please share your Gemfile and Gemfile.lock? And share your bundle version as well.

tisba commented 2 years ago

Nevermind, I see the bundler version in the log. Please update bundler.

jasonperrone commented 2 years ago
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)
jasonperrone commented 2 years ago

We're just going to pull this gem. Thanks.

nightpool commented 2 years ago

@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

jasonperrone commented 2 years ago

I didn't realize there was a version of bundler past 2.3.6

nightpool commented 2 years ago

@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.

jasonperrone commented 2 years ago

You don't see my subsequent comment after I upgraded to 2.3.6?

DonikaV commented 2 years ago

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.
tisba commented 2 years ago

@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.

csuhta commented 2 years ago

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)

Build Log ``` remote: Gem::Ext::BuildError: ERROR: Failed to build gem native extension. remote: remote: current directory: remote: /tmp/build_a1a5338c/vendor/bundle/ruby/3.1.0/gems/mini_racer-0.6.2/ext/mini_racer_extension remote: /tmp/build_a1a5338c/vendor/ruby-3.1.0/bin/ruby -I remote: /tmp/build_a1a5338c/vendor/ruby-3.1.0/lib/ruby/3.1.0 -r remote: ./siteconf20220208-660-86qnn6.rb extconf.rb remote: checking for -lpthread... yes remote: creating Makefile remote: remote: current directory: remote: /tmp/build_a1a5338c/vendor/bundle/ruby/3.1.0/gems/mini_racer-0.6.2/ext/mini_racer_extension remote: make DESTDIR\= clean remote: remote: current directory: remote: /tmp/build_a1a5338c/vendor/bundle/ruby/3.1.0/gems/mini_racer-0.6.2/ext/mini_racer_extension remote: make DESTDIR\= remote: compiling mini_racer_extension.cc remote: linking shared-object mini_racer_extension.so remote: g++: error: remote: /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: remote: No such file or directory remote: make: *** [Makefile:263: mini_racer_extension.so] Error 1 remote: remote: make failed, exit code 2 remote: remote: Gem files will remain installed in remote: /tmp/build_a1a5338c/vendor/bundle/ruby/3.1.0/gems/mini_racer-0.6.2 for remote: inspection. remote: Results logged to remote: /tmp/build_a1a5338c/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0/mini_racer-0.6.2/gem_make.out remote: remote: /tmp/build_a1a5338c/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:95:in remote: `run' remote: /tmp/build_a1a5338c/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:44:in remote: `block in make' remote: /tmp/build_a1a5338c/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:36:in remote: `each' remote: /tmp/build_a1a5338c/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:36:in remote: `make' remote: /tmp/build_a1a5338c/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/ext_conf_builder.rb:63:in remote: `block in build' remote: /tmp/build_a1a5338c/vendor/ruby-3.1.0/lib/ruby/3.1.0/tempfile.rb:317:in `open' remote: /tmp/build_a1a5338c/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/ext_conf_builder.rb:26:in remote: `build' remote: /tmp/build_a1a5338c/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:161:in remote: `build_extension' remote: /tmp/build_a1a5338c/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:195:in remote: `block in build_extensions' remote: /tmp/build_a1a5338c/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:192:in remote: `each' remote: /tmp/build_a1a5338c/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/ext/builder.rb:192:in remote: `build_extensions' remote: /tmp/build_a1a5338c/vendor/ruby-3.1.0/lib/ruby/3.1.0/rubygems/installer.rb:847:in remote: `build_extensions' remote: /tmp/build_a1a5338c/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/rubygems_gem_installer.rb:71:in remote: `build_extensions' remote: /tmp/build_a1a5338c/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/rubygems_gem_installer.rb:28:in remote: `install' remote: /tmp/build_a1a5338c/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/source/rubygems.rb:204:in remote: `install' remote: /tmp/build_a1a5338c/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/installer/gem_installer.rb:54:in remote: `install' remote: /tmp/build_a1a5338c/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/installer/gem_installer.rb:16:in remote: `install_from_spec' remote: /tmp/build_a1a5338c/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/installer/parallel_installer.rb:186:in remote: `do_install' remote: /tmp/build_a1a5338c/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/installer/parallel_installer.rb:177:in remote: `block in worker_pool' remote: /tmp/build_a1a5338c/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/worker.rb:62:in remote: `apply_func' remote: /tmp/build_a1a5338c/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/worker.rb:57:in remote: `block in process_queue' remote: /tmp/build_a1a5338c/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/worker.rb:54:in remote: `loop' remote: /tmp/build_a1a5338c/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/worker.rb:54:in remote: `process_queue' remote: /tmp/build_a1a5338c/vendor/ruby-3.1.0/lib/ruby/3.1.0/bundler/worker.rb:91:in remote: `block (2 levels) in create_threads' remote: remote: An error occurred while installing mini_racer (0.6.2), and Bundler cannot remote: continue. remote: remote: In Gemfile: remote: mini_racer remote: remote: ! remote: ! Failed to install gems via Bundler. remote: ! remote: ! Push rejected, failed to compile Ruby app. remote: remote: ! Push failed ```
Gemfile.lock ``` GEM remote: https://rubygems.org/ specs: actioncable (7.0.1) actionpack (= 7.0.1) activesupport (= 7.0.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) actionmailbox (7.0.1) actionpack (= 7.0.1) activejob (= 7.0.1) activerecord (= 7.0.1) activestorage (= 7.0.1) activesupport (= 7.0.1) mail (>= 2.7.1) net-imap net-pop net-smtp actionmailer (7.0.1) actionpack (= 7.0.1) actionview (= 7.0.1) activejob (= 7.0.1) activesupport (= 7.0.1) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) actionpack (7.0.1) actionview (= 7.0.1) activesupport (= 7.0.1) rack (~> 2.0, >= 2.2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) actiontext (7.0.1) actionpack (= 7.0.1) activerecord (= 7.0.1) activestorage (= 7.0.1) activesupport (= 7.0.1) globalid (>= 0.6.0) nokogiri (>= 1.8.5) actionview (7.0.1) activesupport (= 7.0.1) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) activejob (7.0.1) activesupport (= 7.0.1) globalid (>= 0.3.6) activemodel (7.0.1) activesupport (= 7.0.1) activerecord (7.0.1) activemodel (= 7.0.1) activesupport (= 7.0.1) activestorage (7.0.1) actionpack (= 7.0.1) activejob (= 7.0.1) activerecord (= 7.0.1) activesupport (= 7.0.1) marcel (~> 1.0) mini_mime (>= 1.1.0) activesupport (7.0.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) autoprefixer-rails (9.8.5) execjs barnes (0.0.9) multi_json (~> 1) statsd-ruby (~> 1.1) bugsnag (6.24.2) concurrent-ruby (~> 1.0) builder (3.2.4) chunky_png (1.4.0) coderay (1.1.3) concurrent-ruby (1.1.9) connection_pool (2.2.5) content_disposition (1.0.0) crass (1.0.6) dalli (2.7.11) delayed_job (4.1.10) activesupport (>= 3.0, < 8.0) diffy (3.4.0) digest (3.1.0) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) dotenv (2.7.6) dotenv-rails (2.7.6) dotenv (= 2.7.6) railties (>= 3.2) down (5.2.4) addressable (~> 2.8) erubi (1.10.0) ethon (0.15.0) ffi (>= 1.15.0) execjs (2.8.1) fastimage (2.2.6) ffi (1.15.5) ffi-compiler (1.0.1) ffi (>= 1.0.0) rake globalid (1.0.0) activesupport (>= 5.0) http (4.4.1) addressable (~> 2.3) http-cookie (~> 1.0) http-form_data (~> 2.2) http-parser (~> 1.2.0) http-cookie (1.0.4) domain_name (~> 0.5) http-form_data (2.3.0) http-parser (1.2.3) ffi-compiler (>= 1.0, < 2.0) i18n (1.9.1) concurrent-ruby (~> 1.0) image_processing (0.11.2) io-wait (0.2.1) libv8-node (16.10.0.0) lograge (0.11.2) actionpack (>= 4) activesupport (>= 4) railties (>= 4) request_store (~> 1.0) loofah (2.13.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) mini_mime (>= 0.1.1) marcel (1.0.2) method_source (1.0.0) mime-types (3.4.1) mime-types-data (~> 3.2015) mime-types-data (3.2022.0105) mini_magick (4.11.0) mini_mime (1.1.2) mini_portile2 (2.7.1) mini_racer (0.6.2) libv8-node (~> 16.10.0.0) minitest (5.15.0) multi_json (1.15.0) net-imap (0.2.3) digest net-protocol strscan net-pop (0.1.1) digest net-protocol timeout net-protocol (0.1.2) io-wait timeout net-smtp (0.3.1) digest net-protocol timeout nio4r (2.5.8) nokogiri (1.13.1) mini_portile2 (~> 2.7.0) racc (~> 1.4) pg (1.3.1) pry (0.14.1) coderay (~> 1.1) method_source (~> 1.0) pry-rails (0.3.9) pry (>= 0.10.4) public_suffix (4.0.6) puma (5.5.2) nio4r (~> 2.0) racc (1.6.0) rack (2.2.3) rack-test (1.1.0) rack (>= 1.0, < 3) rails (7.0.1) actioncable (= 7.0.1) actionmailbox (= 7.0.1) actionmailer (= 7.0.1) actionpack (= 7.0.1) actiontext (= 7.0.1) actionview (= 7.0.1) activejob (= 7.0.1) activemodel (= 7.0.1) activerecord (= 7.0.1) activestorage (= 7.0.1) activesupport (= 7.0.1) bundler (>= 1.15.0) railties (= 7.0.1) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) rails-html-sanitizer (1.4.2) loofah (~> 2.3) railties (7.0.1) actionpack (= 7.0.1) activesupport (= 7.0.1) method_source rake (>= 12.2) thor (~> 1.0) zeitwerk (~> 2.5) rake (13.0.6) redcarpet (3.5.1) request_store (1.5.1) rack (>= 1.4) rotp (6.2.0) rqrcode (0.10.1) chunky_png (~> 1.0) rubyzip (1.3.0) sassc (2.4.0) ffi (~> 1.9) sassc-rails (2.1.2) railties (>= 4.0.0) sassc (>= 2.0) sprockets (> 3.0) sprockets-rails tilt scrypt (3.0.7) ffi-compiler (>= 1.0, < 2.0) sequel (5.53.0) sequel_pg (1.14.0) pg (>= 0.18.0, != 1.2.0) sequel (>= 4.38.0) shrine (3.4.0) content_disposition (~> 1.0) down (~> 5.1) sprockets (4.0.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-rails (3.4.2) actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) statsd-ruby (1.5.0) stripe (5.43.0) strscan (3.0.1) thor (1.2.1) tilt (2.0.10) timeout (0.2.0) tunemygc (1.0.71) typhoeus (1.4.0) ethon (>= 0.9.0) tzinfo (2.0.4) concurrent-ruby (~> 1.0) uglifier (4.2.0) execjs (>= 0.3.0, < 3) unf (0.1.4) unf_ext unf_ext (0.0.8) websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) zeitwerk (2.5.4) PLATFORMS ruby DEPENDENCIES autoprefixer-rails (= 9.8.5) barnes bugsnag connection_pool (~> 2.2) dalli (~> 2.7.11) delayed_job (~> 4.1) diffy (~> 3.3) dotenv-rails (~> 2) down (~> 5.0) fastimage (~> 2.1) http (~> 4.4.1) image_processing (~> 0.4) lograge (~> 0.11.2) mime-types (~> 3.1) mini_magick (~> 4.7) mini_racer (~> 0.6.2) minitest (~> 5.10) pry-rails (~> 0.3) puma (~> 5.5.1) rails (~> 7.0.1) redcarpet (~> 3.4) rotp (~> 6.2) rqrcode (~> 0.10) rubyzip (~> 1.2) sassc-rails (~> 2.1.2) scrypt (~> 3.0) sequel (~> 5.53) sequel_pg (~> 1.12) shrine (~> 3.0) sprockets (~> 4.0.2) stripe tunemygc typhoeus (~> 1.1) uglifier (~> 4.1) RUBY VERSION ruby 3.1.0p0 BUNDLED WITH 2.3.6 ```
tisba commented 2 years ago

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:

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.

csuhta commented 2 years ago

@tisba Thank you very much, that was the culprit.

Ecco commented 2 years ago

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?

tisba commented 2 years ago

@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.

Ecco commented 2 years ago

Thanks, it did the trick indeed. Thank you so much @tisba !

tisba commented 2 years ago

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.