EmbarkStudios / cargo-deny

❌ Cargo plugin for linting your dependencies 🦀
http://embark.rs
Apache License 2.0
1.62k stars 80 forks source link

Add support for publishing aarch64-unknown-linux-musl binaries #659

Closed the-wondersmith closed 2 months ago

the-wondersmith commented 2 months ago

This adds publishing of (cross-compiled) aarch64-unknown-linux-musl binaries for cargo-deny releases.

the-wondersmith commented 2 months ago

@Jake-Shadle shameless self-bump 😅

Jake-Shadle commented 2 months ago
 The following warnings were emitted during compilation:
warning: ring@0.17.8: Compiler family detection failed due to error: ToolNotFound: Failed to find tool. Is `aarch64-linux-musl-gcc` installed?
warning: ring@0.17.8: Compiler family detection failed due to error: ToolNotFound: Failed to find tool. Is `aarch64-linux-musl-gcc` installed?
warning: ring@0.17.8: Compiler family detection failed due to error: ToolNotFound: Failed to find tool. Is `aarch64-linux-musl-gcc` installed?
error: failed to run custom build command for `ring v0.17.8`
Caused by:
  process didn't exit successfully: `/home/runner/work/cargo-deny/cargo-deny/target/release/build/ring-d671b3c45f666ae8/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-env-changed=RING_PREGENERATE_ASM
  cargo:rustc-env=RING_CORE_PREFIX=ring_core_0_17_8_
  OPT_LEVEL = Some("3")
  TARGET = Some("aarch64-unknown-linux-musl")
  HOST = Some("x86_64-unknown-linux-gnu")
  cargo:rerun-if-env-changed=CC_aarch64-unknown-linux-musl
  CC_aarch64-unknown-linux-musl = None
  cargo:rerun-if-env-changed=CC_aarch64_unknown_linux_musl
  CC_aarch64_unknown_linux_musl = None
  cargo:rerun-if-env-changed=TARGET_CC
  TARGET_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  RUSTC_LINKER = None
  cargo:rerun-if-env-changed=CROSS_COMPILE
  CROSS_COMPILE = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:warning=Compiler family detection failed due to error: ToolNotFound: Failed to find tool. Is `aarch64-linux-musl-gcc` installed?
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  CARGO_CFG_TARGET_FEATURE = Some("crt-static,neon")
  cargo:rerun-if-env-changed=CFLAGS_aarch64-unknown-linux-musl
  CFLAGS_aarch64-unknown-linux-musl = None
  cargo:rerun-if-env-changed=CFLAGS_aarch64_unknown_linux_musl
  CFLAGS_aarch64_unknown_linux_musl = None
  cargo:rerun-if-env-changed=TARGET_CFLAGS
  TARGET_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:warning=Compiler family detection failed due to error: ToolNotFound: Failed to find tool. Is `aarch64-linux-musl-gcc` installed?
  cargo:warning=Compiler family detection failed due to error: ToolNotFound: Failed to find tool. Is `aarch64-linux-musl-gcc` installed?
  --- stderr
  error occurred: Failed to find tool. Is `aarch64-linux-musl-gcc` installed?
warning: build failed, waiting for other jobs to finish...
Error: Process completed with exit code 101.

This doesn't work, when you have it working reopen from draft.

the-wondersmith commented 2 months ago

@Jake-Shadle sorry about that, should have been more thorough in my local testing 😅. Had to add a conditional step to ensure the correct musl-cross tools are present for aarch64-unknown-linux-musl targets, but it should be good for another look now.