Skip to content

aws-lc-sys v0.37.0 fails to build for musl mipsel with fatal error: linux/random.h: No such file or directory #894 #1024

@arontsang

Description

@arontsang

Problem:

build a project depending on aws-lc-sys v0.32.0 for musl targets, e.g. cargo +nightly build --target=mipsel-unknown-linux-musl --release -Zbuild-std=panic_abort,core,std fails with:

cargo:warning=Compilation of 'linux_random_h.c' failed - Err(Error { kind: ToolExecError, message: "command did not execute successfully (status code exit status: 1): LC_ALL=\"C\" \"/home/aron/.cache/cargo-zigbuild/0.20.1/zigcc-mipsel-unknown-linux-musl-fb3a.sh\" \"-Oz\" \"-ffunction-sections\" \"-fdata-sections\" \"-fPIC\" \"--target=mipsel-unknown-linux-musl\" \"-Werror\" \"-Wall\" \"-Wextra\" \"-DDEFINE_U32\" \"-Wno-unused-parameter\" \"-o\" \"/home/foobar/rust-projects/quic-dns/target/mipsel-unknown-linux-musl/release/build/aws-lc-sys-3a36cd19b26f515e/out/out-linux_random_h/7dfda64fdf5a526c-linux_random_h.o\" \"-c\" \"/home/foobar/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aws-lc-sys-0.37.0/aws-lc/tests/compiler_features_tests/linux_random_h.c\"" }).

Relevant details

AWS-LC for Rust versions or commit: 0.37

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

  • CPU architecture: x86_64 (cross compile to mipsel)
  • CPU name: unknown (actually AMD Ryzen 3600)
  • OS: Linux 6.6.87.2-microsoft-standard-WSL2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions