Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IAMClient::GetServiceName invalid during Cmake #2851

Closed
largisundavan opened this issue Feb 9, 2024 · 3 comments
Closed

IAMClient::GetServiceName invalid during Cmake #2851

largisundavan opened this issue Feb 9, 2024 · 3 comments
Labels
bug This issue is a bug. p3 This is a minor priority issue pending-release This issue will be fixed by an approved PR that hasn't been released yet.

Comments

@largisundavan
Copy link

Describe the bug

When attempting to cmake the AWS files (macOS, Sonoma) to call Lambda functions, I get 2 errors from IAMClient saying it can't find the function GetServiceName.

Expected Behavior

When building the project, I expected all of the objects and libraries to build correctly. This error is seen when using cmake or make and needing the IAMClient, such as the command I used: cmake ../aws-sdk-cpp -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/usr/local/ -DCMAKE_INSTALL_PREFIX=/usr/local/ -DBUILD_ONLY="s3;core;lambda"

Current Behavior

[ 78%] Building CXX object generated/src/aws-cpp-sdk-iam/CMakeFiles/aws-cpp-sdk-iam.dir/ub_IAM.cpp.o
In file included from /Users/jasonbuzzell/sdk_build/generated/src/aws-cpp-sdk-iam/ub_IAM.cpp:324:
In file included from /Users/jasonbuzzell/aws-sdk-cpp/generated/src/aws-cpp-sdk-iam/source/IAMClient.cpp:21:
In file included from /Users/jasonbuzzell/aws-sdk-cpp/generated/src/aws-cpp-sdk-iam/include/aws/iam/IAMClient.h:11:
/Users/jasonbuzzell/aws-sdk-cpp/src/aws-cpp-sdk-core/include/aws/core/client/AWSClientAsyncCRTP.h:50:81: error: no member named 'GetServiceName' in 'Aws::IAM::IAMClient'
            Aws::Utils::ComponentRegistry::RegisterComponent(AwsServiceClientT::GetServiceName(),
                                                                                ^
/Users/jasonbuzzell/aws-sdk-cpp/generated/src/aws-cpp-sdk-iam/source/IAMClient.cpp:201:12: note: in instantiation of member function 'Aws::Client::ClientWithAsyncTemplateMethods<Aws::IAM::IAMClient>::ClientWithAsyncTemplateMethods' requested here
IAMClient::IAMClient(const IAM::IAMClientConfiguration& clientConfiguration,
           ^
In file included from /Users/jasonbuzzell/sdk_build/generated/src/aws-cpp-sdk-iam/ub_IAM.cpp:324:
In file included from /Users/jasonbuzzell/aws-sdk-cpp/generated/src/aws-cpp-sdk-iam/source/IAMClient.cpp:21:
In file included from /Users/jasonbuzzell/aws-sdk-cpp/generated/src/aws-cpp-sdk-iam/include/aws/iam/IAMClient.h:11:
/Users/jasonbuzzell/aws-sdk-cpp/src/aws-cpp-sdk-core/include/aws/core/client/AWSClientAsyncCRTP.h:91:46: error: no member named 'GetServiceName' in 'Aws::IAM::IAMClient'
            AWS_CHECK_PTR(AwsServiceClientT::GetServiceName(), pClient);
                          ~~~~~~~~~~~~~~~~~~~^
/Users/jasonbuzzell/aws-sdk-cpp/src/aws-cpp-sdk-core/include/aws/core/utils/logging/ErrorMacros.h:38:25: note: expanded from macro 'AWS_CHECK_PTR'
    AWS_LOGSTREAM_FATAL(LOG_TAG, "Unexpected nullptr: " #PTR); \
                        ^~~~~~~
/Users/jasonbuzzell/aws-sdk-cpp/src/aws-cpp-sdk-core/include/aws/core/utils/logging/LogMacros.h:79:109: note: expanded from macro 'AWS_LOGSTREAM_FATAL'
    #define AWS_LOGSTREAM_FATAL(tag, streamExpression)  AWS_LOGSTREAM(Aws::Utils::Logging::LogLevel::Fatal, tag, streamExpression)
                                                                                                            ^~~
/Users/jasonbuzzell/aws-sdk-cpp/src/aws-cpp-sdk-core/include/aws/core/utils/logging/LogMacros.h:75:46: note: expanded from macro 'AWS_LOGSTREAM'
                logSystem->LogStream( level, tag, logStream ); \
                                             ^~~
/Users/jasonbuzzell/aws-sdk-cpp/generated/src/aws-cpp-sdk-iam/source/IAMClient.cpp:296:3: note: in instantiation of member function 'Aws::Client::ClientWithAsyncTemplateMethods<Aws::IAM::IAMClient>::ShutdownSdkClient' requested here
  ShutdownSdkClient(this, -1);

Reproduction Steps

On macOS (hopefully not just Sonoma), following the standard guide: https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/setup-linux.html

git clone --recurse-submodules https://github.com/aws/aws-sdk-cpp
mkdir sdk_build
cd sdk_build
cmake ../aws-sdk-cpp -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/usr/local/ -DCMAKE_INSTALL_PREFIX=/usr/local/ -DBUILD_ONLY="s3;core;lambda;iam"

Possible Solution

No response

Additional Information/Context

No response

AWS CPP SDK version used

0.24.11

Compiler and Version used

N/A

Operating System and version

macOS Sonoma 14.1.2

@largisundavan largisundavan added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 9, 2024
@SergeyRyabinin
Copy link
Contributor

Hi, please use the latest tagged release: https://github.com/aws/aws-sdk-cpp/tree/1.11.261

The issue you are observing will be fixed in a next release tomorrow by a code re-generation.

Best regards,
Sergey

@jmklix jmklix added pending-release This issue will be fixed by an approved PR that hasn't been released yet. p3 This is a minor priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Feb 9, 2024
@SergeyRyabinin
Copy link
Contributor

It should be build-able now from main too. Please sorry from the inconvenience.

"The latest released tag version" should be considered as last official stable released version.
I agree that we must not break build on HEAD main too.

Copy link

github-actions bot commented Feb 9, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p3 This is a minor priority issue pending-release This issue will be fixed by an approved PR that hasn't been released yet.
Projects
None yet
Development

No branches or pull requests

3 participants