sfackler / rust-openssl

OpenSSL bindings for Rust
1.4k stars 751 forks source link

Cross Compilation on Windows for Android fails #2241

Open ikeen0807 opened 5 months ago

ikeen0807 commented 5 months ago

For some reason I cannot get my project to build openssl-sys. The reason for that are unescaped backslashes in the corresponding Makefile generated in the process. I have no clue on how to fix this. The makefile cannot find the clang.exe inside of the NDK folder, since it includes unescaped backslashes it thinks that the following is the path to my clang.exe:

.../AppData/Local/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/windows-x86_64binclang.exe

I also already spotted the mistake in the Makefile, which is making the build fail:

CROSS_COMPILE= CC=$(CROSS_COMPILE)C:/Users/kema/AppData/Local/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/windows-x86_64\bin\clang.exe CXX=$(CROSS_COMPILE)g++ CPPFLAGS=-DANDROID CFLAGS=-Wall -O3 -fomit-frame-pointer --target=i686-linux-android24 -mstackrealign -O2 -ffunction-sections -fdata-sections -fPIC -gdwarf-2 -fno-omit-frame-pointer -m32 CXXFLAGS=-Wall -O3 --target=i686-linux-android24 -mstackrealign -O2 -ffunction-sections -fdata-sections -fPIC -gdwarf-2 -fno-omit-frame-pointer -m32

As seen above it tries to access the clang.exe via backslashes, which is probably because I am on windows. But I think its expecting unix-like paths.

For further background information in what kind of context this occurs. This is a Tauri 2.0 App and this occurs in the buidling process. Therfore I am using the command "npm run tauri android dev", where I cannot just pass variables into in order to influence the building process for openssl-sys.

I declared the openssl-sys dependency like this: openssl-sys = { version = "0.9.102", features = ["vendored"]}.

This is my configdata.pm dump: Command line (with current working directory = .):

perl ./Configure --prefix=C:/.../.../.../target/i686-linux-android/debug/build/openssl-sys-edd4ed37b7f9bd7b/out/openssl-build/install --openssldir=/usr/local/ssl no-dso no-shared no-ssl3 no-tests no-comp no-zlib no-zlib-dynamic --libdir=lib no-md2 no-rc5 no-weak-ssl-ciphers no-camellia no-idea no-seed no-stdio linux-elf --target=i686-linux-android24 -mstackrealign -O2 -DANDROID -ffunction-sections -fdata-sections -fPIC -gdwarf-2 -fno-omit-frame-pointer -m32

Perl information:

perl
5.38.2 for x86_64-msys-thread-multi

Enabled features:

afalgeng
argon2
aria
asm
async
autoalginit
autoerrinit
autoload-config
bf
blake2
bulk
cached-fetch
cast
chacha
cmac
cmp
cms
ct
default-thread-pool
deprecated
des
dgram
dh
docs
dsa
dtls
ec
ec2m
ecdh
ecdsa
ecx
engine
err
filenames
gost
http
legacy
md4
mdc2
multiblock
nextprotoneg
ocb
ocsp
padlockeng
pic
pinshared
poly1305
posix-io
psk
quic
rc2
rc4
rdrand
rfc3779
rmd160
scrypt
secure-memory
siphash
siv
sm2
sm2-precomp
sm3
sm4
sock
srp
srtp
sse2
ssl
ssl-trace
static-engine
thread-pool
threads
tls
ts
ui-console
whirlpool
tls1
tls1-method
tls1_1
tls1_1-method
tls1_2
tls1_2-method
tls1_3
dtls1
dtls1-method
dtls1_2
dtls1_2-method

Disabled features:

acvp-tests          [cascade]        OPENSSL_NO_ACVP_TESTS
apps                [cascade]        OPENSSL_NO_APPS
asan                [default]        OPENSSL_NO_ASAN
brotli              [default]        OPENSSL_NO_BROTLI
brotli-dynamic      [default]        OPENSSL_NO_BROTLI_DYNAMIC
buildtest-c++       [default]
camellia            [option]         OPENSSL_NO_CAMELLIA (skip crypto/camellia)
capieng             [cascade]        OPENSSL_NO_CAPIENG
winstore            [not-windows]    OPENSSL_NO_WINSTORE
comp                [option]         OPENSSL_NO_COMP (skip crypto/comp)
crypto-mdebug       [default]        OPENSSL_NO_CRYPTO_MDEBUG
devcryptoeng        [default]        OPENSSL_NO_DEVCRYPTOENG
dso                 [option]         OPENSSL_NO_DSO
dynamic-engine      [cascade]
ec_nistp_64_gcc_128 [default]        OPENSSL_NO_EC_NISTP_64_GCC_128
egd                 [default]        OPENSSL_NO_EGD
external-tests      [default]        OPENSSL_NO_EXTERNAL_TESTS
fips                [default]
fips-securitychecks [cascade]        OPENSSL_NO_FIPS_SECURITYCHECKS
fuzz-afl            [default]        OPENSSL_NO_FUZZ_AFL
fuzz-libfuzzer      [default]        OPENSSL_NO_FUZZ_LIBFUZZER
idea                [option]         OPENSSL_NO_IDEA (skip crypto/idea)
ktls                [default]        OPENSSL_NO_KTLS
loadereng           [cascade]        OPENSSL_NO_LOADERENG
makedepend          [unavailable]
md2                 [option]         OPENSSL_NO_MD2 (skip crypto/md2)
module              [cascade]
msan                [default]        OPENSSL_NO_MSAN
rc5                 [option]         OPENSSL_NO_RC5 (skip crypto/rc5)
sctp                [default]        OPENSSL_NO_SCTP
seed                [option]         OPENSSL_NO_SEED (skip crypto/seed)
shared              [option]
stdio               [option]         OPENSSL_NO_STDIO
tests               [option]         OPENSSL_NO_TESTS
tfo                 [default]        OPENSSL_NO_TFO
trace               [default]        OPENSSL_NO_TRACE
ubsan               [default]        OPENSSL_NO_UBSAN
unit-test           [default]        OPENSSL_NO_UNIT_TEST
uplink              [no uplink_arch] OPENSSL_NO_UPLINK
weak-ssl-ciphers    [option]         OPENSSL_NO_WEAK_SSL_CIPHERS
zlib                [option]         OPENSSL_NO_ZLIB
zlib-dynamic        [option]         OPENSSL_NO_ZLIB_DYNAMIC
zstd                [default]        OPENSSL_NO_ZSTD
zstd-dynamic        [default]        OPENSSL_NO_ZSTD_DYNAMIC
ssl3                [option]         OPENSSL_NO_SSL3
ssl3-method         [default]        OPENSSL_NO_SSL3_METHOD

Config target attributes:

AR => "ar",
ARFLAGS => "qc",
CC => "gcc",
CFLAGS => "-Wall -O3 -fomit-frame-pointer",
CXX => "g++",
CXXFLAGS => "-Wall -O3",
HASHBANGPERL => "/usr/bin/env perl",
RANLIB => "ranlib",
RC => "windres",
asm_arch => "x86",
bn_ops => "BN_LLONG",
build_file => "Makefile",
build_scheme => [ "unified", "unix" ],
cflags => "-pthread",
cppflags => "",
cxxflags => "-std=c++11 -pthread",
defines => [ "OPENSSL_BUILDING_OPENSSL" ],
disable => [  ],
dso_ldflags => "-Wl,-z,defs",
dso_scheme => "dlfcn",
enable => [ "afalgeng" ],
ex_libs => "-ldl -pthread",
includes => [  ],
lflags => "",
lib_cflags => "",
lib_cppflags => "-DOPENSSL_USE_NODELETE -DL_ENDIAN",
lib_defines => [  ],
module_cflags => "-fPIC",
module_cxxflags => undef,
module_ldflags => "-Wl,-znodelete -shared -Wl,-Bsymbolic",
perl_platform => "Unix",
perlasm_scheme => "elf",
shared_cflag => "-fPIC",
shared_defflag => "-Wl,--version-script=",
shared_defines => [  ],
shared_ldflag => "-Wl,-znodelete -shared -Wl,-Bsymbolic",
shared_rcflag => "",
shared_sonameflag => "-Wl,-soname=",
shared_target => "linux-shared",
thread_defines => [  ],
thread_scheme => "pthreads",
unistd => "<unistd.h>",

Recorded environment:

AR = C:/Users/.../AppData/Local/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/windows-x86_64\bin\llvm-ar.exe
BUILDFILE =
CC = C:/Users/.../AppData/Local/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/windows-x86_64\bin\clang.exe
CFLAGS =
CPPFLAGS =
CROSS_COMPILE =
CXX =
CXXFLAGS =
HASHBANGPERL =
LDFLAGS = 
LDLIBS =
OPENSSL_LOCAL_CONFIG_DIR =
PERL =
RANLIB = llvm-ranlib
RC =
RCFLAGS =
WINDRES =
__CNF_CFLAGS =
__CNF_CPPDEFINES =
__CNF_CPPFLAGS =
__CNF_CPPINCLUDES =
__CNF_CXXFLAGS =
__CNF_LDFLAGS =
__CNF_LDLIBS =

Makevars:

AR              = C:/Users/.../AppData/Local/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/windows-x86_64\bin\llvm-ar.exe
ARFLAGS         = qc
ASFLAGS         =
CC              = C:/Users/.../AppData/Local/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/windows-x86_64\bin\clang.exe
CFLAGS          = -Wall -O3 -fomit-frame-pointer --target=i686-linux-android24 -mstackrealign -O2 -ffunction-sections -fdata-sections -fPIC -gdwarf-2 -fno-omit-frame-pointer -m32
CPPDEFINES      = ANDROID
CPPFLAGS        =
CPPINCLUDES     =
CXX             = g++
CXXFLAGS        = -Wall -O3 --target=i686-linux-android24 -mstackrealign -O2 -ffunction-sections -fdata-sections -fPIC -gdwarf-2 -fno-omit-frame-pointer -m32
HASHBANGPERL    = /usr/bin/env perl
LDFLAGS         =
LDLIBS          =
PERL            = perl
RANLIB          = llvm-ranlib
RC              = windres
RCFLAGS         =

NOTE: These variables only represent the configuration view. The build file template may have processed these variables further, please have a look at the build file for more exact data: Makefile

build file:

Makefile

build file templates:

Configurations/common0.tmpl
Configurations/unix-Makefile.tmpl
xuxiaocheng0201 commented 1 month ago

Same issue, but not on tauri. openssl = { version = "~0.10", features = ["vendored"]} and run cargo build --target aarch64-linux-android in cygwin. Output is:

Caused by:
  process didn't exit successfully: `D:\Projects\temp\target\debug\build\openssl-sys-c5bf088e90fa5848\build-script-main` (exit code: 101)
  --- stdout
  cargo:rustc-check-cfg=cfg(osslconf, values("OPENSSL_NO_OCB", "OPENSSL_NO_SM4", "OPENSSL_NO_SEED", "OPENSSL_NO_CHACHA", "OPENSSL_NO_CAST", "OPENSSL_NO_IDEA", "OPENSSL_NO_CAMELLIA", "OPENSSL_NO_RC4", "OPENSSL_NO_BF", "OPENSSL_NO_PSK", "OPENSSL_NO_DEPRECATED_3_0", "OPENSSL_NO_SCRYPT", "OPENSSL_NO_SM3", "OPENSSL_NO_RMD160", "OPENSSL_NO_EC2M", "OPENSSL_NO_OCSP", "OPENSSL_NO_CMS", "OPENSSL_NO_COMP", "OPENSSL_NO_SOCK", "OPENSSL_NO_STDIO"))
  cargo:rustc-check-cfg=cfg(openssl)
  cargo:rustc-check-cfg=cfg(libressl)
  cargo:rustc-check-cfg=cfg(boringssl)
  cargo:rustc-check-cfg=cfg(libressl250)
  cargo:rustc-check-cfg=cfg(libressl251)
  cargo:rustc-check-cfg=cfg(libressl252)
  cargo:rustc-check-cfg=cfg(libressl261)
  cargo:rustc-check-cfg=cfg(libressl270)
  cargo:rustc-check-cfg=cfg(libressl271)
  cargo:rustc-check-cfg=cfg(libressl273)
  cargo:rustc-check-cfg=cfg(libressl280)
  cargo:rustc-check-cfg=cfg(libressl281)
  cargo:rustc-check-cfg=cfg(libressl291)
  cargo:rustc-check-cfg=cfg(libressl310)
  cargo:rustc-check-cfg=cfg(libressl321)
  cargo:rustc-check-cfg=cfg(libressl332)
  cargo:rustc-check-cfg=cfg(libressl340)
  cargo:rustc-check-cfg=cfg(libressl350)
  cargo:rustc-check-cfg=cfg(libressl360)
  cargo:rustc-check-cfg=cfg(libressl361)
  cargo:rustc-check-cfg=cfg(libressl370)
  cargo:rustc-check-cfg=cfg(libressl380)
  cargo:rustc-check-cfg=cfg(libressl381)
  cargo:rustc-check-cfg=cfg(libressl382)
  cargo:rustc-check-cfg=cfg(libressl390)
  cargo:rustc-check-cfg=cfg(libressl400)
  cargo:rustc-check-cfg=cfg(ossl101)
  cargo:rustc-check-cfg=cfg(ossl102)
  cargo:rustc-check-cfg=cfg(ossl102f)
  cargo:rustc-check-cfg=cfg(ossl102h)
  cargo:rustc-check-cfg=cfg(ossl110)
  cargo:rustc-check-cfg=cfg(ossl110f)
  cargo:rustc-check-cfg=cfg(ossl110g)
  cargo:rustc-check-cfg=cfg(ossl110h)
  cargo:rustc-check-cfg=cfg(ossl111)
  cargo:rustc-check-cfg=cfg(ossl111b)
  cargo:rustc-check-cfg=cfg(ossl111c)
  cargo:rustc-check-cfg=cfg(ossl111d)
  cargo:rustc-check-cfg=cfg(ossl300)
  cargo:rustc-check-cfg=cfg(ossl310)
  cargo:rustc-check-cfg=cfg(ossl320)
  cargo:rustc-check-cfg=cfg(ossl330)
  cargo:rerun-if-env-changed=AARCH64_LINUX_ANDROID_OPENSSL_NO_VENDOR
  AARCH64_LINUX_ANDROID_OPENSSL_NO_VENDOR unset
  cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
  OPENSSL_NO_VENDOR unset
  cargo:rerun-if-env-changed=AARCH64_LINUX_ANDROID_OPENSSL_CONFIG_DIR
  AARCH64_LINUX_ANDROID_OPENSSL_CONFIG_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_CONFIG_DIR
  OPENSSL_CONFIG_DIR unset
  OUT_DIR = Some(D:\Projects\temp\target\aarch64-linux-android\debug\build\openssl-sys-4ab259856fffb252\out)
  cargo:rerun-if-env-changed=CC_aarch64-linux-android
  CC_aarch64-linux-android = None
  cargo:rerun-if-env-changed=CC_aarch64_linux_android
  CC_aarch64_linux_android = Some(D:/AppData/Languages/android-ndk-r27/toolchains/llvm/prebuilt/windows-x86_64/bin/aarch64-linux-android21-clang.cmd)
  RUSTC_WRAPPER = Some(D:/AppData/Languages/Cargo/bin/sccache.exe)
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some(true)
  cargo:rerun-if-env-changed=CFLAGS_aarch64-linux-android
  CFLAGS_aarch64-linux-android = None
  cargo:rerun-if-env-changed=CFLAGS_aarch64_linux_android
  CFLAGS_aarch64_linux_android = None
  cargo:rerun-if-env-changed=TARGET_CFLAGS
  TARGET_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=AR_aarch64-linux-android
  AR_aarch64-linux-android = None
  cargo:rerun-if-env-changed=AR_aarch64_linux_android
  AR_aarch64_linux_android = Some(D:/AppData/Languages/android-ndk-r27/toolchains/llvm/prebuilt/windows-x86_64/bin/llvm-ar)
  cargo:rerun-if-env-changed=CC_KNOWN_WRAPPER_CUSTOM
  CC_KNOWN_WRAPPER_CUSTOM = None
  cargo:rerun-if-env-changed=ARFLAGS_aarch64-linux-android
  ARFLAGS_aarch64-linux-android = None
  cargo:rerun-if-env-changed=ARFLAGS_aarch64_linux_android
  ARFLAGS_aarch64_linux_android = None
  cargo:rerun-if-env-changed=TARGET_ARFLAGS
  TARGET_ARFLAGS = None
  cargo:rerun-if-env-changed=ARFLAGS
  ARFLAGS = None
  cargo:rerun-if-env-changed=RANLIB_aarch64-linux-android
  RANLIB_aarch64-linux-android = None
  cargo:rerun-if-env-changed=RANLIB_aarch64_linux_android
  RANLIB_aarch64_linux_android = None
  cargo:rerun-if-env-changed=TARGET_RANLIB
  TARGET_RANLIB = None
  cargo:rerun-if-env-changed=RANLIB
  RANLIB = None
  cargo:rerun-if-env-changed=RANLIBFLAGS_aarch64-linux-android
  RANLIBFLAGS_aarch64-linux-android = None
  cargo:rerun-if-env-changed=RANLIBFLAGS_aarch64_linux_android
  RANLIBFLAGS_aarch64_linux_android = None
  cargo:rerun-if-env-changed=TARGET_RANLIBFLAGS
  TARGET_RANLIBFLAGS = None
  cargo:rerun-if-env-changed=RANLIBFLAGS
  RANLIBFLAGS = None
  running "perl" "./Configure" "--prefix=D:/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/install" "--openssldir=/usr/local/ssl" "no-dso" "no-shared" "no-ssl3" "no-tests" "no-comp" "no-zlib" "no-zlib-dynamic" "--libdir=lib" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "no-stdio" "linux-aarch64" "--target=aarch64-linux-android21" "-O2" "-DANDROID" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer"
  Configuring OpenSSL version 3.3.2 for target linux-aarch64
  Using os-specific seed configuration
  Created configdata.pm
  Running configdata.pm
  Created Makefile.in
  Created Makefile
  Created include/openssl/configuration.h

  **********************************************************************
  ***                                                                ***
  ***   OpenSSL has been successfully configured                     ***
  ***                                                                ***
  ***   If you encounter a problem while building, please open an    ***
  ***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
  ***   and include the output from the following command:           ***
  ***                                                                ***
  ***       perl configdata.pm --dump                                ***
  ***                                                                ***
  ***   (If you are new to OpenSSL, you might want to consult the    ***
  ***   'Troubleshooting' section in the INSTALL.md file first)      ***
  ***                                                                ***
  **********************************************************************
  running "make" "depend"
  running "make" "build_libs"
  /usr/bin/perl util/mkinstallvars.pl PREFIX=. BINDIR=apps APPLINKDIR=ms LIBDIR= INCLUDEDIR=include "INCLUDEDIR=./include" ENGINESDIR=engines MODULESDIR=providers "VERSION=3.3.2" "LDLIBS=-ldl -pthread " > builddata.pm
  /usr/bin/perl "-I." "-Mconfigdata" "-Mbuilddata" "util/dofile.pl" "-oMakefile" exporters/cmake/OpenSSLConfig.cmake.in > OpenSSLConfig.cmake
  /usr/bin/perl "-I." "-Mconfigdata" "-Mconfigdata" "-Mbuilddata" "util/dofile.pl" "-oMakefile" exporters/cmake/OpenSSLConfigVersion.cmake.in > OpenSSLConfigVersion.cmake
  /usr/bin/perl "-I." "-Iutil/perl" "-Mconfigdata" "-MOpenSSL::paramnames" "util/dofile.pl" "-oMakefile" crypto/params_idx.c.in > crypto/params_idx.c
  /usr/bin/perl util/mkinstallvars.pl "PREFIX=D:/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/install" BINDIR=bin "LIBDIR=lib" "libdir=D:/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/install/lib" INCLUDEDIR=include APPLINKDIR=include/openssl "ENGINESDIR=D:/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/install/lib/engines-3" "MODULESDIR=D:/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/install/lib/ossl-modules" "PKGCONFIGDIR=D:/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/install/lib/pkgconfig" "CMAKECONFIGDIR=D:/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/install/lib/cmake/OpenSSL" "LDLIBS=-ldl -pthread " "VERSION=3.3.2" > installdata.pm
  /usr/bin/perl "-I." "-Mconfigdata" "-Minstalldata" "util/dofile.pl" "-oMakefile" exporters/cmake/OpenSSLConfig.cmake.in > exporters/OpenSSLConfig.cmake
  /usr/bin/perl "-I." "-Mconfigdata" "-Mconfigdata" "-Minstalldata" "util/dofile.pl" "-oMakefile" exporters/cmake/OpenSSLConfigVersion.cmake.in > exporters/OpenSSLConfigVersion.cmake
  /usr/bin/perl "-I." "-Mconfigdata" "-Minstalldata" "util/dofile.pl" "-oMakefile" exporters/pkg-config/libcrypto.pc.in > exporters/libcrypto.pc
  /usr/bin/perl "-I." "-Mconfigdata" "-Minstalldata" "util/dofile.pl" "-oMakefile" exporters/pkg-config/libssl.pc.in > exporters/libssl.pc
  /usr/bin/perl "-I." "-Mconfigdata" "-Mconfigdata" "-Mconfigdata" "-Minstalldata" "util/dofile.pl" "-oMakefile" exporters/pkg-config/openssl.pc.in > exporters/openssl.pc
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/crypto/bn_conf.h.in > include/crypto/bn_conf.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/crypto/dso_conf.h.in > include/crypto/dso_conf.h
  /usr/bin/perl "-I." "-Iutil/perl" "-Mconfigdata" "-MOpenSSL::paramnames" "util/dofile.pl" "-oMakefile" include/internal/param_names.h.in > include/internal/param_names.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/asn1.h.in > include/openssl/asn1.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/asn1t.h.in > include/openssl/asn1t.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/bio.h.in > include/openssl/bio.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/cmp.h.in > include/openssl/cmp.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/cms.h.in > include/openssl/cms.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/conf.h.in > include/openssl/conf.h
  /usr/bin/perl "-I." "-Iutil/perl" "-Mconfigdata" "-MOpenSSL::paramnames" "util/dofile.pl" "-oMakefile" include/openssl/core_names.h.in > include/openssl/core_names.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/crmf.h.in > include/openssl/crmf.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/crypto.h.in > include/openssl/crypto.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/ct.h.in > include/openssl/ct.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/err.h.in > include/openssl/err.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/ess.h.in > include/openssl/ess.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/fipskey.h.in > include/openssl/fipskey.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/lhash.h.in > include/openssl/lhash.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/ocsp.h.in > include/openssl/ocsp.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/opensslv.h.in > include/openssl/opensslv.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/pkcs12.h.in > include/openssl/pkcs12.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/pkcs7.h.in > include/openssl/pkcs7.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/safestack.h.in > include/openssl/safestack.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/srp.h.in > include/openssl/srp.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/ssl.h.in > include/openssl/ssl.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/ui.h.in > include/openssl/ui.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/x509.h.in > include/openssl/x509.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/x509_vfy.h.in > include/openssl/x509_vfy.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/x509v3.h.in > include/openssl/x509v3.h
  /usr/bin/perl "-I." "-Mconfigdata" "-Mbuilddata" "util/dofile.pl" "-oMakefile" exporters/pkg-config/libcrypto.pc.in > libcrypto.pc
  /usr/bin/perl "-I." "-Mconfigdata" "-Mbuilddata" "util/dofile.pl" "-oMakefile" exporters/pkg-config/libssl.pc.in > libssl.pc
  /usr/bin/perl "-I." "-Mconfigdata" "-Mbuilddata" "-Mbuilddata" "-Mbuilddata" "util/dofile.pl" "-oMakefile" exporters/pkg-config/openssl.pc.in > openssl.pc
  "make" depend && "make" _build_libs
  make[1]: Entering directory '/cygdrive/d/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/build/src'
  make[1]: Leaving directory '/cygdrive/d/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/build/src'
  make[1]: Entering directory '/cygdrive/d/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/build/src'
  D:/AppData/Languages/Cargo/bin/sccache.exe D:/AppData/Languages/android-ndk-r27/toolchains/llvm/prebuilt/windows-x86_64/bin\clang.exe  -I. -Iinclude -Iproviders/common/include -Iproviders/implementations/include  -DBSAES_ASM -DECP_NISTZ256_ASM -DECP_SM2P256_ASM -DKECCAK1600_ASM -DMD5_ASM -DOPENSSL_BN_ASM_MONT -DOPENSSL_CPUID_OBJ -DOPENSSL_SM3_ASM -DPOLY1305_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DSM4_ASM -DSTATIC_LEGACY -DVPAES_ASM -DVPSM4_ASM -fPIC -pthread -Wall -O3 --target=aarch64-linux-android21 -O2 -ffunction-sections -fdata-sections -fPIC -gdwarf-2 -fno-omit-frame-pointer -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"D:/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/install/lib/engines-3\"" -DMODULESDIR="\"D:/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/install/lib/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -DANDROID  -c -o crypto/aes/libcrypto-lib-aes_cbc.o crypto/aes/aes_cbc.c
  make[1]: Leaving directory '/cygdrive/d/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/build/src'

  --- stderr
  DEBUG: all keys: APPLINKDIR, BINDIR, CMAKECONFIGDIR, ENGINESDIR, INCLUDEDIR, LDLIBS, LIBDIR, MODULESDIR, PKGCONFIGDIR, PREFIX, VERSION, libdir
  No value given for CMAKECONFIGDIR
  No value given for PKGCONFIGDIR
  No value given for libdir
  DEBUG: PREFIX = . => PREFIX = /cygdrive/d/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/build/src
  DEBUG: libdir = . => libdir = /cygdrive/d/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/build/src
  DEBUG: BINDIR = apps => BINDIR = /cygdrive/d/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/build/src/apps, BINDIR_REL_PREFIX = apps
  DEBUG: LIBDIR =  => LIBDIR = /cygdrive/d/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/build/src, LIBDIR_REL_PREFIX =
  DEBUG: INCLUDEDIR = [ include, ./include ] => INCLUDEDIR = [ /cygdrive/d/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/build/src/include, /cygdrive/d/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/build/src/include ], INCLUDEDIR_REL_PREFIX = [ include, ./include ]
  DEBUG: APPLINKDIR = ms => APPLINKDIR = /cygdrive/d/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/build/src/ms, APPLINKDIR_REL_PREFIX = ms
  DEBUG: ENGINESDIR = engines => ENGINESDIR = /cygdrive/d/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/build/src/engines, ENGINESDIR_REL_LIBDIR = engines
  DEBUG: MODULESDIR = providers => MODULESDIR = /cygdrive/d/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/build/src/providers, MODULESDIR_REL_LIBDIR = providers
  DEBUG: PKGCONFIGDIR = . => PKGCONFIGDIR = /cygdrive/d/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/build/src, PKGCONFIGDIR_REL_LIBDIR = .
  DEBUG: CMAKECONFIGDIR = . => CMAKECONFIGDIR = /cygdrive/d/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/build/src, CMAKECONFIGDIR_REL_LIBDIR = .
  DEBUG: all keys: APPLINKDIR, BINDIR, CMAKECONFIGDIR, ENGINESDIR, INCLUDEDIR, LDLIBS, LIBDIR, MODULESDIR, PKGCONFIGDIR, PREFIX, VERSION, libdir
  DEBUG: PREFIX = D:/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/install => PREFIX = D:/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/install
  DEBUG: libdir = D:/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/install/lib => libdir = D:/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/install/lib
  DEBUG: BINDIR = bin => BINDIR = D:/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/install/bin, BINDIR_REL_PREFIX = bin
  DEBUG: LIBDIR = lib => LIBDIR = D:/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/install/lib, LIBDIR_REL_PREFIX = lib
  DEBUG: INCLUDEDIR = include => INCLUDEDIR = D:/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/install/include, INCLUDEDIR_REL_PREFIX = include
  DEBUG: APPLINKDIR = include/openssl => APPLINKDIR = D:/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/install/include/openssl, APPLINKDIR_REL_PREFIX = include/openssl
  DEBUG: ENGINESDIR = D:/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/install/lib/engines-3 => ENGINESDIR = D:/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/install/lib/engines-3, ENGINESDIR_REL_LIBDIR = engines-3
  DEBUG: MODULESDIR = D:/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/install/lib/ossl-modules => MODULESDIR = D:/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/install/lib/ossl-modules, MODULESDIR_REL_LIBDIR = ossl-modules
  DEBUG: PKGCONFIGDIR = D:/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/install/lib/pkgconfig => PKGCONFIGDIR = D:/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/install/lib/pkgconfig, PKGCONFIGDIR_REL_LIBDIR = pkgconfig
  DEBUG: CMAKECONFIGDIR = D:/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/install/lib/cmake/OpenSSL => CMAKECONFIGDIR = D:/Projects/temp/target/aarch64-linux-android/debug/build/openssl-sys-4ab259856fffb252/out/openssl-build/install/lib/cmake/OpenSSL, CMAKECONFIGDIR_REL_LIBDIR = cmake/OpenSSL
  sccache: error: failed to execute compile
  sccache: caused by: cannot find binary path
  make[1]: *** [Makefile:3914: crypto/aes/libcrypto-lib-aes_cbc.o] Error 2
  make: *** [Makefile:1532: build_libs] Error 2
  thread 'main' panicked at D:\AppData\Languages\Cargo\registry\src\index.crates.io-6f17d22bba15001f\openssl-src-300.3.2+3.3.2\src/lib.rs:633:9:

  Error building OpenSSL:
      Command: "make" "build_libs"
      Exit status: exit code: 2

  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Run D:/AppData/Languages/android-ndk-r27/toolchains/llvm/prebuilt/windows-x86_64/bin\clang.exe and output is -bash: D:/AppData/Languages/android-ndk-r27/toolchains/llvm/prebuilt/windows-x86_64/binclang.exe: No such file or directory.