Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

amazon web services - AWS SDK C++ install using cmake on Ubuntu, problem with installing third-party libraries

I am installing the aws-cpp-sdk in Ubuntu 20.04 by following the installation instructions on: https://github.com/aws/aws-sdk-cpp

I built/installed the SDK from source as per the instructions which worked. Installation locations:

  • /usr/local/lib
  • /usr/local/include/aws

I built/installed the aws-c-common as per the instructions (although I didn't use a DCMAKE_INSTALL_PREFIX).

I attempt to build aws-checksums but can't get past the cmake. When I run cmake .. while in the build directory which is in the code directory I get:

-- The C compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
/usr/local/lib/cmake/lib/cmake
CMake Error at CMakeLists.txt:32 (include):
  include could not find load file:

    AwsCFlags

CMake Error at CMakeLists.txt:33 (include):
  include could not find load file:

    AwsCheckHeaders

CMake Error at CMakeLists.txt:34 (include):
  include could not find load file:

    AwsSharedLibSetup

CMake Error at CMakeLists.txt:35 (include):
  include could not find load file:

    AwsSanitizers

CMake Error at CMakeLists.txt:37 (include):
  include could not find load file:

    AwsFindPackage

CMake Error at CMakeLists.txt:38 (include):
  include could not find load file:

    AwsFeatureTests

CMake Error at CMakeLists.txt:116 (aws_set_common_properties):
  Unknown CMake command "aws_set_common_properties".

-- Configuring incomplete, errors occurred!
See also ...

I've tried to point the prefix to the sdk install folders but that did not solve my problem. That is where I get stuck. Any input is appreciated. Thank you.

question from:https://stackoverflow.com/questions/65829295/aws-sdk-c-install-using-cmake-on-ubuntu-problem-with-installing-third-party-l

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I do this inside a Dockerfile, and it runs properly:

RUN cd /tmp 
  && git clone https://github.com/aws/aws-sdk-cpp.git 
  && cd aws-sdk-cpp 
  && mkdir build 
  && cd build 
  && cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_ONLY="ecr" 
  && make 
  && make install

It builds without the -DBUILD_ONLY option as well. However, this is on Ubuntu 18.04 LTS, not 20.04. I don't imagine there's a difference, however.

You haven't said what options you're feeding cmake.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...