aws-sdk-cpp icon indicating copy to clipboard operation
aws-sdk-cpp copied to clipboard

git clone fails on tags/1.11.215

Open aijunpeng opened this issue 1 year ago • 4 comments

Describe the bug

Hi there, I have a Dockerfile that runs the following git clone command.

RUN git clone --recurse-submodules https://github.com/aws/aws-sdk-cpp.git && cd aws-sdk-cpp && git checkout tags/1.11.215 && \
    mkdir build && cd build && \
    cmake  -DMINIMIZE_SIZE=TRUE -DENABLE_TESTING=FALSE -DBUILD_ONLY="kinesis;logs" -DCPP_STANDARD=11 -DCMAKE_BUILD_TYPE=Release .. && \
    make -j2 && \
    make install && \
    rm -rf aws-sdk-cpp

The command has started to fail last week, throwing the following error. The command had always worked before last week. We also tried the latest version tags/1.11.582 and it works fine. There seems to be an issue with tags/1.11.215. Could you please help look into this? Thank you!

236.2 make[2]: *** [src/aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/build.make:1120: src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so] Error 1
236.2 make[1]: *** [CMakeFiles/Makefile2:862: src/aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/all] Error 2
236.2 make: *** [Makefile:136: all] Error 2
------
Dockerfile:231
--------------------
 230 |     RUN sh -c 'echo "Start installing aws-sdk-cpp"'
 231 | >>> RUN git clone --recurse-submodules https://github.com/aws/aws-sdk-cpp.git && cd aws-sdk-cpp && git checkout tags/1.11.215 && \
 232 | >>>     mkdir build && cd build && \
 233 | >>>     cmake  -DMINIMIZE_SIZE=TRUE -DENABLE_TESTING=FALSE -DBUILD_ONLY="kinesis;logs" -DCPP_STANDARD=11 -DCMAKE_BUILD_TYPE=Release .. && \
 234 | >>>     make -j2 && \
 235 | >>>     make install && \
 236 | >>>     rm -rf aws-sdk-cpp
 237 |     RUN sh -c 'echo "End installing aws-sdk-cpp"'
--------------------
ERROR: failed to solve: process "/bin/sh -c git clone --recurse-submodules https://github.com/aws/aws-sdk-cpp.git && cd aws-sdk-cpp && git checkout tags/1.11.215 &&     mkdir build && cd build &&     cmake  -DMINIMIZE_SIZE=TRUE -DENABLE_TESTING=FALSE -DBUILD_ONLY=\"kinesis;logs\" -DCPP_STANDARD=11 -DCMAKE_BUILD_TYPE=Release .. &&     make -j2 &&     make install &&     rm -rf aws-sdk-cpp" did not complete successfully: exit code: 2

Regression Issue

  • [ ] Select this option if this issue appears to be a regression.

Expected Behavior

Expect the git command to clone tags/1.11.215 successfully

RUN git clone --recurse-submodules https://github.com/aws/aws-sdk-cpp.git && cd aws-sdk-cpp && git checkout tags/1.11.215 && \
    mkdir build && cd build && \
    cmake  -DMINIMIZE_SIZE=TRUE -DENABLE_TESTING=FALSE -DBUILD_ONLY="kinesis;logs" -DCPP_STANDARD=11 -DCMAKE_BUILD_TYPE=Release .. && \
    make -j2 && \
    make install && \
    rm -rf aws-sdk-cpp

Current Behavior

The git command errors out and fails to clone the repository with tags/1.11.215

Reproduction Steps

Run the command RUN git clone --recurse-submodules https://github.com/aws/aws-sdk-cpp.git && cd aws-sdk-cpp && git checkout tags/1.11.215

Possible Solution

No response

Additional Information/Context

No response

AWS CPP SDK version used

tags/1.11.215

Compiler and Version used

GNU 13.3

Operating System and version

Ubuntu 24

aijunpeng avatar Jun 09 '25 20:06 aijunpeng

this is because you are running git checkout tags/1.11.215 without the --recurse-submodules submodules tag. This means that you are cloning main the checking out the branch for the sdk at 1.11.2.15 but not checking out the correct submodules tags. a dockerfile like this will work.

FROM public.ecr.aws/ubuntu/ubuntu:24.04
RUN apt update
RUN apt install build-essential -y
RUN apt install git cmake libcurl4-openssl-dev libssl-dev zlib1g-dev -y

RUN git clone --recurse-submodules https://github.com/aws/aws-sdk-cpp && \
    cd aws-sdk-cpp && \
    git checkout --recurse-submodules tags/1.11.215 && \
    mkdir build && \
    cd build && \
    cmake  -DMINIMIZE_SIZE=TRUE \
        -DENABLE_TESTING=FALSE \
        -DBUILD_ONLY="kinesis;logs" \
        -DCPP_STANDARD=11 \
        -DCMAKE_BUILD_TYPE=Release .. && \
    cmake --build . && \
    cmake --install .

sbiscigl avatar Jun 10 '25 14:06 sbiscigl

Thank you for the quick response. I will try it out and let you know how it goes.

aijunpeng avatar Jun 10 '25 15:06 aijunpeng

The new command works now. Thanks for the quick help!

aijunpeng avatar Jun 12 '25 15:06 aijunpeng

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.

github-actions[bot] avatar Jun 12 '25 15:06 github-actions[bot]