Open
Description
When I use this to compile a project with Docker for alpine linux (using ruby:3.3.6-alpine
)
- I can compile everything as documented
- When I start any ruby command which loads the library I get a
[BUG] Segmentation fault at 0x0000000000000001
- When I run
ldd
on the native library I get a lot ofError relocating ..: rb_big_idiv: symbol not found
- on other linux platforms (i.e. Ubuntu) there is no such problem
Here are the relevant logs:
/app # bundle exec puma
Puma starting in single mode...
* Puma version: 6.5.0 ("Sky's Version")
* Ruby version: ruby 3.3.6 (2024-11-05 revision 75015d4c1f) [x86_64-linux-musl]
* Min threads: 0
* Max threads: 5
* Environment: development
* PID: 26
/usr/local/bundle/gems/foxify-0.9.1/lib/foxify/foxify.so: [BUG] Segmentation fault at 0x0000000000000001
ruby 3.3.6 (2024-11-05 revision 75015d4c1f) [x86_64-linux-musl]
-- Control frame information -----------------------------------------------
c:0039 p:---- s:0217 e:000216 TOP [FINISH]
c:0038 p:---- s:0214 e:000213 CFUNC :require_relative
c:0037 p:0011 s:0209 e:000208 TOP /usr/local/bundle/gems/foxify-0.9.1/lib/foxify.rb:4 [FINISH]
c:0036 p:---- s:0206 e:000205 CFUNC :require
c:0035 p:0052 s:0201 e:000200 BLOCK /usr/local/lib/ruby/3.3.0/bundled_gems.rb:69
c:0034 p:0005 s:0195 e:000194 TOP /app/lib/digest_provider.rb:8 [FINISH]
c:0033 p:---- s:0192 e:000191 CFUNC :require_relative
c:0032 p:0017 s:0187 e:000186 TOP /app/lib/full_checksum_storage.rb:10 [FINISH]
c:0031 p:---- s:0184 e:000183 CFUNC :require_relative
c:0030 p:0023 s:0179 E:000e00 EVAL config.ru:8 [FINISH]
c:0029 p:---- s:0172 e:000171 CFUNC :eval
c:0028 p:0028 s:0165 e:000164 METHOD /usr/local/bundle/gems/rack-3.1.8/lib/rack/builder.rb:108
c:0027 p:0074 s:0156 e:000155 METHOD /usr/local/bundle/gems/rack-3.1.8/lib/rack/builder.rb:97
c:0026 p:0015 s:0149 e:000148 METHOD /usr/local/bundle/gems/rack-3.1.8/lib/rack/builder.rb:67
c:0025 p:0034 s:0143 e:000142 METHOD /usr/local/bundle/gems/puma-6.5.0/lib/puma/configuration.rb:384
c:0024 p:0014 s:0136 e:000135 METHOD /usr/local/bundle/gems/puma-6.5.0/lib/puma/configuration.rb:297
c:0023 p:0023 s:0130 e:000129 METHOD /usr/local/bundle/gems/puma-6.5.0/lib/puma/runner.rb:166
c:0022 p:0009 s:0125 e:000124 METHOD /usr/local/bundle/gems/puma-6.5.0/lib/puma/single.rb:44
c:0021 p:0033 s:0119 e:000118 METHOD /usr/local/bundle/gems/puma-6.5.0/lib/puma/launcher.rb:196
...
as well as this
/app # ldd /usr/local/bundle/gems/foxify-0.9.1/lib/foxify/foxify.so
/lib/ld-musl-x86_64.so.1 (0x7ffffff5a000)
libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7ffffff5a000)
Error relocating /usr/local/bundle/gems/foxify-0.9.1/lib/foxify/foxify.so: rb_str_export_locale: symbol not found
Error relocating /usr/local/bundle/gems/foxify-0.9.1/lib/foxify/foxify.so: rb_ary_freeze: symbol not found
Error relocating /usr/local/bundle/gems/foxify-0.9.1/lib/foxify/foxify.so: rb_funcallv: symbol not found
Error relocating /usr/local/bundle/gems/foxify-0.9.1/lib/foxify/foxify.so: rb_backtrace: symbol not found
Error relocating /usr/local/bundle/gems/foxify-0.9.1/lib/foxify/foxify.so: rb_last_status_set: symbol not found
Error relocating /usr/local/bundle/gems/foxify-0.9.1/lib/foxify/foxify.so: rb_const_defined_at: symbol not found
Error relocating /usr/local/bundle/gems/foxify-0.9.1/lib/foxify/foxify.so: rb_exc_raise: symbol not found
Error relocating /usr/local/bundle/gems/foxify-0.9.1/lib/foxify/foxify.so: rb_check_array_type: symbol not found
...