briansmith/ring

ring does not cross-compile to aarch64-unknown-linux-ohos

chinaspx opened this issue · 2 comments

ld.lld: error: /data//../../../../../xxx/target/aarch64-unknown-linux-ohos/release/xxx.a(fad98b632b8ce3cc-curve25519.o) is incompatible with aarch64linux
ld.lld: error: /data/
/../../../../../xxx/target/aarch64-unknown-linux-ohos/release/xxx.a(ca4b6ef5433f5aeb-aes_nohw.o) is incompatible with aarch64linux
ld.lld: error: /data//../../../../../xxx/target/aarch64-unknown-linux-ohos/release/xxx.a(ca8bd8684bb569fa-montgomery.o) is incompatible with aarch64linux
ld.lld: error: /data/
/../../../../../xxx/target/aarch64-unknown-linux-ohos/release/xxx.a(ca8bd8684bb569fa-montgomery_inv.o) is incompatible with aarch64linux
ld.lld: error: /data//../../../../../xxx/target/aarch64-unknown-linux-ohos/release/xxx.a(a9af75d892b04b75-ecp_nistz.o) is incompatible with aarch64linux
ld.lld: error: /data/
/../../../../../xxx/target/aarch64-unknown-linux-ohos/release/xxx.a(a9af75d892b04b75-gfp_p256.o) is incompatible with aarch64linux
ld.lld: error: /data//../../../../../xxx/target/aarch64-unknown-linux-ohos/release/xxx.a(a9af75d892b04b75-gfp_p384.o) is incompatible with aarch64linux
ld.lld: error: /data/
/../../../../../xxx/target/aarch64-unknown-linux-ohos/release/xxx.a(a9af75d892b04b75-p256.o) is incompatible with aarch64linux
ld.lld: error: /data//../../../../../xxx/target/aarch64-unknown-linux-ohos/release/xxx.a(a1949f2101df4b9c-limbs.o) is incompatible with aarch64linux
ld.lld: error: /data/
/../../../../../xxx/target/aarch64-unknown-linux-ohos/release/xxx.a(7effb53edfc7fa2d-mem.o) is incompatible with aarch64linux
ld.lld: error: /data//../../../../../xxx/target/aarch64-unknown-linux-ohos/release/xxx.a(bec76f70393ddef1-poly1305.o) is incompatible with aarch64linux
ld.lld: error: /data/
/../../../../../xxx/target/aarch64-unknown-linux-ohos/release/xxx.a(7effb53edfc7fa2d-crypto.o) is incompatible with aarch64linux
ld.lld: error: /data//../../../../../xxx/target/aarch64-unknown-linux-ohos/release/xxx.a(a9af75d892b04b75-p256-nistz.o) is incompatible with aarch64linux
ld.lld: error: /data/
/../../../../../xxx/target/aarch64-unknown-linux-ohos/release/xxx.a(ef8db3ebb4042406-aesv8-armx-linux64.o) is incompatible with aarch64linux
ld.lld: error: /data//../../../../../xxx/target/aarch64-unknown-linux-ohos/release/xxx.a(ef8db3ebb4042406-ghashv8-armx-linux64.o) is incompatible with aarch64linux
ld.lld: error: /data/
/../../../../../xxx/target/aarch64-unknown-linux-ohos/release/xxx.a(ef8db3ebb4042406-chacha-armv8-linux64.o) is incompatible with aarch64linux
ld.lld: error: /data//../../../../../xxx/target/aarch64-unknown-linux-ohos/release/xxx.a(ef8db3ebb4042406-chacha20_poly1305_armv8-linux64.o) is incompatible with aarch64linux
ld.lld: error: /data/
/../../../../../xxx/target/aarch64-unknown-linux-ohos/release/xxx.a(ef8db3ebb4042406-vpaes-armv8-linux64.o) is incompatible with aarch64linux
ld.lld: error: /data//../../../../../xxx/target/aarch64-unknown-linux-ohos/release/xxx.a(ef8db3ebb4042406-armv8-mont-linux64.o) is incompatible with aarch64linux
ld.lld: error: /data/
/../../../../../xxx/target/aarch64-unknown-linux-ohos/release/xxx.a(ef8db3ebb4042406-p256-armv8-asm-linux64.o) is incompatible with aarch64linux
ld.lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

Please provide the full steps to reproduce, including what you set TARGET_CC and TARGET_AR to, and especially what linker you are using, and what cargo command you are executing.

TARGET_AR = "/root/.harmony/sdk-linux-4.1.3.700-SP2/sdk/HarmonyOS-NEXT-DP2/base/native/llvm/bin/llvm-ar"
TARGET_CC = /root/.harmony/sdk-linux-4.1.3.700-SP2/sdk/HarmonyOS-NEXT-DP2/base/native/llvm/bin/clang

linker = ".harmony/sdk-linux-4.1.3.700-SP2/sdk/HarmonyOS-NEXT-DP2/aarch64-unknown-linux-ohos-clang.sh"

touch aarch64-unknown-linux-ohos-clang.sh

`#!/bin/sh
Cur_Path = /root/.harmony/sdk-linux-4.1.3.700-SP2/sdk/HarmonyOS-NEXT-DP2

exec $Cur_Path/base/native/llvm/bin/clang
-target aarch64-linux-ohos
--sysroot=$Cur_Path/base/native/sysroot
-D__MUSL__
"$@"
`

Cargo.toml
reqwest = { version = "0.12", features = ["multipart", "stream", "blocking", "__rustls"] }