Skip to content
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

Native libs compiled against 2.29 instead of 2.24 glibc. #354

Closed
mefellows opened this issue Jan 9, 2024 · 10 comments · Fixed by #368
Closed

Native libs compiled against 2.29 instead of 2.24 glibc. #354

mefellows opened this issue Jan 9, 2024 · 10 comments · Fixed by #368
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@mefellows
Copy link
Member

As per #202, the native library should be compiled against a glibc version 2.24. However, as discovered in pact-foundation/pact-js-core#472 it appears to be 2.29, which makes it incompatible with a lot of common base images.

@mefellows mefellows added the bug Indicates an unexpected problem or unintended behavior label Jan 9, 2024
@rholshausen
Copy link
Contributor

This is not all native libs, just maybe the the ARM 64 ones. I checked the x86_64 one and it is correct.

@mefellows
Copy link
Member Author

ah! Strange, they are created from the same script on the same image if I'm not mistaken.

@rholshausen
Copy link
Contributor

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.

@rholshausen
Copy link
Contributor

@mefellows
Copy link
Member Author

Ah, I see.

@YOU54F
Copy link
Member

YOU54F commented Jan 22, 2024

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

cross-rs/cross@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

cross-rs/cross#1237 (comment)

@mefellows
Copy link
Member Author

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.

@YOU54F
Copy link
Member

YOU54F commented Jan 22, 2024

@mefellows
Copy link
Member Author

Ah!

@YOU54F
Copy link
Member

YOU54F commented Jan 24, 2024

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:/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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants