aws-sdk-cpp: 1.11.337+ Android cURL Build No Longer Compiles
Describe the bug
Compiling the AWS SDK for Android no longer works for releases after 1.11.337. The build fails during the cURL build step. The previous release (1.11.336) still compiles. I think this is because it’s missing OpenSSL
Expected Behavior
I should be able to build the SDK successfully for Android
Current Behavior
Compilation fails: notice “Could NOT find OpenSSL”
-- Build files have been written to: D:/3p-package-source/package-system/AWSNativeSDK/temp/build/Debug_Shared/external-build
[1/8] Creating directories for 'CURL'
[2/8] Performing download step (git clone) for 'CURL'
Cloning into 'curl'...
HEAD is now at 44b9b4d4f RELEASE-NOTES: curl 7.52.1
[3/8] No update step for 'CURL'
[4/8] No patch step for 'CURL'
[5/8] Performing configure step for 'CURL'
FAILED: CURL-prefix/src/CURL-stamp/CURL-configure D:/3p-package-source/package-system/AWSNativeSDK/temp/build/Debug_Shared/external-build/CURL-prefix/src/CURL-stamp/CURL-configure
C:\Windows\system32\cmd.exe /C "cd /D D:\3p-package-source\package-system\AWSNativeSDK\temp\build\Debug_Shared\external-build\CURL-prefix\src\CURL-build && "C:\Program Files\CMake\bin\cmake.exe" -C D:/3p-package-source/package-system/AWSNativeSDK/temp/src/tools/android-build/CurlAndroidCrossCompile.cmake -DCMAKE_TOOLCHAIN_FILE=C:/Users/genewalt/AppData/Local/Android/Sdk/ndk/25.2.9519653/build/cmake/android.toolchain.cmake -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang -DANDROID_NATIVE_API_LEVEL=21 -DANDROID_ABI=arm64-v8a -DANDROID_TOOLCHAIN=clang -DANDROID_STL=c++_shared -DCMAKE_INSTALL_PREFIX=D:/3p-package-source/package-system/AWSNativeSDK/temp/build/Debug_Shared/external-install/curl "-DCMAKE_CXX_FLAGS=-Wno-unused-private-field -Wno-unused-value -fPIE" "-DCMAKE_C_FLAGS= -Wno-unused-value -fPIE" -DCMAKE_STATIC_LINKER_FLAGS= "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--build-id=sha1 -Wl,--no-rosegment -Wl,--fatal-warnings -Wl,--no-undefined -Qunused-arguments" "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--build-id=sha1 -Wl,--no-rosegment -Wl,--fatal-warnings -Wl,--no-undefined -Qunused-arguments -fPIE -pie" -DCMAKE_BUILD_TYPE=Debug -DOPENSSL_ROOT_DIR= -DOPENSSL_INCLUDE_DIR= -DCURL_STATICLIB=ON -DBUILD_CURL_EXE=ON -DBUILD_CURL_TESTS=OFF -DCURL_ZLIB=ON -GNinja -S D:/3p-package-source/package-system/AWSNativeSDK/temp/build/Debug_Shared/curl -B D:/3p-package-source/package-system/AWSNativeSDK/temp/build/Debug_Shared/external-build/CURL-prefix/src/CURL-build && "C:\Program Files\CMake\bin\cmake.exe" -E touch D:/3p-package-source/package-system/AWSNativeSDK/temp/build/Debug_Shared/external-build/CURL-prefix/src/CURL-stamp/CURL-configure"
loading initial cache file D:/3p-package-source/package-system/AWSNativeSDK/temp/src/tools/android-build/CurlAndroidCrossCompile.cmake
CMake Deprecation Warning at CMakeLists.txt:41 (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.
-- The C compiler identification is Clang 14.0.7
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Users/genewalt/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Warning at CMakeLists.txt:49 (message):
the curl cmake build system is poorly maintained. Be aware
-- curl version=[7.52.1-DEV]
-- Performing Test HAVE_SOCKADDR_IN6_SIN6_ADDR
-- Performing Test HAVE_SOCKADDR_IN6_SIN6_ADDR - Success
-- Performing Test HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
-- Performing Test HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID - Success
CMake Warning at CMakeLists.txt:224 (message):
Found no *nroff program
-- Looking for dlopen in dl;
-- Looking for dlopen in dl; - found
-- Looking for connect in socket;dl
-- Looking for connect in socket;dl - not found
-- Looking for gethostbyname in c
-- Looking for gethostbyname in c - found
-- Looking for gethostname
-- Looking for gethostname - found
-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_INCLUDE_DIR)
-- Looking for ldap_init in ldap;dl
-- Looking for ldap_init in ldap;dl - not found
-- Looking for ber_init in lber;dl
-- Looking for ber_init in lber;dl - not found
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.29/Modules/CheckIncludeFiles.cmake:116 (message):
Policy CMP0075 is not set: Include file check macros honor
CMAKE_REQUIRED_LIBRARIES. Run "cmake --help-policy CMP0075" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
CMAKE_REQUIRED_LIBRARIES is set to:
ssl;crypto
For compatibility with CMake 3.11 and below this check is ignoring it.
Call Stack (most recent call first):
CMake/Macros.cmake:21 (check_include_files)
CMakeLists.txt:377 (check_include_file_concat)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Looking for include file ldap.h
-- Looking for include file ldap.h - not found
-- Looking for include file lber.h
-- Looking for include file lber.h - not found
-- LDAP_H not found CURL_DISABLE_LDAP set ON
-- LDAP needs to be enabled to support LDAPS
-- Looking for idn2_lookup_ul in idn2;dl
-- Looking for idn2_lookup_ul in idn2;dl - not found
-- Looking for dlopen in dl
-- Looking for dlopen in dl - not found
-- Could NOT find LibSSH2 (missing: LIBSSH2_INCLUDE_DIR LIBSSH2_LIBRARY)
-- Performing Test USE_UNIX_SOCKETS
-- Performing Test USE_UNIX_SOCKETS - Failed
-- Looking for include file stdio.h
-- Looking for include file stdio.h - found
-- Looking for include files stdio.h, inttypes.h
-- Looking for include files stdio.h, inttypes.h - found
...
-- Looking for 48 include files stdio.h, ..., netinet/if_ether.h
-- Looking for 48 include files stdio.h, ..., netinet/if_ether.h - found
-- Looking for 50 include files stdio.h, ..., sockio.h
-- Looking for 50 include files stdio.h, ..., sockio.h - not found
-- Looking for 50 include files stdio.h, ..., sys/utsname.h
-- Looking for 50 include files stdio.h, ..., sys/utsname.h - found
-- Check size of size_t
-- Check size of size_t - failed
-- Check size of ssize_t
-- Check size of ssize_t - failed
-- Check size of long long
-- Check size of long long - failed
-- Check size of long
-- Check size of long - failed
-- Check size of short
-- Check size of short - failed
-- Check size of int
-- Check size of int - failed
-- Check size of __int64
-- Check size of __int64 - failed
...
-- Looking for setrlimit - not found
-- Looking for fcntl
-- Looking for fcntl - not found
-- Looking for ioctl
-- Looking for ioctl - not found
-- Looking for setsockopt
-- Looking for setsockopt - not found
-- Looking for inet_pton
-- Looking for inet_pton - not found
-- Looking for sigaction
-- Looking for sigaction - not found
-- Looking for sigsetjmp
-- Looking for sigsetjmp - not found
-- Performing Curl Test HAVE_FCNTL_O_NONBLOCK
-- Performing Curl Test HAVE_FCNTL_O_NONBLOCK - Failed
-- Performing Curl Test HAVE_IOCTLSOCKET
-- Performing Curl Test HAVE_IOCTLSOCKET - Failed
-- Performing Curl Test HAVE_IOCTLSOCKET_CAMEL
-- Performing Curl Test HAVE_IOCTLSOCKET_CAMEL - Failed
-- Performing Curl Test HAVE_IOCTLSOCKET_CAMEL_FIONBIO
-- Performing Curl Test HAVE_IOCTLSOCKET_CAMEL_FIONBIO - Failed
-- Performing Curl Test HAVE_IOCTLSOCKET_FIONBIO
-- Performing Curl Test HAVE_IOCTLSOCKET_FIONBIO - Failed
-- Performing Curl Test HAVE_IOCTL_FIONBIO
-- Performing Curl Test HAVE_IOCTL_FIONBIO - Failed
-- Performing Curl Test HAVE_IOCTL_SIOCGIFADDR
-- Performing Curl Test HAVE_IOCTL_SIOCGIFADDR - Failed
-- Performing Curl Test HAVE_SETSOCKOPT_SO_NONBLOCK
-- Performing Curl Test HAVE_SETSOCKOPT_SO_NONBLOCK - Failed
-- Performing Curl Test TIME_WITH_SYS_TIME
-- Performing Curl Test TIME_WITH_SYS_TIME - Failed
-- Performing Curl Test HAVE_O_NONBLOCK
-- Performing Curl Test HAVE_O_NONBLOCK - Failed
-- Performing Curl Test HAVE_GETHOSTBYADDR_R_5
-- Performing Curl Test HAVE_GETHOSTBYADDR_R_5 - Failed
-- Performing Curl Test HAVE_GETHOSTBYADDR_R_7
-- Performing Curl Test HAVE_GETHOSTBYADDR_R_7 - Failed
-- Performing Curl Test HAVE_GETHOSTBYADDR_R_8
-- Performing Curl Test HAVE_GETHOSTBYADDR_R_8 - Failed
-- Performing Curl Test HAVE_GETHOSTBYADDR_R_5_REENTRANT
-- Performing Curl Test HAVE_GETHOSTBYADDR_R_5_REENTRANT - Failed
-- Performing Curl Test HAVE_GETHOSTBYADDR_R_7_REENTRANT
-- Performing Curl Test HAVE_GETHOSTBYADDR_R_7_REENTRANT - Failed
-- Performing Curl Test HAVE_GETHOSTBYADDR_R_8_REENTRANT
-- Performing Curl Test HAVE_GETHOSTBYADDR_R_8_REENTRANT - Failed
-- Performing Curl Test HAVE_GETHOSTBYNAME_R_3
-- Performing Curl Test HAVE_GETHOSTBYNAME_R_3 - Failed
-- Performing Curl Test HAVE_GETHOSTBYNAME_R_5
-- Performing Curl Test HAVE_GETHOSTBYNAME_R_5 - Failed
-- Performing Curl Test HAVE_GETHOSTBYNAME_R_6
-- Performing Curl Test HAVE_GETHOSTBYNAME_R_6 - Failed
-- Performing Curl Test HAVE_GETHOSTBYNAME_R_3_REENTRANT
-- Performing Curl Test HAVE_GETHOSTBYNAME_R_3_REENTRANT - Failed
-- Performing Curl Test HAVE_GETHOSTBYNAME_R_5_REENTRANT
-- Performing Curl Test HAVE_GETHOSTBYNAME_R_5_REENTRANT - Failed
-- Performing Curl Test HAVE_GETHOSTBYNAME_R_6_REENTRANT
-- Performing Curl Test HAVE_GETHOSTBYNAME_R_6_REENTRANT - Failed
-- Performing Curl Test HAVE_SOCKLEN_T
-- Performing Curl Test HAVE_SOCKLEN_T - Failed
-- Performing Curl Test HAVE_IN_ADDR_T
-- Performing Curl Test HAVE_IN_ADDR_T - Failed
-- Performing Curl Test HAVE_BOOL_T
-- Performing Curl Test HAVE_BOOL_T - Failed
-- Performing Curl Test STDC_HEADERS
-- Performing Curl Test STDC_HEADERS - Failed
-- Performing Curl Test RETSIGTYPE_TEST
-- Performing Curl Test RETSIGTYPE_TEST - Failed
-- Performing Curl Test HAVE_INET_NTOA_R_DECL
-- Performing Curl Test HAVE_INET_NTOA_R_DECL - Failed
-- Performing Curl Test HAVE_INET_NTOA_R_DECL_REENTRANT
-- Performing Curl Test HAVE_INET_NTOA_R_DECL_REENTRANT - Failed
-- Performing Curl Test HAVE_FILE_OFFSET_BITS
-- Performing Curl Test HAVE_FILE_OFFSET_BITS - Failed
-- Check size of off_t
-- Check size of off_t - failed
-- Performing Curl Test HAVE_GLIBC_STRERROR_R
-- Performing Curl Test HAVE_GLIBC_STRERROR_R - Failed
-- Performing Curl Test HAVE_POSIX_STRERROR_R
-- Performing Curl Test HAVE_POSIX_STRERROR_R - Failed
-- Performing Test curl_cv_recv
-- Performing Test curl_cv_recv - Failed
CMake Error at CMake/OtherTests.cmake:86 (message):
Unable to link function recv
Call Stack (most recent call first):
CMakeLists.txt:1012 (include)
-- Configuring incomplete, errors occurred!
ninja: build stopped: subcommand failed.
CMake Error at cmake/build_external.cmake:148 (message):
Failed to build dependency libraries.
Call Stack (most recent call first):
CMakeLists.txt:202 (include)
Reproduction Steps
- Build AWS SDK 1.11.337 for Android using Android NDK 25.2.9519653 (or higher) cmake 3.29
cmake -S %SRC_PATH% -B %BLD_PATH%\Debug_Shared ^
-G Ninja ^
-DNDK_DIR="%ANDROID_NDK_ROOT%" ^
-DBUILD_SHARED_LIBS=ON ^
-DCMAKE_BUILD_TYPE="Debug ^
-DTARGET_ARCH=ANDROID ^
-DANDROID_NATIVE_API_LEVEL=21 ^
-DANDROID_ABI=arm64-v8a ^
-DCPP_STANDARD=17 ^
-DCMAKE_C_FLAGS="-fPIC" ^
-DCMAKE_CXX_FLAGS="-fPIC" ^
-DBUILD_ONLY="access-management;bedrock-runtime;cognito-identity;cognito-idp;core;devicefarm;dynamodb;gamelift;identity-management;kinesis;lambda;queues;s3;sns;sqs;sts;transfer" ^
-DENABLE_TESTING=OFF ^
-DENABLE_RTTI=ON ^
-DCUSTOM_MEMORY_MANAGEMENT=ON^
-DCMAKE_INSTALL_BINDIR="bin/%BUILD_TYPE%_%LIB_TYPE%" ^
-DCMAKE_INSTALL_LIBDIR="lib/%BUILD_TYPE%_%LIB_TYPE%" ^
-DCMAKE_INSTALL_PREFIX="%BLD_PATH%/%BUILD_TYPE%_%LIB_TYPE%" ^
-DANDROID_BUILD_OPENSSL=ON ^
-DANDROID_BUILD_ZLIB=OFF ^
-DANDROID_BUILD_CURL=ON ^
-DCMAKE_MODULE_PATH="%DOWNLOADED_PACKAGE_FOLDERS%" ^
Possible Solution
No response
Additional Information/Context
This PR removed the ANDROID_BUILD_OPENSSL flag, but the readme still says it’s available. Is there a replacement?
AWS CPP SDK version used
1.11.337
Compiler and Version used
clang++ Android (9352603, based on r450784d1) clang version 14.0.7
Operating System and version
Windows 10 Enterprise
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 21 (9 by maintainers)
Commits related to this issue
- AWSSDK 361 fixes windows and android bug. (see https://github.com/aws/aws-sdk-cpp/issues/3001 and https://github.com/aws/aws-sdk-cpp/issues/3014) Signed-off-by: AMZN-Gene <genewalt@amazon.com> — committed to aws-lumberyard-dev/3p-package-source by AMZN-Gene 2 years ago
- AWS SDK Update to Pass Apple AppStore Submission (#256) - Upgrading the AWS SDK 11.361 with AWS_APPSTORE_SAFE flag - 1.11.361 also contains this fix: [Visual Studio 2022 STD::Allocator Warning Tr... — committed to o3de/3p-package-source by AMZN-Gene 2 years ago
alright replicated with the dockerfils
looking into fixes