Open YOU54F opened 1 month ago
Nice! We should update here also: https://docs.pact.io/docker
So we have an issue with the pact_ffi shared library, for aarch64-musl .so
in 0.4.20
.so
file)Error
LoadError:
Could not open library '/app/lib/pact/../../ffi/linux-arm64-musl/libpact_ffi.so': Error relocating /app/lib/pact/../../ffi/linux-arm64-musl/libpact_ffi.so: __builtin_copysignq: symbol not found.
Searched in <system library path>, /usr/lib, /usr/local/lib, /opt/local/lib
# /usr/local/bundle/gems/ffi-1.16.3/lib/ffi/dynamic_library.rb:65:in `load_library'
Seems to be exclusive to aarch64, and the dynamic library only. amd64 tests are passing in pact-php as well using the shared library, and the static .a is being used and tested successfully in pact-js-core in this PR
First reported by @tienvx over in pact-php alpine PR - Thanks Tien!
So I've just built the aarch64 musl libs locally on my macbook,
Copied these over to pact-php
cp ../release_artifacts/libpact_ffi-linux-aarch64-musl.so ~/dev/pact-foundation/pact-php/bin/pact-ffi-lib/pact.so
Green php tests.
note have tried regenerating the .so
from the released 0.4.20 .a
but get the same missing symbol issue, so not sure what has caused it
I think this was due to stripping of the symbols from the static archive, prior to generating the shared object file. It's possible to force the generation of the *.so at compile time with some rust flags, so that has been performed along with a smoke test to ensure its loading correctly in #432
it would be good to document this on the readme, so users are aware that
*.a
& shared*.so
variants for musl, depending on the consuming client libraries requirements for ffi interopx86_64
.a
from 0.2.4aarch64
.a
from 0.4.15.so
from 0.4.17