Closed mefellows closed 5 months ago
This is not all native libs, just maybe the the ARM 64 ones. I checked the x86_64 one and it is correct.
No, they are not. The ARM targets use cross to cross-compile the lib on an Intel agent. Cross uses it's own docker image to build the lib.
Ah, I see.
We are using the latest build from main for cross, over the released version of 0.2.5 due to errors in the build process
There are quite a few changes, one notes glibc explicitly although for an arm image
https://github.com/cross-rs/cross/compare/v0.2.5...main
There is an issue pointing to spurious glibc versions, depending on ordering of builds, with a suggestion of a cargo clean between building for different targets, and one mentioning that the x86_64 is building with too new a version of glibc
This might be relevant too, which shows that main branch vs 0.2.5 has additional changes included which update the docker images, but there is also a suggestion that we can control the glibc version used in the build process
https://github.com/cross-rs/cross/issues/1237#issuecomment-1485835717
Thanks for that cookie trail. Seems like a cargo clean
would work, albeit that might significantly increase build times? I can't see how to specify glibc
, so that might need some further digging.
i think you can specify in the Cross.toml
Ah!
so
There is a centos image, which results in glibc 2.17
only problem we have is ring was recently updated to ring 0.17.x and it fails to build with earlier versions of the image other than the main tag which is using glibc 2.31
Compiling ring v0.17.7
error: failed to run custom build command for `ring v0.17.7`
Caused by:
process didn't exit successfully: `/target/release/build/ring-180a88f8bc6be4be/build-script-build` (exit status: 1)
--- stderr
/target/release/build/ring-180a88f8bc6be4be/build-script-build: /lib64/libc.so.6: version `GLIBC_2.29' not found (required by /target/release/build/ring-180a88f8bc6be4be/build-script-build)
/target/release/build/ring-180a88f8bc6be4be/build-script-build: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by /target/release/build/ring-180a88f8bc6be4be/build-script-build)
/target/release/build/ring-180a88f8bc6be4be/build-script-build: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /target/release/build/ring-180a88f8bc6be4be/build-script-build)
/target/release/build/ring-180a88f8bc6be4be/build-script-build: /lib64/libc.so.6: version `GLIBC_2.27' not found (required by /target/release/build/ring-180a88f8bc6be4be/build-script-build)
/target/release/build/ring-180a88f8bc6be4be/build-script-build: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /target/release/build/ring-180a88f8bc6be4be/build-script-build)
For ref, we can control the images via Cross.toml
[target.aarch64-unknown-linux-gnu]
image="ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main"
published images
https://github.com/cross-rs/cross/pkgs/container/aarch64-unknown-linux-gnu
edit: looks like the glibc failures for ring are due to hanging around cache, sorted with a cargo clean
As per #202, the native library should be compiled against a glibc version 2.24. However, as discovered in https://github.com/pact-foundation/pact-js-core/issues/472 it appears to be 2.29, which makes it incompatible with a lot of common base images.