AWS IoT Embedded SDK

0

Hello,

To make my device development more straightforward, I'd like to use the AWS IoT Device SDK Embedded C release 202108.00. However, I am having trouble cross-compiling it for my platform (based on the BG77, using a Qualcomm version of Clang). I am unable to configure & build the project.

Here is my configure command:

cmake -G Ninja -B build -S . -DCMAKE_TOOLCHAIN_FILE=path/to/bg77.cmake -DBUILD_DEMOS=OFF -DBUILD_TESTS=OFF -DINSTALL_PLATFORM_ABSTRACTIONS=OFF

And the error I am seeing is:

<trim>
Downloading the Amazon Root CA certificate...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1188  100  1188    0     0  20941      0 --:--:-- --:--:-- --:--:-- 21214
Downloading the Baltimore Cybertrust Root CA certificate...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1262  100  1262    0     0  13008      0 --:--:-- --:--:-- --:--:-- 13010
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
OPENSSL_CRYPTO_LIBRARY (ADVANCED)
    linked by target "openssl_posix" in directory aws-iot-device-sdk-embedded-C/platform/posix/transport
OPENSSL_SSL_LIBRARY (ADVANCED)
    linked by target "openssl_posix" in directory aws-iot-device-sdk-embedded-C/platform/posix/transport

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

At this point, there is no build.ninja file generated, so I cannot build the project.

The README in the repo says the following:

The follow table shows libraries that need to be installed in your system to run certain demos. If a dependency is not installed and cannot be built from source, demos that require that dependency will be excluded from the default all target.

What is the proper way to build this without these dependencies?

Thank you, Jonathan

  • As additional information, with this patch, I can complete the CMake configure & generate steps.

    diff --git a/platform/posix/transport/CMakeLists.txt b/platform/posix/transport/CMakeLists.txt
    index 0bf7ce39..fa283801 100644
    --- a/platform/posix/transport/CMakeLists.txt
    +++ b/platform/posix/transport/CMakeLists.txt
    @@ -30,15 +30,9 @@ target_link_libraries( openssl_posix
                            PUBLIC
                               sockets_posix
                            PRIVATE
    -                          # This variable is set by the built-in FindOpenSSL.cmake
    -                          # and contains the path to the actual library.
    -                          ${OPENSSL_LIBRARIES}
                               # SSL uses Threads and on some platforms require
                               # explicit linking.
    -                          Threads::Threads
    -                          # SSL uses Dynamic Loading and on some platforms
    -                          # requires explicit linking.
    -                          ${CMAKE_DL_LIBS} )
    +                          Threads::Threads )
     
     # Set path to corePKCS11 and it's third party libraries.
     set(COREPKCS11_LOCATION "${CMAKE_SOURCE_DIR}/libraries/standard/corePKCS11")
    

    I still can't do a full build (mbedtls fails with an error about only being supported on Windows or Unix), but I can build most of the targets (e.g., aws_iot_json).

No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions