Skip to content

Add CRT version check at cmake and runtime #3437

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
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SergeyRyabinin
Copy link
Contributor

@SergeyRyabinin SergeyRyabinin commented May 29, 2025

Issue #, if available:
By default, git does not pull with recursive submodules pull, resulting in builds with outdated CRT submodule dependency, which in turn results in issues reported such as
#3433
Description of changes:
Add a check validating that the CRT submodule version is one set and validated by the AWS SDK team at the cmake configuration step.
Additionally, add a non-blocking logging error if CRT built-with and runtime-found versions are different.
Check all that applies:

  • Did a review by yourself.
  • Added proper tests to cover this PR. (If tests are not applicable, explain.)
  • Checked if this PR is a breaking (APIs have been changed) change.
  • Checked if this PR will not introduce cross-platform inconsistent behavior.
  • Checked if this PR would require a ReadMe/Wiki update.

Check which platforms you have built SDK on to verify the correctness of this PR.

  • Linux
  • Windows
  • Android
  • MacOS
  • IOS
  • Other Platforms

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Contributor

@sbiscigl sbiscigl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

('-')7

@SergeyRyabinin SergeyRyabinin marked this pull request as ready for review May 29, 2025 20:28
function(check_crt_version)
include(expected_crt_version)

file(READ "${aws-crt-cpp_SOURCE_DIR}/VERSION" CRT_SIMPLE_VERSION)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this variable probably won't be set if you are importing the CRT library instead of building it as a part of the SDK build, so in case of import, you want to disable the check

-DENABLE_CRT_VERSION_CHECK=OFF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants