alpine-pkg-glibc icon indicating copy to clipboard operation
alpine-pkg-glibc copied to clipboard

mini_racer not working, __fprintf_chk: symbol not found

Open Ehekatl opened this issue 9 years ago • 19 comments
trafficstars

LoadError: Error relocating /home/app/gems/gems/mini_racer-0.1.3/lib/mini_racer_extension.so: __fprintf_chk: symbol not found - /home/app/gems/gems/mini_racer-0.1.3/lib/mini_racer_extension.so
/home/app/gems/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
/home/app/gems/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
/home/app/gems/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
/home/app/gems/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
/home/app/gems/gems/mini_racer-0.1.3/lib/mini_racer.rb:2:in `<top (required)>'
/home/app/gems/gems/bundler-1.12.2/lib/bundler/runtime.rb:86:in `require'
/home/app/gems/gems/bundler-1.12.2/lib/bundler/runtime.rb:86:in `block (2 levels) in require'
/home/app/gems/gems/bundler-1.12.2/lib/bundler/runtime.rb:81:in `each'
/home/app/gems/gems/bundler-1.12.2/lib/bundler/runtime.rb:81:in `block in require'
/home/app/gems/gems/bundler-1.12.2/lib/bundler/runtime.rb:70:in `each'
/home/app/gems/gems/bundler-1.12.2/lib/bundler/runtime.rb:70:in `require'
/home/app/gems/gems/bundler-1.12.2/lib/bundler.rb:102:in `require'
/home/app/config/application.rb:11:in `<top (required)>'
/home/app/Rakefile:5:in `require'
/home/app/Rakefile:5:in `<top (required)>'

I'm using the latest version of glibc

Ehekatl avatar Jun 14 '16 03:06 Ehekatl

The problem appears to be in the includes declared in mini_racer's ext/mini_racer_extension/mini_racer_extension.cc file which was fixed in https://github.com/discourse/mini_racer/commit/c9f141b58eac9ef293237bcda1c3929b2d3b5c6f.

sgerrand avatar Jul 16 '16 12:07 sgerrand

Ah, ignore my previous comment. That relates to an issue I had installing the mini_racer gem to reproduce the issue.

sgerrand avatar Jul 16 '16 12:07 sgerrand

I can only find one reference to fprintf in the mini_racer gem's ext/mini_racer_extension/mini_racer_extension.cc file. Have you tried recompiling the gem?

sgerrand avatar Jul 16 '16 12:07 sgerrand

👋 @Ehekatl ☝️

sgerrand avatar Jul 16 '16 12:07 sgerrand

Same problem here and it's kind of sad :( Because of this I can not build a react-on-rails app :(

fusillicode avatar Sep 09 '16 08:09 fusillicode

same problem

3den avatar Feb 08 '17 02:02 3den

I also have the same problem, is this issue solved?

ggwzrd avatar Jun 10 '17 13:06 ggwzrd

Same here :-(

mosheka avatar Jun 18 '17 11:06 mosheka

Same here :-( In the meantime another soluton by be using multistage builds, and do the assets precompile on ubuntu and copy the results to alpine

mosheka avatar Jun 18 '17 12:06 mosheka

I'm also running in to this problem

benoist avatar Jul 06 '17 14:07 benoist

Same for me.

Antiarchitect avatar Aug 09 '17 15:08 Antiarchitect

Hello all!

mini_racer depends on the libv8 gem which distributes a statically linked (against glibc) V8. At this point rubygems has no support for distributing binary gems that are linked against a specific standard library :(. I would really like to see this implemented there so I can release libv8 linked against musl.

Please take a look at these sections in libv8's README. I hope they're helpful for you:

https://github.com/cowboyd/libv8#use-with-different-standard-c-libraries

https://github.com/cowboyd/libv8#source-and-binary-releases

ignisf avatar Aug 22 '17 16:08 ignisf

Any work arounds for this ?

andreimc avatar Feb 13 '18 04:02 andreimc

Not unless you can make the debugging symbols being referenced available to the runtime. Without those this will continue to happen.

sgerrand avatar Feb 13 '18 04:02 sgerrand

Is there a way to compile libv8 from source with the symbols?

andreimc avatar Feb 13 '18 04:02 andreimc

@andreimic, how exactly do you want to do that? Make Rubygems compile the gem from source or create a binary .gem file you can distribute?

ignisf avatar Feb 13 '18 12:02 ignisf

You can do both.

ignisf avatar Feb 13 '18 12:02 ignisf

I have the same problem. But, btw, would asset-precompilation on ubuntu, and copying to the main image (that uses alpine) work?

vraravam avatar Feb 21 '18 14:02 vraravam

I have the same problem. But, btw, would asset-precompilation on ubuntu, and copying to the main image (that uses alpine) work?

It's worth trying. 👍

sgerrand avatar Feb 22 '18 04:02 sgerrand