aws-sdk-cpp: Incorrect CMake module paths since aws-crt-cpp dependency was added

In bb964685686c211d078fba7b8c840b73e16430de, CMakeLists.txt was modified to use non-standard CMake modules paths which is incompatible with most standard distributions.

Trying to configure aws-sdk-cpp on openSUSE/SLE therefore currently fails with:

glaubitz@suse-laptop:~/upstream/aws-sdk-cpp/build> cmake -G Ninja ..
-- 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.9.21
-- The CXX compiler identification is GNU 10.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11") 
--   Zlib library: /usr/lib64/libz.so
-- Encryption: Openssl
-- Found OpenSSL: /usr/lib64/libcrypto.so (found version "1.1.1k")  
--   Openssl include directory: /usr/include
--   Openssl library: /usr/lib64/libssl.so;/usr/lib64/libcrypto.so
-- Http client: Curl
-- Found CURL: /usr/lib64/libcurl.so (found version "7.76.1")  
--   Curl include directory: /usr/include
--   Curl library: /usr/lib64/libcurl.so
-- Performing Test HAVE_ATOMICS_WITHOUT_LIBATOMIC
-- Performing Test HAVE_ATOMICS_WITHOUT_LIBATOMIC - Success
CMake Error at CMakeLists.txt:174 (include):
  include could not find requested file:

    AwsFindPackage


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

    /home/glaubitz/upstream/aws-sdk-cpp/crt/aws-crt-cpp

  does not contain a CMakeLists.txt file.


-- Add s3-crt:s3 to C2J_SPECIAL_NAME_LIST
-- Looking for pathconf
-- Looking for pathconf - found
-- Looking for umask
-- Looking for umask - found
-- The C compiler identification is GNU 10.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done

Please see also: https://github.com/awslabs/aws-c-event-stream/issues/15

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 31 (7 by maintainers)

Most upvoted comments

To clarify, I am not saying this is correct, I am trying to verify that was the cause and give a recommendation so this doesn’t block you. But yea, we are working to properly support this.

Hi @glaubitz , Yea we got a few problems with adding the dependencies as submodules, still working on that. Having said that I can make it work on my environment, so unless there is something specific going on in openSUSE (which I think shouldn’t be the case) it could just be an environment configuration problem. The most common cause of these errors is not having done the clone --recursive or if you already had version 1.8 git submodule update --init --recursive, remember to uninstall the previous crt version otherwise it will also fail. If that doesn’t work, can you walk me through every step you took to reproduce?

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.

@r-burns thanks a lot for the reference to nixos package changes! It helped.

Any update or progress on this issue? I see tar.gz/zip “releases” being pushed out daily, which is surprising as you can’t actually build them without a side script. I appreciate the time put into getting bug fixes, optimizations and improvements out, but I would hope that making the sdk releases buildable again would be a higher priority.

Building from .tar.gz is just as unsupported as building from git, i.e. it doesn’t work.

Does this mean that you just downloaded the project and built?

Yes, downloaded from the tarball. Most distributions will use the tarball for creating a package, not check out the sources from git.

Distributions usually create individual packages for every upstream project which includes shared libraries. Having shared libraries in separate packages and not bundling them is an important security aspect for a distribution.

See: https://fedoraproject.org/wiki/Bundled_Libraries

I’m having the same issue. I’m using the tar.gz release (and not a git clone).

For 1.9.25:

cd /tmp
curl https://codeload.github.com/aws/aws-sdk-cpp/tar.gz/refs/tags/1.9.25 -o aws-sdk-cpp-1.9.25.tar.gz
tar xvf aws-sdk-cpp-1.9.25.tar.gz
cd aws-sdk-cpp-1.9.25
mkdir build
cd build
cmake .. -G Ninja

Then I get the same error as above. This used to work with 1.8 releases. I’m also pulling specifc tar.gz releases in my own CMakeLists.txt files, so this is quite surprising that it stopped working.

Yep, it was introduced with version 1.9.0 which contains the commit bb964685686c211d078fba7b8c840b73e16430de.