aws / aws-sdk-cpp

AWS SDK for C++
Apache License 2.0
1.94k stars 1.05k forks source link

Andorid build cant link libraries #2431

Closed maxpowerart closed 5 months ago

maxpowerart commented 1 year ago

Describe the bug

Android build failed. CMake can't link with openssl & curl. Disabling build_external.cmake allows to build successfully without dependencies. Same problem at Windows. No problem with linux & windows build

Expected Behavior

Successful build

Current Behavior

-- Building AWS libraries as static objects
-- Found Git: /usr/bin/git (found version "2.34.1")
-- Android ABI: armeabi-v7a
-- Android toolchain unspecified, defaulting to clang
-- Android std lib: c++_shared
-- Android API level: android-21
-- Building project version: 1.11.54
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/maxpowerart/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /usr/bin/python3.10 (found version "3.10.6")
--   Building Zlib as part of AWS SDK
-- Found ZLIB: /home/maxpowerart/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/arm-linux-androideabi/libz.a (found version "1.2.7")
-- Encryption: LibCrypto
--   Building Openssl as part of AWS SDK
-- Http client: Curl
--   Building Curl as part of AWS SDK
CMake Error: The source directory "/home/maxpowerart/aws-sdk-cpp/android-build" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
CMake Error at cmake/build_external.cmake:139 (message):
  Failed to configure dependency libraries.
Call Stack (most recent call first):
  CMakeLists.txt:197 (include)

Reproduction Steps

Build with flag -DTARGET_ARCH=ANDROID

Full command: cmake .. -DTARGET_ARCH=ANDROID -DANDROID_NATIVE_API_LEVEL=android-21 -DNDK_DIR=/home/maxpowerart/android-ndk-r21e -DANDROID_ABI=armeabi-v7a -DBUILD_ONLY="core;gamelift;cognito-identity"

Possible Solution

No response

Additional Information/Context

No response

AWS CPP SDK version used

1.11.54

Compiler and Version used

clang 14.0.0-1ubuntu1

Operating System and version

ubuntu 22.04 WSL

jmklix commented 1 year ago

Thanks for bringing this up. This is a duplicate of this issue

github-actions[bot] commented 5 months ago

This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.

jmklix commented 5 months ago

Closing because this is a duplicate: https://github.com/aws/aws-sdk-cpp/issues/1946