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

github actions ubuntu 24 can't build aws-lc #474

Closed
daywalker90 opened this issue Jul 31, 2024 · 7 comments
Closed

github actions ubuntu 24 can't build aws-lc #474

daywalker90 opened this issue Jul 31, 2024 · 7 comments
Assignees

Comments

@daywalker90
Copy link

Problem:

github actions with ubuntu 24.04 trying to build aws-lc-sys v0.20.1 fails

Relevant details

AWS-LC for Rust versions or commit: (6b1bce0...)

[[package]]
name = "aws-lc-rs"
version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ae74d9bd0a7530e8afd1770739ad34b36838829d6ad61818f9230f683f5ad77"
dependencies = [
 "aws-lc-sys",
 "mirai-annotations",
 "paste",
 "zeroize",
]

[[package]]
name = "aws-lc-sys"
version = "0.20.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f0e249228c6ad2d240c2dc94b714d711629d52bad946075d8e9b2f5391f0703"
dependencies = [
 "bindgen",
 "cc",
 "cmake",
 "dunce",
 "fs_extra",
 "libc",
 "paste",
]

System information: for linux, below info can be collected by running uname -srvmp

  • official github's ubuntu-24.04 image with current rust stable

Build log:

  • The log tells compiler and version.
error: failed to run custom build command for `aws-lc-sys v0.20.1`

Caused by:
  process didn't exit successfully: `/target/optimized/build/aws-lc-sys-63b1b5d13166e747/build-script-main` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=AWS_LC_SYS_NO_PREFIX
  cargo:rerun-if-env-changed=AWS_LC_SYS_INTERNAL_BINDGEN
  cargo:rerun-if-env-changed=AWS_LC_SYS_EXTERNAL_BINDGEN
  cargo:rerun-if-env-changed=AWS_LC_SYS_NO_ASM
  cargo:rustc-cfg=x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=AWS_LC_SYS_CMAKE_BUILDER
  cargo:rerun-if-env-changed=AWS_LC_SYS_STATIC
  default_for Target: 'x86_64-unknown-linux-gnu'
  cargo:rerun-if-env-changed=CARGO_FEATURE_SSL
  default_for Target: 'x86_64-unknown-linux-gnu'
  cargo:rerun-if-env-changed=CARGO_FEATURE_SSL
  cargo:root=/target/x86_64-unknown-linux-gnu/optimized/build/aws-lc-sys-77b830ae1e41e2b4/out
  default_for Target: 'x86_64-unknown-linux-gnu'
  OPT_LEVEL = Some(3)
  TARGET = Some(x86_64-unknown-linux-gnu)
  OUT_DIR = Some(/target/x86_64-unknown-linux-gnu/optimized/build/aws-lc-sys-77b830ae1e41e2b4/out)
  HOST = Some(x86_64-unknown-linux-gnu)
  cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-gnu
  CC_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_gnu
  CC_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CC
  HOST_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  RUSTC_WRAPPER = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some(false)
  CARGO_CFG_TARGET_FEATURE = Some(fxsr,sse,sse2)
  cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
  CFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
  CFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None

  --- stderr
  thread 'main' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba[150](https://github.com/daywalker90/clnrest-rs/actions/runs/10180452926/job/28158349276#step:5:151)01f/aws-lc-sys-0.20.1/builder/cc_builder.rs:244:13:
  Your compiler (cc) is not supported due to a memcmp related bug reported in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95189.We strongly recommend against using this compiler.EXECUTED: true ERROR:  OUTPUT:  
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
Error: Process completed with exit code 101.
@justsmth
Copy link
Contributor

justsmth commented Aug 1, 2024

Your compiler (cc) is not supported due to a memcmp related bug reported in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95189.We strongly recommend against using this compiler.

It appears our build script detected that your compiler is affected by this bug. You can see the build logic for detecting that bug here. The program we compiler/run to detect this bug is memcmp_invalid_stripped_check.c.

Do you know which compiler is being used for this build? (I don't see it listed in the output.)

@justsmth justsmth self-assigned this Aug 1, 2024
@daywalker90
Copy link
Author

These are installed on the image:

gcc --version
gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0
clang --version
Ubuntu clang version 18.1.3 (1ubuntu1)

CC and CXX are not set so i think ubuntu defaults to gcc

also for reference:
https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md

@justsmth
Copy link
Contributor

justsmth commented Aug 1, 2024

Rust's cc crate appears to use the cc command. What compiler version does running cc indicate? (It's typically the same compiler as "gcc".)

@justsmth
Copy link
Contributor

justsmth commented Aug 1, 2024

Another step that might help us diagnose the issue would be to set AWS_LC_SYS_CMAKE_BUILDER=1 in your build environment to force the build to use CMake. I'm curious whether it will report the same compiler bug.

@daywalker90
Copy link
Author

cc --version
cc (Ubuntu 13.2.0-23ubuntu4) 13.2.0

seems to be gcc

@justsmth
Copy link
Contributor

justsmth commented Aug 1, 2024

Are you also having build failures when setting AWS_LC_SYS_CMAKE_BUILDER=1?

@daywalker90
Copy link
Author

I can't reproduce it even without setting that atm. Something else must have updated and fixed it or something

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants