Skip to content

Build failed for dependency project AWSLC cross compiling issue #799

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

Open
gopaladhith opened this issue Apr 25, 2025 · 5 comments
Open

Build failed for dependency project AWSLC cross compiling issue #799

gopaladhith opened this issue Apr 25, 2025 · 5 comments
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@gopaladhith
Copy link

Describe the bug

The cmake build of aws-sdk using different toolchain seems to fail attaching the output of cmake configure,

Attached the output of this command in log file.

aws_log.txt

Expected Behavior

It should be able to cross compile.

Current Behavior

Build fails trying to compile awslc

Reproduction Steps

Cross compile with linaro toolchain

Possible Solution

No response

Additional Information/Context

No response

SDK version used

aws-lc-v1.49.1

Environment details (OS name and version, etc.)

ubuntu

@gopaladhith gopaladhith added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Apr 25, 2025
@bretambrose
Copy link
Contributor

Can you cross-compile aws-lc standalone? Unless you're pretty sure this is an issue SDK side (which would require additional evidence), I feel like your best bet would be to open an issue with aws-lc. Beyond that, please provide step-by-step instructions for repro that assume no previous toolchain installations.

@gopaladhith
Copy link
Author

@bretambrose Ok i will create an issue in aws-lc thanks for the info.

@sfod
Copy link
Contributor

sfod commented Apr 28, 2025

I've took a look at the cmake command that is used to build aws-lc, and I see no options related to cross-compiling, e.g. CMAKE_SYSTEM_NAME. This is most probably is the root cause of this issue.
How do you pass toolchain options to cmake? Can you post here the cmake command you execute?

For more details on cross-compiling, see related cmake docs.

@gopaladhith
Copy link
Author

@sfod Thanks for your reply, as for cross compilation i wrote a simple conanfile.py at the root project and just included the conan_toolchain.cmake file in the root CMakelist.txt of aws-sdk. Internally conan takes care of setting the proper toolchain based on profile selection. And i also investigated a bit into aws-lc and saw that for armv8 the libcrypto(13.5mb) that is generated does not seem to include the required perl modules and for armv7 the libcrypto(3.5mb) includes those (I could say this from the size difference of the library), And initially the CMAKE_SYSTEM_PROCESSOR was not passed on to aws-lc via conan include so i passed this param as a CMAKE_ARGUMENT in aws_prebuild_dependency(aws-crt-cpp/CMakelists.txt - line-79 in 1.35.1).

But not sure why aws-lc is not properly building the libcrypto for armv7. For now i have a workaround by enabling openssl and include openssl 1.1.1f. But would be good if this issue is resolved.

Have also opened one issue in aws-lc - aws/aws-lc#2374

@sfod
Copy link
Contributor

sfod commented Apr 29, 2025

just included the conan_toolchain.cmake file in the root CMakelist.txt of aws-sdk

Do you mean you added a line to CMakeLists.txt like the following?

include(conan_toolchain.cmake)

If yes, try to use CMAKE_TOOLCHAIN_FILE instead. From my experience, a toolchain file should always be specified via CMAKE_TOOLCHAIN_FILE, otherwise strange things may start happening.

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.
Projects
None yet
Development

No branches or pull requests

3 participants