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

failed to run custom build command for aws-lc-sys v0.22.0 #562

Closed
songjiachao opened this issue Oct 9, 2024 · 6 comments
Closed

failed to run custom build command for aws-lc-sys v0.22.0 #562

songjiachao opened this issue Oct 9, 2024 · 6 comments

Comments

@songjiachao
Copy link

songjiachao commented Oct 9, 2024

Problem:

error: failed to run custom build command for aws-lc-sys v0.22.0

Relevant details

warning: aws-lc-sys@0.22.0: Building with: CMake
warning: aws-lc-sys@0.22.0: Symbol Prefix: Some("aws_lc_0_22_0")
warning: aws-lc-sys@0.22.0: CMAKE environment variable set: cmake
warning: aws-lc-sys@0.22.0: Generating bindings - external bindgen. Platform: aarch64-linux-android
warning: aws-lc-sys@0.22.0: Compilation of 'c11.c' succeeded - Ok(["/Users/vivo/Desktop/code/fun-family/target/aarch64-linux-android/release/build/aws-lc-sys-e502445f3434898e/out/out-c11/e77c01119886af81-c11.o"]).
warning: aws-lc-sys@0.22.0: Setting CFLAGS: "-Os -DANDROID -ffunction-sections -fdata-sections -fPIC -std=c11 -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/generated-include -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/include -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/aws-lc/include -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/aws-lc/third_party/s2n-bignum/include -Wall -Wextra -Wno-unused-parameter -ffile-prefix-map=/Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0= -DBORINGSSL_IMPLEMENTATION=1 -DBORINGSSL_PREFIX=aws_lc_0_22_0"

error: failed to run custom build command for `aws-lc-sys v0.22.0`

Caused by:
  process didn't exit successfully: `/Users/vivo/Desktop/code/fun-family/target/release/build/aws-lc-sys-5fb065eb2d4308a7/build-script-main` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=AWS_LC_SYS_NO_PREFIX
  cargo:rerun-if-env-changed=AWS_LC_SYS_PREGENERATING_BINDINGS
  cargo:rerun-if-env-changed=AWS_LC_SYS_EXTERNAL_BINDGEN
  cargo:rerun-if-env-changed=AWS_LC_SYS_NO_ASM
  cargo:rerun-if-env-changed=AWS_LC_SYS_CFLAGS
  cargo:rerun-if-env-changed=AWS_LC_SYS_PREBUILT_NASM
  cargo:rerun-if-env-changed=AWS_LC_SYS_C_STD
  cargo:rerun-if-env-changed=AWS_LC_SYS_CMAKE_BUILDER
  cargo:rerun-if-env-changed=AWS_LC_SYS_STATIC
  cargo:rerun-if-env-changed=CMAKE
  cargo:warning=Building with: CMake
  cargo:warning=Symbol Prefix: Some("aws_lc_0_22_0")
  cargo:rerun-if-env-changed=CMAKE
  cargo:warning=CMAKE environment variable set: cmake
  cargo:warning=Generating bindings - external bindgen. Platform: aarch64-linux-android
  cargo:rerun-if-env-changed=AWS_LC_SYS_INCLUDES
  cargo:rustc-cfg=use_bindgen_generated
  cargo:rerun-if-env-changed=AWS_LC_SYS_STATIC
  OPT_LEVEL = Some(s)
  TARGET = Some(aarch64-linux-android)
  HOST = Some(aarch64-apple-darwin)
  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 = None
  cargo:rerun-if-env-changed=TARGET_CC
  TARGET_CC = Some(/Users/vivo/Library/Android/sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android24-clang)
  RUSTC_WRAPPER = None
  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(false)
  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
  OPT_LEVEL = Some(s)
  TARGET = Some(aarch64-linux-android)
  HOST = Some(aarch64-apple-darwin)
  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 = None
  cargo:rerun-if-env-changed=TARGET_CC
  TARGET_CC = Some(/Users/vivo/Library/Android/sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android24-clang)
  RUSTC_WRAPPER = None
  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(false)
  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:warning=Compilation of 'c11.c' succeeded - Ok(["/Users/vivo/Desktop/code/fun-family/target/aarch64-linux-android/release/build/aws-lc-sys-e502445f3434898e/out/out-c11/e77c01119886af81-c11.o"]).
  cargo:rerun-if-env-changed=CC
  cargo:rerun-if-env-changed=CXX
  OUT_DIR = Some(/Users/vivo/Desktop/code/fun-family/target/aarch64-linux-android/release/build/aws-lc-sys-e502445f3434898e/out)
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  HOST = Some(aarch64-apple-darwin)
  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:warning=Setting CFLAGS: "-Os -DANDROID -ffunction-sections -fdata-sections -fPIC -std=c11 -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/generated-include -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/include -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/aws-lc/include -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/aws-lc/third_party/s2n-bignum/include -Wall -Wextra -Wno-unused-parameter -ffile-prefix-map=/Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0= -DBORINGSSL_IMPLEMENTATION=1 -DBORINGSSL_PREFIX=aws_lc_0_22_0"
  cargo:rerun-if-env-changed=CMAKE_TOOLCHAIN_FILE
  cargo:rerun-if-env-changed=CMAKE_TOOLCHAIN_FILE_aarch64_linux_android
  CMAKE_TOOLCHAIN_FILE_aarch64-linux-android = None
  CMAKE_TOOLCHAIN_FILE_aarch64_linux_android = None
  TARGET_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_aarch64-linux-android = None
  CMAKE_GENERATOR_aarch64_linux_android = None
  TARGET_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_aarch64-linux-android = None
  CMAKE_PREFIX_PATH_aarch64_linux_android = None
  TARGET_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_aarch64-linux-android = None
  CMAKE_aarch64_linux_android = None
  TARGET_CMAKE = None
  CMAKE = Some("cmake")
  running: cd "/Users/vivo/Desktop/code/fun-family/target/aarch64-linux-android/release/build/aws-lc-sys-e502445f3434898e/out/build" && CMAKE_PREFIX_PATH="" "cmake" "/Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0" "-DBUILD_SHARED_LIBS=0" "-DCMAKE_BUILD_TYPE=release" "-DBORINGSSL_PREFIX=aws_lc_0_22_0_" "-DBORINGSSL_PREFIX_HEADERS=/Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/generated-include" "-DBUILD_TESTING=OFF" "-DBUILD_LIBSSL=OFF" "-DDISABLE_PERL=ON" "-DDISABLE_GO=ON" "-DCMAKE_OSX_ARCHITECTURES=arm64" "-DCMAKE_SYSTEM_PROCESSOR=arm64" "-DCMAKE_SYSTEM_NAME=Android" "-DCMAKE_SYSTEM_PROCESSOR=aarch64" "-DCMAKE_INSTALL_PREFIX=/Users/vivo/Desktop/code/fun-family/target/aarch64-linux-android/release/build/aws-lc-sys-e502445f3434898e/out" "-DCMAKE_C_FLAGS= -DANDROID -ffunction-sections -fdata-sections -fPIC -DANDROID -ffunction-sections -fdata-sections -fPIC -std=c11 -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/generated-include -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/include -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/aws-lc/include -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/aws-lc/third_party/s2n-bignum/include -Wall -Wextra -Wno-unused-parameter -ffile-prefix-map=/Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0= -DBORINGSSL_IMPLEMENTATION=1 -DBORINGSSL_PREFIX=aws_lc_0_22_0" "-DCMAKE_C_COMPILER=/Users/vivo/Library/Android/sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android24-clang" "-DCMAKE_CXX_FLAGS= -DANDROID -ffunction-sections -fdata-sections -fPIC" "-DCMAKE_CXX_COMPILER=/Users/vivo/Library/Android/sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android24-clang++" "-DCMAKE_ASM_FLAGS= -DANDROID -ffunction-sections -fdata-sections -fPIC -DANDROID -ffunction-sections -fdata-sections -fPIC -std=c11 -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/generated-include -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/include -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/aws-lc/include -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/aws-lc/third_party/s2n-bignum/include -Wall -Wextra -Wno-unused-parameter -ffile-prefix-map=/Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0= -DBORINGSSL_IMPLEMENTATION=1 -DBORINGSSL_PREFIX=aws_lc_0_22_0" "-DCMAKE_ASM_COMPILER=/Users/vivo/Library/Android/sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android24-clang" "--no-warn-unused-cli"
  Not searching for unused variables given on the command line.
  -- Configuring incomplete, errors occurred!

  --- stderr
  Evaluating: AWS_LC_SYS_EXTERNAL_BINDGEN='1'
  Parsed: AWS_LC_SYS_EXTERNAL_BINDGEN=true
  CMake Deprecation Warning at CMakeLists.txt:4 (cmake_minimum_required):
    Compatibility with CMake < 3.5 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.


  CMake Error at /opt/homebrew/Cellar/cmake/3.30.4/share/cmake/Modules/Platform/Android-Determine.cmake:218 (message):
    Android: Neither the NDK or a standalone toolchain was found.
  Call Stack (most recent call first):
    /opt/homebrew/Cellar/cmake/3.30.4/share/cmake/Modules/CMakeDetermineSystem.cmake:184 (include)
    CMakeLists.txt:6 (project)


  CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
  thread 'main' panicked at /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.51/src/lib.rs:1100:5:

  command did not execute successfully, got: exit status: 1

  build script failed, must exit now
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
    Error `Failed to run `cargo build`: command ["cargo", "build", "--package", "funproxy", "--manifest-path", "/Users/vivo/Desktop/code/fun-family/app/mobile/src-tauri/Cargo.toml", "--target", "aarch64-linux-android", "--features", "tauri/custom-protocol tauri/rustls-tls", "--lib", "--release"] exited with code 101

System information: for linux, below info can be collected by running uname -srvmp
Darwin 24.0.0 Darwin Kernel Version 24.0.0: Tue Sep 24 23:39:07 PDT 2024; root:xnu-11215.1.12~1/RELEASE_ARM64_T6000 arm64 arm
image

@songjiachao
Copy link
Author

songjiachao commented Oct 9, 2024

The following warnings were emitted during compilation:

warning: aws-lc-sys@0.22.0: Building with: CMake
warning: aws-lc-sys@0.22.0: Symbol Prefix: Some("aws_lc_0_22_0")
warning: aws-lc-sys@0.22.0: CMAKE environment variable set: cmake
warning: aws-lc-sys@0.22.0: Generating bindings - internal bindgen. Platform: aarch64-linux-android
warning: aws-lc-sys@0.22.0: Compilation of 'c11.c' succeeded - Ok(["/Users/vivo/Desktop/code/fun-family/target/aarch64-linux-android/release/build/aws-lc-sys-9b44fa0cf132e6c2/out/out-c11/e77c01119886af81-c11.o"]).
warning: aws-lc-sys@0.22.0: Setting CFLAGS: "-Os -DANDROID -ffunction-sections -fdata-sections -fPIC -std=c11 -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/generated-include -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/include -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/aws-lc/include -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/aws-lc/third_party/s2n-bignum/include -Wall -Wextra -Wno-unused-parameter -ffile-prefix-map=/Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0= -DBORINGSSL_IMPLEMENTATION=1 -DBORINGSSL_PREFIX=aws_lc_0_22_0"

error: failed to run custom build command for `aws-lc-sys v0.22.0`

Caused by:
  process didn't exit successfully: `/Users/vivo/Desktop/code/fun-family/target/release/build/aws-lc-sys-24767d88bce245f0/build-script-main` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=AWS_LC_SYS_NO_PREFIX
  cargo:rerun-if-env-changed=AWS_LC_SYS_PREGENERATING_BINDINGS
  cargo:rerun-if-env-changed=AWS_LC_SYS_EXTERNAL_BINDGEN
  cargo:rerun-if-env-changed=AWS_LC_SYS_NO_ASM
  cargo:rerun-if-env-changed=AWS_LC_SYS_CFLAGS
  cargo:rerun-if-env-changed=AWS_LC_SYS_PREBUILT_NASM
  cargo:rerun-if-env-changed=AWS_LC_SYS_C_STD
  cargo:rerun-if-env-changed=AWS_LC_SYS_CMAKE_BUILDER
  cargo:rerun-if-env-changed=AWS_LC_SYS_STATIC
  cargo:rerun-if-env-changed=CMAKE
  cargo:warning=Building with: CMake
  cargo:warning=Symbol Prefix: Some("aws_lc_0_22_0")
  cargo:rerun-if-env-changed=CMAKE
  cargo:warning=CMAKE environment variable set: cmake
  cargo:warning=Generating bindings - internal bindgen. Platform: aarch64-linux-android
  cargo:rerun-if-env-changed=AWS_LC_SYS_INCLUDES
  cargo:rustc-cfg=use_bindgen_generated
  cargo:rerun-if-env-changed=AWS_LC_SYS_STATIC
  OPT_LEVEL = Some(s)
  TARGET = Some(aarch64-linux-android)
  HOST = Some(aarch64-apple-darwin)
  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 = None
  cargo:rerun-if-env-changed=TARGET_CC
  TARGET_CC = Some(/Users/vivo/Library/Android/sdk/ndk/28.0.12433566/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android28-clang)
  RUSTC_WRAPPER = None
  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(false)
  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
  OPT_LEVEL = Some(s)
  TARGET = Some(aarch64-linux-android)
  HOST = Some(aarch64-apple-darwin)
  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 = None
  cargo:rerun-if-env-changed=TARGET_CC
  TARGET_CC = Some(/Users/vivo/Library/Android/sdk/ndk/28.0.12433566/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android28-clang)
  RUSTC_WRAPPER = None
  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(false)
  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:warning=Compilation of 'c11.c' succeeded - Ok(["/Users/vivo/Desktop/code/fun-family/target/aarch64-linux-android/release/build/aws-lc-sys-9b44fa0cf132e6c2/out/out-c11/e77c01119886af81-c11.o"]).
  cargo:rerun-if-env-changed=CC
  cargo:rerun-if-env-changed=CXX
  OUT_DIR = Some(/Users/vivo/Desktop/code/fun-family/target/aarch64-linux-android/release/build/aws-lc-sys-9b44fa0cf132e6c2/out)
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  HOST = Some(aarch64-apple-darwin)
  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:warning=Setting CFLAGS: "-Os -DANDROID -ffunction-sections -fdata-sections -fPIC -std=c11 -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/generated-include -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/include -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/aws-lc/include -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/aws-lc/third_party/s2n-bignum/include -Wall -Wextra -Wno-unused-parameter -ffile-prefix-map=/Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0= -DBORINGSSL_IMPLEMENTATION=1 -DBORINGSSL_PREFIX=aws_lc_0_22_0"
  cargo:rerun-if-env-changed=CMAKE_TOOLCHAIN_FILE
  cargo:rerun-if-env-changed=CMAKE_TOOLCHAIN_FILE_aarch64_linux_android
  CMAKE_TOOLCHAIN_FILE_aarch64-linux-android = None
  CMAKE_TOOLCHAIN_FILE_aarch64_linux_android = None
  TARGET_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_aarch64-linux-android = None
  CMAKE_GENERATOR_aarch64_linux_android = None
  TARGET_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_aarch64-linux-android = None
  CMAKE_PREFIX_PATH_aarch64_linux_android = None
  TARGET_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_aarch64-linux-android = None
  CMAKE_aarch64_linux_android = None
  TARGET_CMAKE = None
  CMAKE = Some("cmake")
  running: cd "/Users/vivo/Desktop/code/fun-family/target/aarch64-linux-android/release/build/aws-lc-sys-9b44fa0cf132e6c2/out/build" && CMAKE_PREFIX_PATH="" "cmake" "/Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0" "-DBUILD_SHARED_LIBS=0" "-DCMAKE_BUILD_TYPE=release" "-DBORINGSSL_PREFIX=aws_lc_0_22_0_" "-DBORINGSSL_PREFIX_HEADERS=/Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/generated-include" "-DBUILD_TESTING=OFF" "-DBUILD_LIBSSL=OFF" "-DDISABLE_PERL=ON" "-DDISABLE_GO=ON" "-DCMAKE_OSX_ARCHITECTURES=arm64" "-DCMAKE_SYSTEM_PROCESSOR=arm64" "-DCMAKE_SYSTEM_NAME=Android" "-DCMAKE_SYSTEM_PROCESSOR=aarch64" "-DCMAKE_INSTALL_PREFIX=/Users/vivo/Desktop/code/fun-family/target/aarch64-linux-android/release/build/aws-lc-sys-9b44fa0cf132e6c2/out" "-DCMAKE_C_FLAGS= -DANDROID -ffunction-sections -fdata-sections -fPIC -DANDROID -ffunction-sections -fdata-sections -fPIC -std=c11 -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/generated-include -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/include -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/aws-lc/include -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/aws-lc/third_party/s2n-bignum/include -Wall -Wextra -Wno-unused-parameter -ffile-prefix-map=/Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0= -DBORINGSSL_IMPLEMENTATION=1 -DBORINGSSL_PREFIX=aws_lc_0_22_0" "-DCMAKE_C_COMPILER=/Users/vivo/Library/Android/sdk/ndk/28.0.12433566/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android28-clang" "-DCMAKE_CXX_FLAGS= -DANDROID -ffunction-sections -fdata-sections -fPIC" "-DCMAKE_CXX_COMPILER=/Users/vivo/Library/Android/sdk/ndk/28.0.12433566/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android28-clang++" "-DCMAKE_ASM_FLAGS= -DANDROID -ffunction-sections -fdata-sections -fPIC -DANDROID -ffunction-sections -fdata-sections -fPIC -std=c11 -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/generated-include -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/include -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/aws-lc/include -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/aws-lc/third_party/s2n-bignum/include -Wall -Wextra -Wno-unused-parameter -ffile-prefix-map=/Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0= -DBORINGSSL_IMPLEMENTATION=1 -DBORINGSSL_PREFIX=aws_lc_0_22_0" "-DCMAKE_ASM_COMPILER=/Users/vivo/Library/Android/sdk/ndk/28.0.12433566/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android28-clang" "--no-warn-unused-cli"
  Not searching for unused variables given on the command line.
  -- The C compiler identification is Clang 19.0.0
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - failed
  -- Check for working C compiler: /Users/vivo/Library/Android/sdk/ndk/28.0.12433566/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android28-clang
  -- Check for working C compiler: /Users/vivo/Library/Android/sdk/ndk/28.0.12433566/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android28-clang - broken
  -- Configuring incomplete, errors occurred!

  --- stderr
  CMake Deprecation Warning at CMakeLists.txt:4 (cmake_minimum_required):
    Compatibility with CMake < 3.5 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.


  CMake Error at /Users/vivo/Library/Android/sdk/cmake/3.30.4/share/cmake-3.30/Modules/CMakeTestCCompiler.cmake:67 (message):
    The C compiler

      "/Users/vivo/Library/Android/sdk/ndk/28.0.12433566/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android28-clang"

    is not able to compile a simple test program.

    It fails with the following output:

      Change Dir: '/Users/vivo/Desktop/code/fun-family/target/aarch64-linux-android/release/build/aws-lc-sys-9b44fa0cf132e6c2/out/build/CMakeFiles/CMakeScratch/TryCompile-xT0QsL'
      
      Run Build Command(s): /Users/vivo/Library/Android/sdk/cmake/3.30.4/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_4093f/fast
      /Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/cmTC_4093f.dir/build.make CMakeFiles/cmTC_4093f.dir/build
      Building C object CMakeFiles/cmTC_4093f.dir/testCCompiler.c.o
      /Users/vivo/Library/Android/sdk/ndk/28.0.12433566/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android28-clang   -DANDROID -ffunction-sections -fdata-sections -fPIC -DANDROID -ffunction-sections -fdata-sections -fPIC -std=c11 -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/generated-include -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/include -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/aws-lc/include -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/aws-lc/third_party/s2n-bignum/include -Wall -Wextra -Wno-unused-parameter -ffile-prefix-map=/Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0= -DBORINGSSL_IMPLEMENTATION=1 -DBORINGSSL_PREFIX=aws_lc_0_22_0  -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk -mmacosx-version-min=10.13 -MD -MT CMakeFiles/cmTC_4093f.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_4093f.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_4093f.dir/testCCompiler.c.o -c /Users/vivo/Desktop/code/fun-family/target/aarch64-linux-android/release/build/aws-lc-sys-9b44fa0cf132e6c2/out/build/CMakeFiles/CMakeScratch/TryCompile-xT0QsL/testCCompiler.c
      clang: error: unsupported option '-arch' for target 'aarch64-linux-android28'
      clang: warning: argument unused during compilation: '-mmacosx-version-min=10.13' [-Wunused-command-line-argument]
      make[1]: *** [CMakeFiles/cmTC_4093f.dir/testCCompiler.c.o] Error 1
      make: *** [cmTC_4093f/fast] Error 2
      
      

    

    CMake will not be able to correctly generate this project.
  Call Stack (most recent call first):
    CMakeLists.txt:7 (enable_language)


  thread 'main' panicked at /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.51/src/lib.rs:1100:5:

  command did not execute successfully, got: exit status: 1

  build script failed, must exit now
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
    Error `Failed to run `cargo build`: command ["cargo", "build", "--package", "funproxy", "--manifest-path", "/Users/vivo/Desktop/code/fun-family/app/mobile/src-tauri/Cargo.toml", "--target", "aarch64-linux-android", "--features", "tauri/custom-protocol tauri/rustls-tls", "--lib", "--release"] exited with code 101

@songjiachao
Copy link
Author

songjiachao commented Oct 9, 2024

(Error output in details below.)

error: failed to run custom build command for `aws-lc-sys v0.22.0`

Caused by:
  process didn't exit successfully: `/Users/vivo/Desktop/code/fun-family/target/release/build/aws-lc-sys-5fb065eb2d4308a7/build-script-main` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=AWS_LC_SYS_NO_PREFIX
  cargo:rerun-if-env-changed=AWS_LC_SYS_PREGENERATING_BINDINGS
  cargo:rerun-if-env-changed=AWS_LC_SYS_EXTERNAL_BINDGEN
  cargo:rerun-if-env-changed=AWS_LC_SYS_NO_ASM
  cargo:rerun-if-env-changed=AWS_LC_SYS_CFLAGS
  cargo:rerun-if-env-changed=AWS_LC_SYS_PREBUILT_NASM
  cargo:rerun-if-env-changed=AWS_LC_SYS_C_STD
  cargo:rerun-if-env-changed=AWS_LC_SYS_CMAKE_BUILDER
  cargo:rerun-if-env-changed=AWS_LC_SYS_STATIC
  cargo:rerun-if-env-changed=CMAKE
  cargo:warning=Building with: CMake
  cargo:warning=Symbol Prefix: Some("aws_lc_0_22_0")
  cargo:rerun-if-env-changed=CMAKE
  cargo:warning=CMAKE environment variable set: cmake
  cargo:warning=Generating bindings - external bindgen. Platform: aarch64-linux-android
  cargo:rerun-if-env-changed=AWS_LC_SYS_INCLUDES

  --- stderr
  Failure invoking external bindgen! 

  bindgen-PARAMS: --prefix-link-name aws_lc_0_22_0_ --allowlist-file .*(/|\\)openssl((/|\\)[^/\\]+)+\.h --allowlist-file .*(/|\\)rust_wrapper\.h --rustified-enum point_conversion_form_t --default-macro-constant-type signed --with-derive-default --with-derive-partialeq --with-derive-eq --raw-line 
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
  // SPDX-License-Identifier: Apache-2.0 OR ISC
   --generate functions,types,vars,methods,constructors,destructors /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/include/rust_wrapper.h --rust-target 1.59 --output /Users/vivo/Desktop/code/fun-family/target/aarch64-linux-android/release/build/aws-lc-sys-e502445f3434898e/out/bindings.rs --formatter rustfmt -- -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/include -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/aws-lc/include
  bindgen-STDOUT: 
  bindgen-STDERR: /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/cdefs.h:1035:2: error: Unsupported architecture
  /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/machine/_types.h:36:2: error: architecture not supported
  /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types.h:67:9: error: unknown type name '__int64_t'
  /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types.h:68:9: error: unknown type name '__int32_t'
  /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types.h:69:9: error: unknown type name '__int32_t'
  /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types.h:72:9: error: unknown type name '__uint32_t'
  /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'
  /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types.h:74:9: error: unknown type name '__uint64_t'
  /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types.h:80:9: error: unknown type name '__darwin_natural_t'
  /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types.h:82:9: error: unknown type name '__uint16_t'
  /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types.h:83:9: error: unknown type name '__int64_t'
  /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types.h:84:9: error: unknown type name '__int32_t'
  /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types.h:85:9: error: unknown type name '__uint32_t'
  /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types.h:86:9: error: unknown type name '__int32_t'
  /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types.h:87:9: error: unknown type name '__uint32_t'
  /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types.h:88:9: error: unknown type name '__uint32_t'
  /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types/_intptr_t.h:32:9: error: unknown type name '__darwin_intptr_t'
  /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/_types.h:43:9: error: unknown type name '__uint32_t'
  /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/machine/signal.h:36:2: error: architecture not supported
  fatal error: too many errors emitted, stopping now [-ferror-limit=]
  panicked at /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-cli-0.70.1/main.rs:45:36:
  Unable to generate bindings: ClangDiagnostic("/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/cdefs.h:1035:2: error: Unsupported architecture\n/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/machine/_types.h:36:2: error: architecture not supported\n/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types.h:67:9: error: unknown type name '__int64_t'\n/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types.h:68:9: error: unknown type name '__int32_t'\n/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types.h:69:9: error: unknown type name '__int32_t'\n/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types.h:72:9: error: unknown type name '__uint32_t'\n/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'\n/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types.h:74:9: error: unknown type name '__uint64_t'\n/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types.h:80:9: error: unknown type name '__darwin_natural_t'\n/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types.h:82:9: error: unknown type name '__uint16_t'\n/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types.h:83:9: error: unknown type name '__int64_t'\n/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types.h:84:9: error: unknown type name '__int32_t'\n/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types.h:85:9: error: unknown type name '__uint32_t'\n/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types.h:86:9: error: unknown type name '__int32_t'\n/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types.h:87:9: error: unknown type name '__uint32_t'\n/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types.h:88:9: error: unknown type name '__uint32_t'\n/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_types/_intptr_t.h:32:9: error: unknown type name '__darwin_intptr_t'\n/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/_types.h:43:9: error: unknown type name '__uint32_t'\n/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/machine/signal.h:36:2: error: architecture not supported\nfatal error: too many errors emitted, stopping now [-ferror-limit=]\n")

  thread 'main' panicked at /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/builder/main.rs:566:5:
  aws-lc-sys build failed. Please enable the 'bindgen' feature on aws-lc-rs or aws-lc-sys.For more information, see the aws-lc-rs User Guide: https://aws.github.io/aws-lc-rs/index.html
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
    Error `Failed to run `cargo build`: command ["cargo", "build", "--package", "funproxy", "--manifest-path", "/Users/vivo/Desktop/code/fun-family/app/mobile/src-tauri/Cargo.toml", "--target", "aarch64-linux-android", "--features", "tauri/custom-protocol tauri/rustls-tls", "--lib", "--release"] exited with code 101

@justsmth
Copy link
Contributor

justsmth commented Oct 9, 2024

The core issue seems to be the compiler doesn't support the -arch aarch64-linux-android28 option being passed to it.:

  -- Check for working C compiler: .../aarch64-linux-android28-clang - broken
...
      clang: error: unsupported option '-arch' for target 'aarch64-linux-android28'
      clang: warning: argument unused during compilation: '-mmacosx-version-min=10.13' [-Wunused-command-line-argument]
      make[1]: *** [CMakeFiles/cmTC_4093f.dir/testCCompiler.c.o] Error 1
...

I think this must be somewhere in CMake's logic. Why would the NDK major version ("28") be appended to the arch? Perhaps, CMake is assuming that the compiler is Apple-Clang? Based upon its usage of -mmacosx-version-min=10.13, that seems to be the case: https://github.com/Kitware/CMake/blob/5d58adf282e1ecafd3bc1085e4ca22274a29bda0/Modules/Platform/Apple-Clang.cmake#L13

Here's a couple of things to try:

  • Verify that ANDROID_NDK_ROOT or ANDROID_NDK are exported in your build environment. (You might try setting ANDROID_SDK or ANDROID_SDK_ROOT as well to the .../Android/sdk directory.)
  • Set/export the CC and CXX environment variables to the path to the compiler (aarch64-linux-android28-clang) being used. (I'm not sure how we

Please let us know any other relevant information or guidance on how we could reproduce the build failure. I hope we can improve our build scripts so that other users may avoid experiencing issues like this.

@songjiachao
Copy link
Author

songjiachao commented Oct 9, 2024

now i got this error

The following warnings were emitted during compilation: (error output in "details" below)

warning: aws-lc-sys@0.22.0: Building with: CMake
warning: aws-lc-sys@0.22.0: Symbol Prefix: Some("aws_lc_0_22_0")
warning: aws-lc-sys@0.22.0: CMAKE environment variable set: cmake
warning: aws-lc-sys@0.22.0: Generating bindings - external bindgen. Platform: aarch64-linux-android

error: failed to run custom build command for `aws-lc-sys v0.22.0`

Caused by:
  process didn't exit successfully: `/Users/vivo/Desktop/code/fun-family/target/release/build/aws-lc-sys-5fb065eb2d4308a7/build-script-main` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=AWS_LC_SYS_NO_PREFIX
  cargo:rerun-if-env-changed=AWS_LC_SYS_PREGENERATING_BINDINGS
  cargo:rerun-if-env-changed=AWS_LC_SYS_EXTERNAL_BINDGEN
  cargo:rerun-if-env-changed=AWS_LC_SYS_NO_ASM
  cargo:rerun-if-env-changed=AWS_LC_SYS_CFLAGS
  cargo:rerun-if-env-changed=AWS_LC_SYS_PREBUILT_NASM
  cargo:rerun-if-env-changed=AWS_LC_SYS_C_STD
  cargo:rerun-if-env-changed=AWS_LC_SYS_CMAKE_BUILDER
  cargo:rerun-if-env-changed=AWS_LC_SYS_STATIC
  cargo:rerun-if-env-changed=CMAKE
  cargo:warning=Building with: CMake
  cargo:warning=Symbol Prefix: Some("aws_lc_0_22_0")
  cargo:rerun-if-env-changed=CMAKE
  cargo:warning=CMAKE environment variable set: cmake
  cargo:warning=Generating bindings - external bindgen. Platform: aarch64-linux-android
  cargo:rerun-if-env-changed=AWS_LC_SYS_INCLUDES

  --- stderr
  Failure invoking external bindgen! 

  bindgen-PARAMS: --prefix-link-name aws_lc_0_22_0_ --allowlist-file .*(/|\\)openssl((/|\\)[^/\\]+)+\.h --allowlist-file .*(/|\\)rust_wrapper\.h --rustified-enum point_conversion_form_t --default-macro-constant-type signed --with-derive-default --with-derive-partialeq --with-derive-eq --raw-line 
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
  // SPDX-License-Identifier: Apache-2.0 OR ISC
   --generate functions,types,vars,methods,constructors,destructors /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/include/rust_wrapper.h --rust-target 1.59 --output /Users/vivo/Desktop/code/fun-family/target/aarch64-linux-android/release/build/aws-lc-sys-e502445f3434898e/out/bindings.rs --formatter rustfmt -- -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/include -I /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/aws-lc/include
  bindgen-STDOUT: 
  bindgen-STDERR: /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/aws-lc/include/openssl/base.h:61:10: fatal error: 'stdlib.h' file not found
  panicked at /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-cli-0.70.1/main.rs:45:36:
  Unable to generate bindings: ClangDiagnostic("/Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/aws-lc/include/openssl/base.h:61:10: fatal error: 'stdlib.h' file not found\n")

  thread 'main' panicked at /Users/vivo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.22.0/builder/main.rs:566:5:
  aws-lc-sys build failed. Please enable the 'bindgen' feature on aws-lc-rs or aws-lc-sys.For more information, see the aws-lc-rs User Guide: https://aws.github.io/aws-lc-rs/index.html
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
    Error `Failed to run `cargo build`: command ["cargo", "build", "--package", "funproxy", "--manifest-path", "/Users/vivo/Desktop/code/fun-family/app/mobile/src-tauri/Cargo.toml", "--target", "aarch64-linux-android", "--features", "tauri/custom-protocol tauri/rustls-tls", "--lib", "--release"] exited with code 101
❯ clang -v                                        
Apple clang version 16.0.0 (clang-1600.0.26.3)
Target: arm64-apple-darwin24.0.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
#.zshrc
# ANDROID
export ANDROID_HOME=~/Library/Android/sdk
export ANDROID_NDK=$ANDROID_HOME/ndk/28.0.12433566
export NDK_HOME=$ANDROID_HOME/ndk/28.0.12433566
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/cmake/3.30.4/bin:$ANDROID_HOME/platform-tools

@songjiachao
Copy link
Author

Can you help me solve this problem? I have been trying for two days and still can't compile it.

@songjiachao
Copy link
Author

I resolved by this . but I dont know why
#532 (comment)

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