-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[email protected]: Failed to load native module in Linux-x64 platform (redhat ubi8 minimal) #502
[email protected]: Failed to load native module in Linux-x64 platform (redhat ubi8 minimal) #502
Comments
the ffi is being built against ubuntu 20.04 for x86_64 which will link against glibc 2.31. rhel8 is 2.28 we will need to build with cross 0.2.5 for the x86_64 builds, as we are doing for aarch64 change will need making in the rust_ffi release.sh |
Thanks for quick response @YOU54F . Here is the draft PR. Not sure if this covers everything. I tested locally with a bit of hack using
|
0.2.5 of cross only has amd64 images so you’ll need to set docker default platform env var to linux/amd64
main has arm64 images but will link to a later glibc version
|
Looks like using cross 0.2.5 (glibc 2.23) for x86_64 breaks serde which comes with its own precompiled binaries (it uses glibc 2.25).
|
cross seems to pick up dependencies built for other targets, when building, so the resolution I've found is rather destructive, but to perform a all green here pact-foundation/pact-reference#413 💚 ty for the pr and digging in, appreciate it |
Excellent! Thanks @YOU54F. Looking forward to a new release. |
Leaving this open until we release the FFI changes in ^^. Thanks for all of your help everyone! |
Latest release is now out https://github.com/pact-foundation/pact-js-core/releases/tag/v14.3.6 Lets test
Output [root@7a1632f1316f app]# npm test
> [email protected] test
> jest --testTimeout 30000
PASS src/product/product.repository.test.js
[12:52:17.557] INFO (165): 0.4.20: pact native library successfully found, and the correct version
[12:52:17.620] INFO (165): [email protected]: Verifying message
2024-05-09T12:52:17.652716Z WARN ThreadId(01) pact_models::pact: Note: Existing pact is an older specification version (V3), and will be upgraded
PASS src/product/product.handler.pact.test.js
● Console
console.log
received product: {
event: 'UPDATED',
id: 'some-uuid-1234-5678',
name: 'Some Product',
type: 'Product Range',
version: 'v1'
}
at log (src/product/product.handler.js:5:11)
Test Suites: 2 passed, 2 total
Tests: 2 passed, 2 total
Snapshots: 0 total
Time: 3.249 s |
Thank you, the new version works fine. |
Software versions
cat /etc/os-release
:NAME="Red Hat Enterprise Linux"
VERSION="8.9 (Ootpa)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="8.9"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Red Hat Enterprise Linux 8.9 (Ootpa)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:8::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_BUGZILLA_PRODUCT_VERSION=8.9
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.9"
Issue Checklist
Please confirm the following:
Expected behaviour
Pact tests should run successfully.
Actual behaviour
Pact tests fail with error
Failed to load native module
. The problem is similar to #472, but this one is for linux-x64 (redhat ubi8 minimal).Steps to reproduce
Repo: https://github.com/praveen-em/pact-consumer-js.git (this example is based on the one used in pact js workshop)
This problem occurred initially while trying to run pact tests on Jenkins agents (pods) running on ocp (Openshift Container Platform). Those pods use redhat ubi8 minimal base image. See steps below to recreate the problem locally.
git clone https://github.com/praveen-em/pact-consumer-js.git
docker buildx build --platform linux/amd64 -t pactdemo:amd .
--> This will create imagepactdemo:amd
docker run --platform linux/amd64 pactdemo:amd
--> using the image created in the previous stepRelevant log files
The text was updated successfully, but these errors were encountered: