mini_racer: Bundler can't install 0.6.2
I don’t know if this is the right place to ask; feel free to remove this or redirect me if not.
I need to install mini_racer (0.6.2) for a project, but it displays an error when I try to use bundle install (no other gems seem to have problems). Log:
/home/[username]/.rvm/gems/ruby-2.7.5/gems/mini_racer-0.6.2/ext/mini_racer_extension
/home/[username]/.rvm/rubies/ruby-2.7.5/bin/ruby -I
/home/[username]/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0 -r
./siteconf20220209-58365-19f34ip.rb extconf.rb
checking for -lpthread... yes
creating Makefile
current directory:
/home/[username]/.rvm/gems/ruby-2.7.5/gems/mini_racer-0.6.2/ext/mini_racer_extension
make "DESTDIR=" clean
current directory:
/home/[username]/.rvm/gems/ruby-2.7.5/gems/mini_racer-0.6.2/ext/mini_racer_extension
make "DESTDIR="
compiling mini_racer_extension.cc
In file included from
/home/[username]/.rvm/gems/ruby-2.7.5/gems/libv8-node-16.10.0.0-x86_64-linux-musl/vendor/v8/include/v8.h:30,
from mini_racer_extension.cc:6:
/home/[username]/.rvm/gems/ruby-2.7.5/gems/libv8-node-16.10.0.0-x86_64-linux-musl/vendor/v8/include/v8-internal.h:
In function ‘VALUE convert_v8_to_ruby(v8::Isolate*, v8::Local<v8::Context>,
v8::Local<v8::Value>)’:
/home/[username]/.rvm/gems/ruby-2.7.5/gems/libv8-node-16.10.0.0-x86_64-linux-musl/vendor/v8/include/v8-internal.h:364:48:
warning: ‘stackCounter.StackCounter::isolate’ may be used uninitialized in this
function [-Wmaybe-uninitialized]
364 | return *reinterpret_cast<void* const*>(addr);
| ^
mini_racer_extension.cc:573:18: note: ‘stackCounter.StackCounter::isolate’ was
declared here
573 | StackCounter stackCounter(isolate);
| ^~~~~~~~~~~~
linking shared-object mini_racer_extension.so
/usr/bin/ld: cannot find
/home/[username]/.rvm/gems/ruby-2.7.5/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
collect2: error: ld returned 1 exit status
make: *** [Makefile:262: mini_racer_extension.so] Error 1
make failed, exit code 2
Gem files will remain installed in
/home/[username]/.rvm/gems/ruby-2.7.5/gems/mini_racer-0.6.2 for inspection.
Results logged to
/home/[username]/.rvm/gems/ruby-2.7.5/extensions/x86_64-linux/2.7.0/mini_racer-0.6.2/gem_make.out
/home/[username]/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/ext/builder.rb:99:in
`run'
/home/[username]/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/ext/builder.rb:51:in
`block in make'
/home/[username]/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/ext/builder.rb:43:in
`each'
/home/[username]/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/ext/builder.rb:43:in
`make'
/home/[username]/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/ext/ext_conf_builder.rb:63:in
`block in build'
/home/[username]/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/tempfile.rb:291:in `open'
/home/[username]/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/ext/ext_conf_builder.rb:30:in
`build'
/home/[username]/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/ext/builder.rb:169:in
`block in build_extension'
/home/[username]/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/ext/builder.rb:165:in
`synchronize'
/home/[username]/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/ext/builder.rb:165:in
`build_extension'
/home/[username]/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/ext/builder.rb:210:in
`block in build_extensions'
/home/[username]/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/ext/builder.rb:207:in
`each'
/home/[username]/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/ext/builder.rb:207:in
`build_extensions'
/home/[username]/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems/installer.rb:844:in
`build_extensions'
/home/[username]/.rvm/gems/ruby-2.7.5/gems/bundler-2.3.7/lib/bundler/rubygems_gem_installer.rb:71:in
`build_extensions'
/home/[username]/.rvm/gems/ruby-2.7.5/gems/bundler-2.3.7/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
/home/[username]/.rvm/gems/ruby-2.7.5/gems/bundler-2.3.7/lib/bundler/source/rubygems.rb:204:in
`install'
/home/[username]/.rvm/gems/ruby-2.7.5/gems/bundler-2.3.7/lib/bundler/installer/gem_installer.rb:54:in
`install'
/home/[username]/.rvm/gems/ruby-2.7.5/gems/bundler-2.3.7/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/home/[username]/.rvm/gems/ruby-2.7.5/gems/bundler-2.3.7/lib/bundler/installer/parallel_installer.rb:186:in
`do_install'
/home/[username]/.rvm/gems/ruby-2.7.5/gems/bundler-2.3.7/lib/bundler/installer/parallel_installer.rb:177:in
`block in worker_pool'
/home/[username]/.rvm/gems/ruby-2.7.5/gems/bundler-2.3.7/lib/bundler/worker.rb:62:in
`apply_func'
/home/[username]/.rvm/gems/ruby-2.7.5/gems/bundler-2.3.7/lib/bundler/worker.rb:57:in
`block in process_queue'
/home/[username]/.rvm/gems/ruby-2.7.5/gems/bundler-2.3.7/lib/bundler/worker.rb:54:in
`loop'
/home/[username]/.rvm/gems/ruby-2.7.5/gems/bundler-2.3.7/lib/bundler/worker.rb:54:in
`process_queue'
/home/[username]/.rvm/gems/ruby-2.7.5/gems/bundler-2.3.7/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
I’ve tried removing mini_racer from the Gemfile.lock, but I still need it for one of the steps during compilation.
System version: Ubuntu 21.10 Bundler: 2.3.7 Ruby: 2.7.5 (I’m using Ruby 2.7.5 as recommended on the repo I’m trying to compile.) Tell me if you need any more version numbers.
Thank you for any and all help.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16
OK, I switched back to the original declaration, removed
libv8-node, and thenbundle installworked. It’s possible I didn’t installmini_racercorrectly after specifying the git source, and that I just misunderstood.Thank you for your help.
Hey @gabldotink. You should not have to switch to git (actually I don’t really know why this would help). Are you sure you’ve removed all
libv8-nodeversions? (gem uninstall --all mini_racer libv8-node). The error message still looks like, an incorrectlibv8-nodegets picked up.See also https://github.com/rubyjs/mini_racer#troubleshooting
For what it’s worth, I’m also running into the same issue trying to install
mini_raceron Debian 11 (so a glibc-based x86_64 system). Of course this is not directly related tomini_raceritself but to thelibv8-nodegem.Thanks to @tisba in #231 I got it to work manually (i.e. via
gem install) but I haven’t found a way that works throughbundle installyet.Here are my findings:
gem install libv8-nodegem install --platform x86_64-linux libv8-nodegem install libv8-node --version 16.10.0.0 --platform x86_64-linux-libcbundle lock --add-platform x86_64-linuxbundle lock --add-platform x86_64-linux-libcbundle lock --remove-platform ruby --add-platform x86_64-linux-libc