Issue
I am trying to install aws gamekit (https://github.com/aws/aws-gamekit/tree/main) on an Ubuntu machine. Have been modifying the code and installation steps where needed but can't seem to get past this. Everytime I run the script to build gamekit, I get the error that there is no matching function for call to ‘Aws::S3::S3Client::S3Client(Aws::Auth::AWSCredentials&, Aws::Client::ClientConfiguration&)’
Here is the code block from the file default_clients.h.
class DefaultClients
{
private:
template <class T>
static inline T* getDefaultClient(const AccountCredentialsCopy& credentials)
{
Aws::Client::ClientConfiguration clientConfig;
Aws::Auth::AWSCredentials creds;
clientConfig.region = credentials.region.c_str();
creds.SetAWSAccessKeyId(credentials.accessKey.c_str());
creds.SetAWSSecretKey(credentials.accessSecret.c_str());
return new T(creds, clientConfig);
}
public:
static inline Aws::S3::S3Client* GetDefaultS3Client(const AccountCredentialsCopy& credentials)
{
return getDefaultClient<Aws::S3::S3Client>(credentials);
}
I believe there must be some issue on how I am accessing API, or perhaps a version mismatch
This is the output on the terminal when I run my build scripts.
INFO:root:Running command: ['make'] from directory: /home/red/development/gamekit-ubuntu/aws-gamekit
In file included from /home/red/development/gamekit-ubuntu/aws-gamekit/aws-gamekit-core/include/aws/gamekit/core/utils/sts_utils.h:13,
from /home/red/development/gamekit-ubuntu/aws-gamekit/aws-gamekit-core/source/aws/gamekit/core/utils/sts_utils.cpp:5,
from /home/red/development/gamekit-ubuntu/aws-gamekit/aws-gamekit-core/CMakeFiles/aws-gamekit-core.dir/Unity/unity_2_cxx.cxx:3:
/home/red/development/gamekit-ubuntu/aws-gamekit/aws-gamekit-core/include/aws/gamekit/core/awsclients/default_clients.h: In instantiation of ‘static T* GameKit::DefaultClients::getDefaultClient(const GameKit::AccountCredentialsCopy&) [with T = Aws::S3::S3Client]’:
/home/red/development/gamekit-ubuntu/aws-gamekit/aws-gamekit-core/include/aws/gamekit/core/awsclients/default_clients.h:52:55: required from here
/home/red/development/gamekit-ubuntu/aws-gamekit/aws-gamekit-core/include/aws/gamekit/core/awsclients/default_clients.h:46:20: error: no matching function for call to ‘Aws::S3::S3Client::S3Client(Aws::Auth::AWSCredentials&, Aws::Client::ClientConfiguration&)’
46 | return new T(creds, clientConfig);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
I am on an EC2 Ubuntu instance.
Solution
The latest C++ SDK doesn't have that constructor:
It does seem to be present in the 1.9 releases though:
Looks like the C++ SDK's API has changed but gamekit hasn't been updated to match.
Answered By - Alan Birtles Answer Checked By - Pedro (WPSolving Volunteer)