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

Release code without submodules code #3249

Open
1 task
Allius27 opened this issue Jan 15, 2025 · 1 comment
Open
1 task

Release code without submodules code #3249

Allius27 opened this issue Jan 15, 2025 · 1 comment
Labels
build-problem problems with building this sdk response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days.

Comments

@Allius27
Copy link

Allius27 commented Jan 15, 2025

Describe the bug

If you upload a release version of the SDK and try to build it, that will fail, because of empty submodule directory

Regression Issue

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

Expected Behavior

Successful build from release archive

Current Behavior

Failed build

Reproduction Steps

wget https://github.com/aws/aws-sdk-cpp/archive/refs/tags/1.11.485.zip
unzip 1.11.485.zip
cd aws-sdk-cpp-1.11.485/
mkdir build && cd build
cmake ..

output

CMake Warning at CMakeLists.txt:9 (message):
  In 1.11 releases, we are releasing experimental alternative building
  mode.By setting -DLEGACY_BUILD=OFF you can test our advances in modern
  CMake building and provide early feedback.  The legacy support is set by
  default in 1.11, when you complete build updating scripts please update the
  build flags as mentioned in README.md and set -DLEGACY_BUILD=OFF.  The
  legacy support will be removed at 1.12.0 release.


-- TARGET_ARCH not specified; inferring host OS to be platform compilation target
-- Building AWS libraries as shared objects
-- Generating linux build config
-- Building project version: 1.11.485
-- The CXX compiler identification is GNU 9.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Python3: /usr/bin/python3.8 (found version "3.8.10") found components:  Interpreter Development 
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") 
--   Zlib library: /usr/lib/x86_64-linux-gnu/libz.so
-- Http client: Curl
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.68.0")  
--   Curl include directory: /usr/include/x86_64-linux-gnu
--   Curl target link: /usr/lib/x86_64-linux-gnu/libcurl.so
-- Performing Test HAVE_ATOMICS_WITHOUT_LIBATOMIC
-- Performing Test HAVE_ATOMICS_WITHOUT_LIBATOMIC - Success
CMake Error at CMakeLists.txt:225 (include):
  include could not find load file:

    AwsFindPackage


CMake Error at CMakeLists.txt:236 (add_subdirectory):
  The source directory

    /home/i123/aws-sdk-cpp-1.11.485/crt/aws-crt-cpp

  does not contain a CMakeLists.txt file.


CMake Error at CMakeLists.txt:250 (aws_use_package):
  Unknown CMake command "aws_use_package".


-- Configuring incomplete, errors occurred!
See also "/home/i123/aws-sdk-cpp-1.11.485/build/CMakeFiles/CMakeOutput.log".

Possible Solution

No response

Additional Information/Context

No response

AWS CPP SDK version used

1.11.485

Compiler and Version used

9.4.0

Operating System and version

ubuntu20

@Allius27 Allius27 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 15, 2025
@sbiscigl
Copy link
Contributor

there is two ways we provide to achieve what you want to, and they are included for this scenario specifically.

  • use the prefetch_crt_dependency.sh script to bring the crt into the directories that the build expects it

i.e. in a Dockerfile

FROM public.ecr.aws/amazonlinux/amazonlinux:2023

# Install toolchain
RUN yum groupinstall -y 'Development Tools' && \
    yum install -y ninja-build cmake3 curl-devel openssl-devel wget

#install sdk without using submodules
RUN wget https://github.com/aws/aws-sdk-cpp/archive/refs/tags/1.11.485.zip && \
    unzip 1.11.485.zip && \
    cd aws-sdk-cpp-1.11.485 && \
    ./prefetch_crt_dependency.sh && \
    mkdir build && \
    cd build && \
    cmake3 -DCMAKE_PREFIX_PATH=/crt-install -DBUILD_ONLY=s3 -DENABLE_TESTING=OFF  .. && \
    cmake3 --build . && \
    cmake3 --install .
  • use the BUILD_DEPS parameter to build with a pre-exsiting install of CRT

i.e. in a Dockerfile

FROM public.ecr.aws/amazonlinux/amazonlinux:2023

# Install toolchain
RUN yum groupinstall -y 'Development Tools' && \
    yum install -y ninja-build cmake3 curl-devel openssl-devel wget

# Install crt-cpp, but this can be replaced with any way you wish to install the CRT
RUN git clone --recurse-submodules -b v0.29.9 https://github.com/awslabs/aws-crt-cpp.git && \
    cd aws-crt-cpp && \
    mkdir build && \
    cd build && \
    cmake3 -DCMAKE_INSTALL_PREFIX=/crt-install .. && \
    cmake3 --build . && \
    cmake3 --install .

#install sdk without using submodules
RUN wget https://github.com/aws/aws-sdk-cpp/archive/refs/tags/1.11.485.zip && \
    unzip 1.11.485.zip && \
    cd aws-sdk-cpp-1.11.485 && \
    mkdir build && \
    cd build && \
    cmake3 -DCMAKE_PREFIX_PATH=/crt-install -DBUILD_ONLY=s3 -DENABLE_TESTING=OFF -DBUILD_DEPS=OFF  .. && \
    cmake3 --build . && \
    cmake3 --install .

@sbiscigl sbiscigl added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days. build-problem problems with building this sdk and removed bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-problem problems with building this sdk response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days.
Projects
None yet
Development

No branches or pull requests

2 participants