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

[Feature Request] - Cross-compilation armv7 artifacts on CI #208

Closed
wxlg1117 opened this issue Jul 16, 2023 · 2 comments
Closed

[Feature Request] - Cross-compilation armv7 artifacts on CI #208

wxlg1117 opened this issue Jul 16, 2023 · 2 comments
Assignees
Labels
new feature New feature or request stale issue closed due to inactivity

Comments

@wxlg1117
Copy link

wxlg1117 commented Jul 16, 2023

Description

Create a workflow to Cross-compilation armv7 artifacts directly on GitHub (manual launch).

i try:
rustup target add armv7-unknown-linux-musleabihf and download
linker from https://musl.cc/armv7l-linux-musleabihf-cross.tgz;

[root@hk2 termscp]# rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /root/.rustup

installed toolchains
--------------------

stable-x86_64-unknown-linux-gnu (default)
stable-x86_64-unknown-linux-musl

installed targets for active toolchain
--------------------------------------

armv7-unknown-linux-gnueabihf
armv7-unknown-linux-musleabihf
x86_64-unknown-linux-gnu
x86_64-unknown-linux-musl

active toolchain
----------------

stable-x86_64-unknown-linux-gnu (default)
rustc 1.71.0 (8ede3aae2 2023-07-12)

[root@hk2 termscp]# armv7l-linux-musleabihf-gcc --version
armv7l-linux-musleabihf-gcc (GCC) 11.2.1 20211120
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

cat .cargo/config:

[build]
target = "armv7-unknown-linux-musleabihf"
[target.armv7-unknown-linux-musleabihf]
linker = "armv7l-linux-musleabihf-gcc"

run

cargo build --target armv7-unknown-linux-musleabihf 

ande get some error:

[root@hk2 termscp]# cargo build --target armv7-unknown-linux-musleabihf
   Compiling libc v0.2.147
   Compiling autocfg v1.1.0
   Compiling proc-macro2 v1.0.63
   Compiling unicode-ident v1.0.10
   Compiling quote v1.0.29
   Compiling cfg-if v1.0.0
   Compiling syn v2.0.23
   Compiling log v0.4.19
   Compiling memchr v2.5.0
   Compiling cc v1.0.79
   Compiling version_check v0.9.4
   Compiling once_cell v1.18.0
   Compiling typenum v1.16.0
   Compiling generic-array v0.14.7
   Compiling pkg-config v0.3.27
   Compiling futures-core v0.3.28
   Compiling syn v1.0.109
   Compiling bitflags v1.3.2
   Compiling pin-project-lite v0.2.10
   Compiling serde v1.0.166
   Compiling serde_derive v1.0.166
   Compiling ring v0.16.20
   Compiling num-traits v0.2.15
error: failed to run custom build command for `ring v0.16.20`

Caused by:
  process didn't exit successfully: `/root/termscp/target/debug/build/ring-880ec8928e48f919/build-script-build` (exit status: 101)
  --- stdout
  OPT_LEVEL = Some("0")
  TARGET = Some("armv7-unknown-linux-musleabihf")
  HOST = Some("x86_64-unknown-linux-gnu")
  cargo:rerun-if-env-changed=CC_armv7-unknown-linux-musleabihf
  CC_armv7-unknown-linux-musleabihf = None
  cargo:rerun-if-env-changed=CC_armv7_unknown_linux_musleabihf
  CC_armv7_unknown_linux_musleabihf = None
  cargo:rerun-if-env-changed=TARGET_CC
  TARGET_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  RUSTC_LINKER = Some("armv7l-linux-musleabihf-gcc")
  cargo:rerun-if-env-changed=CROSS_COMPILE
  CROSS_COMPILE = None
  cargo:rerun-if-env-changed=CFLAGS_armv7-unknown-linux-musleabihf
  CFLAGS_armv7-unknown-linux-musleabihf = None
  cargo:rerun-if-env-changed=CFLAGS_armv7_unknown_linux_musleabihf
  CFLAGS_armv7_unknown_linux_musleabihf = None
  cargo:rerun-if-env-changed=TARGET_CFLAGS
  TARGET_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("true")
  CARGO_CFG_TARGET_FEATURE = None

  --- stderr
  running "arm-linux-musleabihf-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-march=armv7-a" "-mfpu=vfpv3-d16" "-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/root/termscp/target/armv7-unknown-linux-musleabihf/debug/build/ring-ecd836c5dd6484ee/out/aesv8-armx-linux32.o" "/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ring-0.16.20/pregenerated/aesv8-armx-linux32.S"
  thread 'main' panicked at 'failed to execute ["arm-linux-musleabihf-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-march=armv7-a" "-mfpu=vfpv3-d16" "-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/root/termscp/target/armv7-unknown-linux-musleabihf/debug/build/ring-ecd836c5dd6484ee/out/aesv8-armx-linux32.o" "/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ring-0.16.20/pregenerated/aesv8-armx-linux32.S"]: No such file or directory (os error 2)', /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ring-0.16.20/build.rs:653:9
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@wxlg1117 wxlg1117 added the new feature New feature or request label Jul 16, 2023
@github-actions
Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale issue closed due to inactivity label Aug 16, 2023
@veeso
Copy link
Owner

veeso commented Aug 18, 2023

It won't work because of C libs required to build termscp.
There is a dockerfile to build

@veeso veeso closed this as completed Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request stale issue closed due to inactivity
Projects
None yet
Development

No branches or pull requests

2 participants