aws / aws-sdk-cpp

AWS SDK for C++
Apache License 2.0
1.91k stars 1.04k forks source link

FreeBSD: Fails to build; "no viable conversion from 'ByteCursor' (aka 'aws_byte_cursor') to 'All" #3012

Closed nunotexbsd closed 2 days ago

nunotexbsd commented 5 days ago

Describe the bug

After upgrading dependencies to latest versions:

aws-c-common: Update to 0.9.23 aws-crt-cpp: Update to 0.27.0 aws-c-cal: Update to 0.7.0

[ 51% 463/879] /usr/bin/c++ -DAWS_AUTH_USE_IMPORT_EXPORT -DAWS_CAL_USE_IMPORT_EXPORT -DAWS_CHECKSUMS_USE_IMPORT_EXPORT -DAWS_COMMON_USE_IMPORT_EXPORT -DAWS_COMPRESSION_USE_IMPORT_EXPORT -DAWS_CRT_CPP_USE_IMPORT_E
XPORT -DAWS_EVENT_STREAM_USE_IMPORT_EXPORT -DAWS_HAS_ALIGNED_ALLOC -DAWS_HTTP_USE_IMPORT_EXPORT -DAWS_IO_USE_IMPORT_EXPORT -DAWS_MQTT_USE_IMPORT_EXPORT -DAWS_S3_USE_IMPORT_EXPORT -DAWS_SDKUTILS_USE_IMPORT_EXPORT
-DAWS_SDK_VERSION_MAJOR=1 -DAWS_SDK_VERSION_MINOR=11 -DAWS_SDK_VERSION_PATCH=353 -DAWS_TEST_REGION=US_EAST_1 -DAWS_USE_KQUEUE -DCURL_HAS_H2 -DCURL_HAS_TLS_PROXY -DENABLED_REQUEST_COMPRESSION -DENABLED_ZLIB_REQUES
T_COMPRESSION -DENABLE_CURL_CLIENT -DENABLE_CURL_LOGGING -DENFORCE_TLS_V1_2 -DHAS_PATHCONF -DHAS_UMASK -DPLATFORM_LINUX -DSMITHY_EXPORTS=1 -DUSE_IMPORT_EXPORT=1 -Daws_cpp_sdk_core_EXPORTS -I/wrkdirs/usr/ports/dev
el/aws-sdk-cpp/work/aws-sdk-cpp-1.11.353/src/aws-cpp-sdk-core/include/aws/core/platform/refs -I/wrkdirs/usr/ports/devel/aws-sdk-cpp/work/aws-sdk-cpp-1.11.353/src/aws-cpp-sdk-core/include -O2 -pipe -fstack-protect
or-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include  -DNDEBUG -
fPIC -fno-exceptions -std=c++11 -Wall -pedantic -Wextra -fPIC -MD -MT src/aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/source/utils/crypto/factory/Factories.cpp.o -MF src/aws-cpp-sdk-core/CMakeFiles/aws-cpp-s
dk-core.dir/source/utils/crypto/factory/Factories.cpp.o.d -o src/aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/source/utils/crypto/factory/Factories.cpp.o -c /wrkdirs/usr/ports/devel/aws-sdk-cpp/work/aws-sdk-c
pp-1.11.353/src/aws-cpp-sdk-core/source/utils/crypto/factory/Factories.cpp
FAILED: src/aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/source/utils/crypto/factory/Factories.cpp.o
/usr/bin/c++ -DAWS_AUTH_USE_IMPORT_EXPORT -DAWS_CAL_USE_IMPORT_EXPORT -DAWS_CHECKSUMS_USE_IMPORT_EXPORT -DAWS_COMMON_USE_IMPORT_EXPORT -DAWS_COMPRESSION_USE_IMPORT_EXPORT -DAWS_CRT_CPP_USE_IMPORT_EXPORT -DAWS_EVE
NT_STREAM_USE_IMPORT_EXPORT -DAWS_HAS_ALIGNED_ALLOC -DAWS_HTTP_USE_IMPORT_EXPORT -DAWS_IO_USE_IMPORT_EXPORT -DAWS_MQTT_USE_IMPORT_EXPORT -DAWS_S3_USE_IMPORT_EXPORT -DAWS_SDKUTILS_USE_IMPORT_EXPORT -DAWS_SDK_VERSI
ON_MAJOR=1 -DAWS_SDK_VERSION_MINOR=11 -DAWS_SDK_VERSION_PATCH=353 -DAWS_TEST_REGION=US_EAST_1 -DAWS_USE_KQUEUE -DCURL_HAS_H2 -DCURL_HAS_TLS_PROXY -DENABLED_REQUEST_COMPRESSION -DENABLED_ZLIB_REQUEST_COMPRESSION -
DENABLE_CURL_CLIENT -DENABLE_CURL_LOGGING -DENFORCE_TLS_V1_2 -DHAS_PATHCONF -DHAS_UMASK -DPLATFORM_LINUX -DSMITHY_EXPORTS=1 -DUSE_IMPORT_EXPORT=1 -Daws_cpp_sdk_core_EXPORTS -I/wrkdirs/usr/ports/devel/aws-sdk-cpp/
work/aws-sdk-cpp-1.11.353/src/aws-cpp-sdk-core/include/aws/core/platform/refs -I/wrkdirs/usr/ports/devel/aws-sdk-cpp/work/aws-sdk-cpp-1.11.353/src/aws-cpp-sdk-core/include -O2 -pipe -fstack-protector-strong -isys
tem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include  -DNDEBUG -fPIC -fno-excep
tions -std=c++11 -Wall -pedantic -Wextra -fPIC -MD -MT src/aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/source/utils/crypto/factory/Factories.cpp.o -MF src/aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/sou
rce/utils/crypto/factory/Factories.cpp.o.d -o src/aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/source/utils/crypto/factory/Factories.cpp.o -c /wrkdirs/usr/ports/devel/aws-sdk-cpp/work/aws-sdk-cpp-1.11.353/src
/aws-cpp-sdk-core/source/utils/crypto/factory/Factories.cpp
/wrkdirs/usr/ports/devel/aws-sdk-cpp/work/aws-sdk-cpp-1.11.353/src/aws-cpp-sdk-core/source/utils/crypto/factory/Factories.cpp:379:229: error: no viable conversion from 'ByteCursor' (aka 'aws_byte_cursor') to 'All
ocator *' (aka 'aws_allocator *')
  379 |             return Aws::MakeShared<CRTSymmetricCipher>(s_allocationTag, Aws::Crt::Crypto::SymmetricCipher::CreateAES_256_GCM_Cipher(keyCur, Aws::Crt::Optional<Aws::Crt::ByteCursor>(), Aws::Crt::Optional<A
ws::Crt::ByteCursor>(), aadCur));
      |
                        ^~~~~~
/usr/local/include/aws/crt/crypto/SymmetricCipher.h:64:32: note: passing argument to parameter 'allocator' here
   64 |                     Allocator *allocator = ApiAllocator()) noexcept;
      |                                ^
/wrkdirs/usr/ports/devel/aws-sdk-cpp/work/aws-sdk-cpp-1.11.353/src/aws-cpp-sdk-core/source/utils/crypto/factory/Factories.cpp:401:152: error: no viable conversion from 'Aws::Crt::Optional<Aws::Crt::ByteCursor>' (
aka 'Optional<aws_byte_cursor>') to 'Allocator *' (aka 'aws_allocator *')
  401 |         return Aws::MakeShared<CRTSymmetricCipher>(s_allocationTag, Aws::Crt::Crypto::SymmetricCipher::CreateAES_256_GCM_Cipher(keyCur, ivCur, tagCur, aadCur));
      |                                                                                                                                                        ^~~~~~
/usr/local/include/aws/crt/crypto/SymmetricCipher.h:64:32: note: passing argument to parameter 'allocator' here
   64 |                     Allocator *allocator = ApiAllocator()) noexcept;
      |                                ^
2 errors generated.

Expected Behavior

Compile OK

Current Behavior

Fails to compile

Reproduction Steps

FreeBSD Ports Collection: cd /usr/ports/devel/aws-sdk-cpp && make

Possible Solution

No response

Additional Information/Context

No response

AWS CPP SDK version used

1.11.353

Compiler and Version used

Clang 18.1.6

Operating System and version

FreeBSD 15

DmitriyMusatkin commented 5 days ago

Crt had to make a minor backwards incompat change in the latest rev in 0.27.0 (since the bump from 0.26.x). cpp should pick it up early this week and resolve the issue.

github-actions[bot] commented 2 days 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.