-
Notifications
You must be signed in to change notification settings - Fork 341
Closed
Description
See https://github.com/ffi/ffi/actions/runs/3668712621/jobs/6202029490
Failures:
1) Library ffi_lib interprets INPUT() in loader scripts
Failure/Error: raise LoadError, [*errors, SEARCH_PATH_MESSAGE].join(".\n")
LoadError:
Could not open library '/Users/runner/work/ffi/ffi/spec/ffi/fixtures/ldscript.so': dlopen(/Users/runner/work/ffi/ffi/spec/ffi/fixtures/ldscript.so, 0x0005): tried: '/Users/runner/work/ffi/ffi/spec/ffi/fixtures/ldscript.so' (not a mach-o file).
Searched in <system library path>, /usr/lib, /usr/local/lib, /opt/local/lib
# ./lib/ffi/dynamic_library.rb:65:in `load_library'
# ./lib/ffi/library.rb:103:in `block in ffi_lib'
# ./lib/ffi/library.rb:102:in `map'
# ./lib/ffi/library.rb:102:in `ffi_lib'
# ./spec/ffi/library_spec.rb:99:in `block (4 levels) in <top (required)>'
# ./spec/ffi/library_spec.rb:97:in `initialize'
# ./spec/ffi/library_spec.rb:97:in `new'
# ./spec/ffi/library_spec.rb:97:in `block (3 levels) in <top (required)>'
I'm not sure how to fix it.
- Are loader scripts something supported on macOS or is that a Linux-only or not-macos-windows thing?
- The extension of
ldscript.soshould rather beldscript.dylibon macOS, no? - The regexp to match this is:
if ex.message =~ /(([^ \t()])+\.so([^ \t:()])*):([ \t])*(invalid ELF header|file too short|invalid file format)/(unchanged by https://github.com/ffi/ffi/pull/968/files)
so that makes it sound like only .so support linker scripts?
It's a mystery to me why this spec passed before #968 on macOS, it sounds like it should never have worked on macOS.
I guess there are two main ways to fix it:
- Don't run this test on macOS if linker scripts are not a thing there anyway
- Try adapting the regexp to accept this
not a mach-o fileerror
cc @larskanis
Metadata
Metadata
Assignees
Labels
No labels