[MDEV-24648] Cannot build aws-key-management plugin Created: 2021-01-22  Updated: 2021-03-22  Resolved: 2021-03-22

Status: Closed
Project: MariaDB Server
Component/s: Plugin - AWS key management
Affects Version/s: 10.4.17
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Stephen Hames Assignee: Daniel Black
Resolution: Incomplete Votes: 0
Labels: need_feedback
Environment:

CentOS Linux 7



 Description   

Until MariaDB 10.4.15, we have been able to compile the AWS key management plugin in our build process, without issue.

However when trying on 10.4.17, we observed that the build now fails on the key management plugin with a compilation error.

After doing a bit of digging. It looks like the failure is related to the change made in MDEV-23539.

The addition of this snippet to plugin/aws_key_management/aws_key_management_plugin.cc appears to be incompatible with AWS SDK version 1.0.8, which is the version configured to use when the cmake version is below version 3.0

virtual void Flush(void) override
{
}

If I attempt to upgrade to cmake3 and run the build again, it then fails on the key management plugin with the below error.

[ 88%] Building CXX object aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/source/utils/event/EventStreamErrors.cpp.o
In file included from /build/extra/aws_sdk/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/event/EventStreamErrors.cpp:5:0:
/build/extra/aws_sdk/aws-sdk-cpp/aws-cpp-sdk-core/include/aws/core/client/AWSError.h:59:13: error: unused parameter 'rhs' [-Werror=unused-parameter]
             AWSError(AWSError&& rhs) = default;
             ^
/build/extra/aws_sdk/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/event/EventStreamErrors.cpp: In function 'Aws::Client::AWSError<Aws::Client::CoreErrors> Aws::Utils::Event::EventStreamErrorsMapper::GetAwsErrorForEventStreamError(Aws::Utils::Event::EventStreamErrors)':
/build/extra/aws_sdk/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/event/EventStreamErrors.cpp:61:103: note: synthesized method 'Aws::Client::AWSError<ERROR_TYPE>::AWSError(Aws::Client::AWSError<ERROR_TYPE>&&) [with ERROR_TYPE = Aws::Client::CoreErrors]' first required here 
                     return AWSError<CoreErrors>(CoreErrors::UNKNOWN, GetNameForError(error), "", false);
                                                                                                       ^
cc1plus: all warnings being treated as errors
make[5]: *** [aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/source/utils/event/EventStreamErrors.cpp.o] Error 1
make[4]: *** [aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [extra/aws_sdk/aws_sdk_cpp-prefix/src/aws_sdk_cpp-stamp/aws_sdk_cpp-build] Error 2
make[1]: *** [extra/aws_sdk/CMakeFiles/aws_sdk_cpp.dir/all] Error 2
make: *** [all] Error 2

For now, I worked around this by removing the snippet added above, prior to build, and proceeding with the build using cmake2.

Appreciate any guidance if I need to be looking at other changes on my build environment or a more permanent fix.

Thanks



 Comments   
Comment by Daniel Black [ 2021-01-22 ]

Does a more recent version of aws_sdk fix this issue in their code? e.g. by changing GIT_TAG "1.8.29" to 1.8.128 (from https://github.com/aws/aws-sdk-cpp/releases)?

Comment by Daniel Black [ 2021-01-22 ]

And/or does putting `if AWS_SDK_VERSION_STRING=="1.0.8"` around the `Flush` method for cmake2 compiles

ref: https://github.com/aws/aws-sdk-cpp/blob/1.0.8/aws-cpp-sdk-core/include/aws/core/VersionConfig.h

Generated at Thu Feb 08 09:31:35 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.