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

Cross compile failure on v1.34.0 with success on v1.33.0 #775

Open
j-c-cook opened this issue Jan 26, 2025 · 1 comment
Open

Cross compile failure on v1.34.0 with success on v1.33.0 #775

j-c-cook opened this issue Jan 26, 2025 · 1 comment
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 2 days.

Comments

@j-c-cook
Copy link

Describe the bug

-- Found assembler: buildroot/tmp/toolchain/bin/arm-linux-gnueabihf-gcc
Copying platform assembly files from /home/jackcook/Documents/sdk-workspace/aws-iot-device-sdk-cpp-v2/crt/aws-crt-cpp/crt/aws-lc/generated-src/linux-x86/crypto/ to /home/jackcook/Documents/sdk-workspace/aws-iot-device-sdk-cpp-v2/build/deps/AWSLC/crypto
-- Looking for pthread.h
-- Looking for pthread.h - not found
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.16/Modules/FindThreads.cmake:220 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  crypto/CMakeLists.txt:705 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/jackcook/Documents/sdk-workspace/aws-iot-device-sdk-cpp-v2/build/deps/AWSLC/CMakeFiles/CMakeOutput.log".
See also "/home/jackcook/Documents/sdk-workspace/aws-iot-device-sdk-cpp-v2/build/deps/AWSLC/CMakeFiles/CMakeError.log".
CMake Error at crt/aws-crt-cpp/crt/aws-c-common/cmake/AwsPrebuildDependency.cmake:52 (message):
  Configuration failed for dependency project AWSLC
Call Stack (most recent call first):
  crt/aws-crt-cpp/CMakeLists.txt:107 (aws_prebuild_dependency)


-- Configuring incomplete, errors occurred!

Expected Behavior

A successful build, make and make install like I can get with v1.33.

Current Behavior

Claims that threads are missing, so it seems that CMAKE_SYSROOT is not being propagated to the location that cannot locate Threads.

Reproduction Steps

cmake -DCMAKE_INSTALL_PREFIX=/home/jackcook/aws-iot-cpp-sdk \
-DCMAKE_BUILD_TYPE="Debug" \
-DCMAKE_C_COMPILER=buildroot/tmp/toolchain/bin/arm-linux-gnueabihf-gcc \
-DCMAKE_CXX_COMPILER=buildroot/tmp/toolchain/bin/arm-linux-gnueabihf-g++ \
-DCMAKE_SYSTEM_NAME=Linux \
-DCMAKE_SYSTEM_PROCESSOR=arm \
-DCMAKE_SYSROOT=buildroot/libs/br_pjt/output/staging/arm-buildroot-linux-gnueabihf/sysroot \
-DCMAKE_FIND_ROOT_PATH=buildroot/libs/br_pjt/output/staging/arm-buildroot-linux-gnueabihf/sysroot \
..

Possible Solution

There seems to be an issue in CMakeLists in v1.34 that wasn't present in v1.33.

Additional Information/Context

No response

SDK version used

v1.34.0

Environment details (OS name and version, etc.)

arm-linux-gnueabihf 7.0.5 2019.12

@j-c-cook j-c-cook added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 26, 2025
@sfod
Copy link
Contributor

sfod commented Feb 6, 2025

This failure is for prebuilding one of the dependencies, aws-lc. CMake configuration logs should contain cmake command that was used to prebuild aws-lc, something similar to the following:

$ cmake -S aws-iot-device-sdk-cpp-v2 -B build
-- AWS SDK C++ 1.34.0-dev+f661d209
...

-- cmake command for dependency AWSLC: /usr/bin/cmake3;-DCMAKE_CXX_COMPILER=...     // <=== this line

Can you provide this command here?

@sfod sfod added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 2 days. label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 2 days.
Projects
None yet
Development

No branches or pull requests

2 participants