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 does not cross-compile to aarch64-unknown-linux-ohos #2122

Open
chinaspx opened this issue Jun 24, 2024 · 2 comments
Open

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

chinaspx opened this issue Jun 24, 2024 · 2 comments

Comments

@chinaspx
Copy link

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)

@briansmith
Copy link
Owner

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.

@chinaspx
Copy link
Author

chinaspx commented Jun 27, 2024

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"] }

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

2 participants