ruby icon indicating copy to clipboard operation
ruby copied to clipboard

Latest Build Broken ffi Dependencies

Open JeremyRubin opened this issue 4 years ago • 5 comments

I use the 2.7 alpine ruby image for my GH pages jekyll site and the new releases broke my build.

see https://github.com/JeremyRubin/rubin.io/runs/4370521856?check_suite_focus=true

30
Status: Downloaded newer image for ruby:2.7-alpine
51
LoadError: Error loading shared library libffi.so.7: No such file or directory (needed by /github/workspace/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.3/lib/ffi_c.so) - /github/workspace/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.3/lib/ffi_c.so
52
  /github/workspace/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.3/lib/ffi.rb:5:in `require'
53
  /github/workspace/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.3/lib/ffi.rb:5:in `rescue in <top (required)>'
54
  /github/workspace/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.3/lib/ffi.rb:2:in `<top (required)>'
55
  /github/workspace/vendor/bundle/ruby/2.7.0/gems/sassc-2.4.0/lib/sassc/native.rb:3:in `require'
56
  /github/workspace/vendor/bundle/ruby/2.7.0/gems/sassc-2.4.0/lib/sassc/native.rb:3:in `<top (required)>'
57
  /github/workspace/vendor/bundle/ruby/2.7.0/gems/sassc-2.4.0/lib/sassc.rb:31:in `require_relative'
58
  /github/workspace/vendor/bundle/ruby/2.7.0/gems/sassc-2.4.0/lib/sassc.rb:31:in `<top (required)>'
59
  /github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-sass-converter-2.1.0/lib/jekyll/converters/scss.rb:3:in `require'
60
  /github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-sass-converter-2.1.0/lib/jekyll/converters/scss.rb:3:in `<top (required)>'
61
  /github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-sass-converter-2.1.0/lib/jekyll-sass-converter.rb:4:in `require'
62
  /github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-sass-converter-2.1.0/lib/jekyll-sass-converter.rb:4:in `<top (required)>'
63
  /github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-4.2.0/lib/jekyll.rb:195:in `require'
64
  /github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-4.2.0/lib/jekyll.rb:195:in `<top (required)>'
65
  /github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-4.2.0/exe/jekyll:8:in `require'
66
  /github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-4.2.0/exe/jekyll:8:in `<top (required)>'
67
  /github/workspace/vendor/bundle/ruby/2.7.0/bin/jekyll:23:in `load'
68
  /github/workspace/vendor/bundle/ruby/2.7.0/bin/jekyll:23:in `<top (required)>'

i was able to fix by donwgrading to 3.14 + one other fix.

JeremyRubin avatar Dec 01 '21 00:12 JeremyRubin

Sounds like you've probably got some precompiled gems in your cache that need to be rebuilt for Alpine 3.15.

tianon avatar Dec 01 '21 00:12 tianon

interesting, i would have thought those would have cleared but maybe github caching doesn't reset in the image change...

i won't investigate much further since "it works" for me now; can close

JeremyRubin avatar Dec 01 '21 03:12 JeremyRubin

Probably I've met the problem as well

I have written the "hotfix" solution https://github.com/ffi/ffi/issues/881#issuecomment-987996289

@JeremyRubin why did you close the issue if it still exists?

Mayurifag avatar Dec 07 '21 16:12 Mayurifag

@tianon claimed the issue was a gem cache, and I fixed it for myself by just downgrading to a specific build. I didn't need / won't spend more time on it since it's a not super critical infra for me (just a custom gh-pages). I've reopened the issue for you.

JeremyRubin avatar Dec 07 '21 16:12 JeremyRubin

Is this still replicatable/relevant? (Unfortunately, the logs for that CI run are now gone so it's a little hard to dig into what the Dockerfile that reproduces was. :see_no_evil:)

tianon avatar Jun 13 '22 17:06 tianon