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

ring fails to cross-compile to arm-unknown-linux-musleabihf #16

Closed
casept opened this issue Mar 16, 2022 · 1 comment
Closed

ring fails to cross-compile to arm-unknown-linux-musleabihf #16

casept opened this issue Mar 16, 2022 · 1 comment

Comments

@casept
Copy link

casept commented Mar 16, 2022

error: failed to run custom build command for `ring v0.16.20`

Caused by:
  process didn't exit successfully: `/media/psf/Home/spline/splinelogo-server-ng/target/debug/build/ring-495cf840d1f530b9/build-script-build` (exit status: 101)
  --- stdout
  OPT_LEVEL = Some("0")
  TARGET = Some("arm-unknown-linux-musleabihf")
  HOST = Some("aarch64-unknown-linux-gnu")
  CC_arm-unknown-linux-musleabihf = None
  CC_arm_unknown_linux_musleabihf = None
  TARGET_CC = Some("/home/user/.cache/cargo-zigbuild/0.6.6/zigcc-arm-unknown-linux-musleabihf.sh")
  CFLAGS_arm-unknown-linux-musleabihf = None
  CFLAGS_arm_unknown_linux_musleabihf = None
  TARGET_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("true")
  CARGO_CFG_TARGET_FEATURE = None

  --- stderr
  running "/home/user/.cache/cargo-zigbuild/0.6.6/zigcc-arm-unknown-linux-musleabihf.sh" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-march=armv6" "-marm" "-mfpu=vfp" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-U_FORTIFY_SOURCE" "-DNDEBUG" "-c" "-o/media/psf/Home/spline/splinelogo-server-ng/target/arm-unknown-linux-musleabihf/debug/build/ring-4cb7192578057057/out/aesv8-armx-linux32.o" "/home/user/.cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/ring-0.16.20/pregenerated/aesv8-armx-linux32.S"
  info: Available CPUs for architecture 'arm':
   arm1020e
   arm1020t
   arm1022e
   arm10e
   arm10tdmi
   arm1136j_s
   arm1136jf_s
   arm1156t2_s
   arm1156t2f_s
   arm1176jz_s
   arm1176jzf_s
   arm710t
   arm720t
   arm7tdmi
   arm7tdmi_s
   arm8
   arm810
   arm9
   arm920
   arm920t
   arm922t
   arm926ej_s
   arm940t
   arm946e_s
   arm966e_s
   arm968e_s
   arm9e
   arm9tdmi
   baseline
   cortex_a12
   cortex_a15
   cortex_a17
   cortex_a32
   cortex_a35
   cortex_a5
   cortex_a53
   cortex_a55
   cortex_a57
   cortex_a7
   cortex_a72
   cortex_a73
   cortex_a75
   cortex_a76
   cortex_a76ae
   cortex_a77
   cortex_a78
   cortex_a78c
   cortex_a8
   cortex_a9
   cortex_m0
   cortex_m0plus
   cortex_m1
   cortex_m23
   cortex_m3
   cortex_m33
   cortex_m35p
   cortex_m4
   cortex_m55
   cortex_m7
   cortex_r4
   cortex_r4f
   cortex_r5
   cortex_r52
   cortex_r7
   cortex_r8
   cortex_x1
   cyclone
   ep9312
   exynos_m1
   exynos_m2
   exynos_m3
   exynos_m4
   exynos_m5
   generic
   iwmmxt
   krait
   kryo
   mpcore
   mpcorenovfp
   neoverse_n1
   neoverse_n2
   neoverse_v1
   sc000
   sc300
   strongarm
   strongarm110
   strongarm1100
   strongarm1110
   swift
   xscale

  error: Unknown CPU: 'armv6'
  thread 'main' panicked at 'execution failed', /home/user/.cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/ring-0.16.20/build.rs:656:9
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed

This same error also occurs for several other related ARMv6 targets.

Compiling for aarch64-unknown-linux-musl, x86_64-unknown-linux-musl and several other tested targets works fine.

System details:

$ cargo --version
cargo 1.59.0 (49d8809dc 2022-02-10)
$ rustup --version
rustup 1.24.3 (ce5817a94 2021-05-31)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.59.0 (9d1b2106e 2022-02-23)`
$ lsb_release --all 
LSB Version:    :core-4.1-aarch64:core-4.1-noarch
Distributor ID: Fedora
Description:    Fedora release 35 (Thirty Five)
Release:        35
Codename:       ThirtyFive
@casept
Copy link
Author

casept commented Mar 16, 2022

On second look, this is probably caused upstream by ziglang/zig#4911.

@casept casept closed this as completed Mar 16, 2022
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

1 participant