mini_racer: Load error with 0.3.0 and 0.3.1

The new versions are causing a crash on my development system when I load them. It’s a Centos 7 system with libv8 (8.4.255.0 x86_64-linux) installed.

This is the message

/usr/local/rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require': /usr/local/rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/mini_racer-0.3.1/lib/mini_racer_extension.so: undefined symbol: _ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE - /usr/local/rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/mini_racer-0.3.1/lib/mini_racer_extension.so (LoadError)

Rolling back to 0.2.15 solves the problem.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 11
  • Comments: 19 (3 by maintainers)

Most upvoted comments

I want to get this sorted, but think the only easy thing to do here will be to compile mini_racer to a binary and publish that for Linux x64 to match the v8 binary release.

PR totally welcome to make the packaging changes so we publish a “source” release + a binary release for x64 linux

@nightpool I wonder if we should start pushing binary versions of mini racer, at least for linux?

I also have this issue on an Amazon Linux system which is similar to CentOS.

I seem to be on this GCC version:

gcc (GCC) 7.3.1 20180712 (Red Hat 7.3.1-9)

edit: this specific error from @valscion’s comment, just two above mine

This still does not work on my Centos 7 system. The gems compile correctly, but, under passenger, the app will not start.

/var/www/html/.com/public/shared/bundle/ruby/2.7.0/gems/mini_racer-0.3.1/lib/mini_racer_extension.so: undefined symbol: _ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE - /var/www/html/.com/public/shared/bundle/ruby/2.7.0/gems/mini_racer-0.3.1/lib/mini_racer_extension.so (LoadError) gcc version 9.3.1 20200408 (Red Hat 9.3.1-2) (GCC)

On Oct 4, 2020, at 11:03 PM, Amir Sharif notifications@github.com wrote:

Okay, here how I unblocked using @esb https://github.com/esb’s tips.

sudo yum group install “Development Tools” sudo yum install centos-release-scl # handles multiple versions of scl scl enable devtoolset-9 bash # set everything up for version 9 gcc --version # this should be 9 now source scl_source enable devtoolset- 9 # add to bash so you always use this version when deploying

Clear out your bundle and re-run bundle. It seems to work now!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rubyjs/mini_racer/issues/169#issuecomment-703371226, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQTUIQDSZQ3VAIDSHRZASTSJEZQ3ANCNFSM4PGG22KQ.

this can be easily reproduced using the official ruby 2.4.1 docker image (which i have to use in my current project)

$ docker run -it ruby:2.4.1 bash
# now within the ruby:2.4.1 based container:
$ gcc --version
gcc (Debian 4.9.2-10) 4.9.2
$ gem install mini_racer
$ ruby -e 'require "mini_racer"'

results in

/usr/local/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': /usr/local/bundle/gems/mini_racer-0.3.1/lib/mini_racer_extension.so: undefined symbol: _ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE - /usr/local/bundle/gems/mini_racer-0.3.1/lib/mini_racer_extension.so (LoadError)
	from /usr/local/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/local/bundle/gems/mini_racer-0.3.1/lib/mini_racer.rb:2:in `<top (required)>'
	from /usr/local/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in `require'
	from /usr/local/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in `rescue in require'
	from /usr/local/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:40:in `require'
	from -e:1:in `<main>'

I have the same problem on Centos 7 (with gcc 4.8.5) as valscion. Taking a cue from Issue 50, I tried installing newer versions of gcc. Versions 7.4 and 8.0 give the same error message.

I have a Centos 8 staging environment with gcc 8.1 installed, and this works fine.

The gem was compiled on the same system as the reported error.

This is on Centos 7, which has GCC 4.8.5 as standard.