aws/aws-sdk-cpp

fail to compile the source code (tag: 1.11.227)

cnut opened this issue · 2 comments

cnut commented

Describe the bug

fail to compile the source code on Amazon Linux.

Expected Behavior

pass the compile

Current Behavior

$ cmake ../ -DCMAKE_BUILD_TYPE=Release  -DCMAKE_PREFIX_PATH=/usr/local/ -DCMAKE_INSTALL_PREFIX=/usr/local/
$ make -j8
...
In file included from /home/ec2-user/aws-sdk-cpp/build/src/aws-cpp-sdk-core/ub_core.cpp:9:
/home/ec2-user/aws-sdk-cpp/src/aws-cpp-sdk-core/source/auth/signer-provider/AWSAuthSignerProviderBase.cpp:10:41: error: no declaration matches ‘std::shared_ptr<Aws::Auth::AWSCredentialsProvider> Aws::Auth::AWSAuthSignerProvider::GetCredentialsProvider() const’
   10 | std::shared_ptr<AWSCredentialsProvider> AWSAuthSignerProvider::GetCredentialsProvider() const {
      |                                         ^~~~~~~~~~~~~~~~~~~~~
/home/ec2-user/aws-sdk-cpp/src/aws-cpp-sdk-core/source/auth/signer-provider/AWSAuthSignerProviderBase.cpp:10:41: note: no functions named ‘std::shared_ptr<Aws::Auth::AWSCredentialsProvider> Aws::Auth::AWSAuthSignerProvider::GetCredentialsProvider() const’
In file included from /home/ec2-user/aws-sdk-cpp/src/aws-cpp-sdk-core/source/auth/signer-provider/AWSAuthSignerProviderBase.cpp:5,
                 from /home/ec2-user/aws-sdk-cpp/build/src/aws-cpp-sdk-core/ub_core.cpp:9:
/home/ec2-user/aws-sdk-cpp/src/aws-cpp-sdk-core/include/aws/core/auth/signer-provider/AWSAuthSignerProviderBase.h:25:28: note: ‘class Aws::Auth::AWSAuthSignerProvider’ defined here
   25 |         class AWS_CORE_API AWSAuthSignerProvider
      |                            ^~~~~~~~~~~~~~~~~~~~~
make[2]: *** [src/aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/build.make:77: src/aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/ub_core.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:877: src/aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

fail to compile

Reproduction Steps

# get the source code
$ mkdir build && cd build
$ cmake ../ -DCMAKE_BUILD_TYPE=Release  -DCMAKE_PREFIX_PATH=/usr/local/ -DCMAKE_INSTALL_PREFIX=/usr/local/
$ make -j8

Possible Solution

No response

Additional Information/Context

No response

AWS CPP SDK version used

1.11.227

Compiler and Version used

gcc 11.4.1 20230605

Operating System and version

Amazon Linux

I can successfully build the SDK at HEAD (1.11.231) on amazon linux using the following dockerfile

FROM public.ecr.aws/amazonlinux/amazonlinux:2023
RUN yum groupinstall "Development Tools" -y
RUN yum install -y curl-devel openssl-devel ninja-build cmake3
RUN git clone --recurse-submodules https://github.com/aws/aws-sdk-cpp && \
    cd aws-sdk-cpp && \
    mkdir build && \
    cd build && \
    cmake ../ -DCMAKE_BUILD_TYPE=Release && \
    cmake --build . && \
    cmake --install .

additionally we run daily builds to make sure amazon linux does not break.

I think this may be a issue with your workspace. the error your are specifically running into

/home/ec2-user/aws-sdk-cpp/src/aws-cpp-sdk-core/source/auth/signer-provider/AWSAuthSignerProviderBase.cpp:10:41: error: no declaration matches ‘std::shared_ptr<Aws::Auth::AWSCredentialsProvider> Aws::Auth::AWSAuthSignerProvider::GetCredentialsProvider() const’
   10 | std::shared_ptr<AWSCredentialsProvider> AWSAuthSignerProvider::GetCredentialsProvider() const {

to me indicates that somehow you have somehow partially consumed this commit. I would suggest cleaning your workspace and retrying the build. In a clean workspace we are seeing it work as expected.

Greetings! It looks like this issue hasn’t been active in longer than a week. We encourage you to check if this is still an issue in the latest release. Because it has been longer than a week since the last update on this, and in the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or add an upvote to prevent automatic closure, or if the issue is already closed, please feel free to open a new one.