question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

circle ci mini_racer 0.6.2 can not be installed blowing up on gcc

See original GitHub issue
Fetching mini_racer 0.6.2
Installing mini_racer 0.6.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /home/circleci/app/vendor/bundle/gems/mini_racer-0.6.2/ext/mini_racer_extension
/usr/local/bin/ruby -I /usr/local/lib/ruby/site_ruby/2.6.0 -r ./siteconf20220202-2908-e0sqgh.rb extconf.rb
checking for -lpthread... yes
creating Makefile

current directory: /home/circleci/app/vendor/bundle/gems/mini_racer-0.6.2/ext/mini_racer_extension
make DESTDIR\= clean

current directory: /home/circleci/app/vendor/bundle/gems/mini_racer-0.6.2/ext/mini_racer_extension
make DESTDIR\=
compiling mini_racer_extension.cc
cc1plus: warning: command line option ‘-Wimplicit-int’ is valid for C/ObjC but not for C++
mini_racer_extension.cc: In function ‘VALUE convert_v8_to_ruby(v8::Isolate*, v8::Local<v8::Context>, v8::Local<v8::Value>)’:
mini_racer_extension.cc:573:18: warning: ‘stackCounter.StackCounter::isolate’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  573 |     StackCounter stackCounter(isolate);
      |                  ^~~~~~~~~~~~
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-self-assign’
cc1plus: warning: unrecognized command line option ‘-Wno-parentheses-equality’
cc1plus: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
linking shared-object mini_racer_extension.so
g++: error: /home/circleci/app/vendor/bundle/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:262: mini_racer_extension.so] Error 1

make failed, exit code 2

Gem files will remain installed in /home/circleci/app/vendor/bundle/gems/mini_racer-0.6.2 for inspection.
Results logged to /home/circleci/app/vendor/bundle/extensions/x86_64-linux/2.6.0-static/mini_racer-0.6.2/gem_make.out

An error occurred while installing mini_racer (0.6.2), and Bundler cannot continue.
Make sure that `gem install mini_racer -v '0.6.2'` succeeds before bundling.

In Gemfile:
  sqreen was resolved to 1.25.0, which depends on
    mini_racer
circleci@e2a69f087b6e:~/app$ gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 3.2.32
  - RUBY VERSION: 2.6.9 (2021-11-24 patchlevel 207) [x86_64-linux]
  - INSTALLATION DIRECTORY: /home/circleci/.rubygems
  - USER INSTALLATION DIRECTORY: /home/circleci/.local/share/gem/ruby/2.6.0
  - RUBY EXECUTABLE: /usr/local/bin/ruby
  - GIT EXECUTABLE: /usr/bin/git
  - EXECUTABLE DIRECTORY: /home/circleci/.rubygems/bin
  - SPEC CACHE DIRECTORY: /home/circleci/.local/share/gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /usr/local/etc
  - RUBYGEMS PLATFORMS:
     - ruby
     - x86_64-linux
  - GEM PATHS:
     - /home/circleci/.rubygems
     - /home/circleci/.local/share/gem/ruby/2.6.0
     - /usr/local/lib/ruby/gems/2.6.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
     - "gem" => "--no-document"
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /home/circleci/.rubygems/bin
     - /gems/bin
     - /home/circleci/bin
     - /home/circleci/.local/bin
     - /usr/local/sbin
     - /usr/local/bin
     - /usr/sbin
     - /usr/bin
     - /sbin
     - /bin
circleci@e2a69f087b6e:~/app$

circleci@e2a69f087b6e:~/app$ sudo gem list | grep libv8
circleci@e2a69f087b6e:~/app$ gem install libv8
Successfully installed libv8-8.4.255.0-x86_64-linux
1 gem installed
circleci@e2a69f087b6e:~/app$

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

3reactions
tisbacommented, Feb 2, 2022

Hey @chrishough 👋 This is not a problem with GCC, these are just warnings. The problem is that the wrong platform is picked up which is a known issue with bundler (should be fixed though).

  • How are you trying to install mini_racer? If you are using Bundler, can you make sure that you have specified the correct platform in Gemfile.lock via bundle lock --add-platform?
  • Can you make sure to have the latest Bundler installed? Should be 2.3.6

You are trying to install libv8-node-16.10.0.0-x86_64-linux-musl for musl libc which doesn’t seem to be the right target.

PS: libv8 is no longer used with mini_racer.

0reactions
CristiRazvicommented, Sep 21, 2022

from https://github.com/rubyjs/mini_racer#troubleshooting updating bundler did the job for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rubyjs Mini_racer Issues - IssueHint
circle ci mini_racer 0.6.2 can not be installed blowing up on gcc, closed, 7, 2022-02-02, 2022-12-07. Bundle install of 0.6.1 fails on Heroku...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found