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

Binary used by action seems broken on Ubuntu 22.04 #1153

Open
HadrienG2 opened this issue Feb 24, 2025 · 3 comments
Open

Binary used by action seems broken on Ubuntu 22.04 #1153

HadrienG2 opened this issue Feb 24, 2025 · 3 comments
Labels
C-bug Category: doesn't meet expectations E-help-wanted Call for participation: Help is requested to fix this issue.

Comments

@HadrienG2
Copy link
Contributor

HadrienG2 commented Feb 24, 2025

EDIT: Updated the issue text with new info from further investigation

cargo-semver-checks-action recently started failing on one of my projects that, at the time, used CI runners pinned to Ubuntu 22.04. I usually dislike pinning runner OS versions as it's one more version number that I need to remember bumping regularly, but here I had to due to hardcoded version numbers in Ubuntu's LLVM package names.

The error messages suggested that this error was due to the internally downloaded binary being built against a glibc version newer than what Ubuntu 22.04 uses, which does not work because glibc only guarantees backwards compatibility not forward compatibility.

Run obi1kenobi/cargo-semver-checks-action@v2
  with:
    package: starpu-sys
    feature-group: default-features
    features: opencl
    rust-toolchain: manual
    verbose: false
    github-token: ***
  env:
    LLVM_VERSION: 15
    CLANG_PATH: /usr/bin/clang-15
    LIBCLANG_PATH: /usr/lib/llvm-15/lib
    CARGO_INCREMENTAL: 0
    MINIMAL_RUST: 1.78.0
    RUSTFLAGS: -D warnings
    RUSTDOCFLAGS: -D warnings
    RUST_LOG: warn
    FEATURES: opencl
    JOB_FLAGS: --workspace --features=opencl
    CARGO_PROFILE_DEV_DEBUG: 0
    CARGO_TERM_COLOR: always
    RUST_BACKTRACE: short
    CARGO_UNSTABLE_SPARSE_REGISTRY: true
    CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
    CACHE_ON_FAILURE: true
cargo-semver-checks is not installed, installing now...
downloading cargo-semver-checks from https://api.github.com/repos/obi1kenobi/cargo-semver-checks/releases/assets/224318100
extracting /home/runner/work/_temp/ffab875c-863d-4752-8cca-c6e47a22445f
/usr/bin/tar xz --warning=no-unknown-keyword --overwrite -C /home/runner/work/_temp/dfae1db1-f5bc-4ab7-adc7-400b9d72d5f7 -f /home/runner/work/_temp/ffab875c-863d-4752-8cca-c6e47a22445f
Restoring rustdoc cache...
Rustdoc cache path: /home/runner/work/starpu-rs/starpu-rs/semver-checks/target/semver-checks/cache.
/home/runner/.cargo/bin/rustc --version
rustc 1.85.0 (4d91de4e4 2025-02-17)
/home/runner/.cargo/bin/cargo semver-checks --version
/home/runner/work/_temp/dfae1db1-f5bc-4ab7-adc7-400b9d72d5f7/cargo-semver-checks: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.38' not found (required by /home/runner/work/_temp/dfae1db1-f5bc-4ab7-adc7-400b9d72d5f7/cargo-semver-checks)
/home/runner/work/_temp/dfae1db1-f5bc-4ab7-adc7-400b9d72d5f7/cargo-semver-checks: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.39' not found (required by /home/runner/work/_temp/dfae1db1-f5bc-4ab7-adc7-400b9d72d5f7/cargo-semver-checks)

My suspicion is that you bumped the Ubuntu version used in CI to build cargo-semver-checks release binaries to 24.04, either voluntarily or involuntarily as a result of using ubuntu-latest as I usually do myself. If that's correct, you may want to be careful with that in jobs that produce release binaries, given that...

  • Binaries built against glibc version N are not forward compatible with previous glibc versions M < N. This means that you must build your release binaries against the oldest glibc that you expect your users to use.
  • Ubuntu 22.04 will still be supported upstream for several years (free support tier ends in 2027), and it is still quite popular at least where I work given how much of a bugfest the 24.04 release was, so ending support for it on your side may be a bit premature.

See also cargo dist for a cool project that handles these annoying glibc compatibility shenanigans Just Right (tm) in my experience.

@HadrienG2 HadrienG2 changed the title Weird error upon bumping libc dep to v0.2.170 Binary used by action seems broken on Ubuntu 22.04 Feb 24, 2025
@obi1kenobi
Copy link
Owner

Thanks for reporting this!

I definitely did not purposefully drop support for Ubuntu 22.04, but the release process does use ubuntu-latest which is plausibly the source of the issue.

Do you happen to have experience in adopting cargo dist? I'd be happy to use it, but I haven't used it before and I'd love a way to get a head start on it.

I'm also planning a new release in the very near future. As a short-term fix, would dropping from ubuntu-latest to an explicit pin on 22.04 be sufficient to unblock your use case?

@obi1kenobi obi1kenobi added C-bug Category: doesn't meet expectations E-help-wanted Call for participation: Help is requested to fix this issue. labels Feb 24, 2025
@HadrienG2
Copy link
Contributor Author

I have used cargo dist before for my (now-archived) crofiler project. It was pretty smooth-sailing, I just followed the official tutorial, adjusted a few settings from the autogenerated default config, and overall got it to work the way I want quite quickly.

On my side, I worked around this problem by upgrading the repo to Ubuntu 24.04, since it was not terribly hard to do. So I am not personally blocked on the resolution of this particular problem. But I suspect other people will, so trying to pin the release build job to 22.04 for the next bugfix release would likely be wise.

@obi1kenobi obi1kenobi transferred this issue from obi1kenobi/cargo-semver-checks-action Feb 25, 2025
@obi1kenobi
Copy link
Owner

Transferred from cargo-semver-checks-action since the issue is actually with the cargo-semver-checks publish process. The action was suffering the issue just as a symptom.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: doesn't meet expectations E-help-wanted Call for participation: Help is requested to fix this issue.
Projects
None yet
Development

No branches or pull requests

2 participants