alexcrichton / openssl-src-rs

Source code and logic to build OpenSSL from source
Apache License 2.0
68 stars 113 forks source link

Cross building for aarch64 platform #154

Closed Ludea closed 2 years ago

Ludea commented 2 years ago

Hi,

I use a rust framework to create an apk. The build from an x86_64 (Windows) host to target aarch64 host. When building openssl-sys crate, I get C:hostedtoolcachewindowsndkr25bx64toolchains/llvm/prebuilt/windows-x86_64binclang.exe: No such file or directory C:/hostedtoolcache/windows/ndk/r25b/x64/toolchains is from a Windows env var. I use cygwin to install right Perl version (Strawberry is not working). Is openssl-src-rs support cross compilation ?

reproductible issue: https://github.com/Ludea/tauri-mobile logs: https://github.com/Ludea/tauri-mobile/runs/8202565826?check_suite_focus=true#step:13:309

Ludea commented 2 years ago

Setting CC_AARCH64-LINUX-ANDROID=C:/hostedtoolcache/windows/ndk/r25b/x64/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe or TARGET_CC doesn"t resolve issue. Worse, The env var are not seems by openSSL-src-rs :


  CC_aarch64-linux-android = None
  CC_aarch64_linux_android = None
  TARGET_CC = Some("C:/hostedtoolcache/windows/ndk/r25b/x64/toolchains/llvm/prebuilt/windows-x86_64\\bin\\aarch64-linux-android24-clang.cmd")```
Ludea commented 2 years ago

Closing, it's not an issue with openssl-sys or openssl-src-rs