-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
CMake build broken with custom config using p256-m or everest #8165
Labels
bug
component-platform
Portability layer and build scripts
size-xs
Estimated task size: extra small (a few hours at most)
Comments
gilles-peskine-arm
added
bug
component-platform
Portability layer and build scripts
labels
Sep 6, 2023
3 tasks
gilles-peskine-arm
added a commit
to gilles-peskine-arm/mbedtls
that referenced
this issue
Sep 29, 2023
Fixes Mbed-TLS#8165 Signed-off-by: Gilles Peskine <[email protected]>
This was referenced Sep 29, 2023
Note: this affected TF-M, because they use |
gilles-peskine-arm
added
size-s
Estimated task size: small (~2d)
size-xs
Estimated task size: extra small (a few hours at most)
and removed
size-s
Estimated task size: small (~2d)
labels
Oct 4, 2023
gilles-peskine-arm
added a commit
to gilles-peskine-arm/mbedtls
that referenced
this issue
Oct 4, 2023
Fixes Mbed-TLS#8165 Signed-off-by: Gilles Peskine <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
component-platform
Portability layer and build scripts
size-xs
Estimated task size: extra small (a few hours at most)
Summary
When using CMake, the build fails when using a “3rdparty” feature (everest, p256-m) that is activated by any means other than editing
include/mbedtls/mbedtls_config.h
:mbedtls/mbedtls_config.h
earlier in the include path;MBEDTLS_CONFIG_FILE
;MBEDTLS_USER_CONFIG_FILE
;Details
Steps to reproduce:
Expectation: the build succeeds.
Actual result: a linking failure, because the files in
3rdparty/p256-m
are not built or linked.The problem is visible in
3rdparty/CMakeLists.txt
: the subdirectories are only traversed ifThis only works if the configuration is the one in
include/mbedtls/mbedtls_config.h
. It doesn't work when the respective options are enabled because the build has a differentmbedtls/mbedtls_config.h
earlier in the include path, or the build definesMBEDTLS_CONFIG_FILE
, or the build definesMBEDTLS_USER_CONFIG_FILE
, or the options are enabled directly on the compiler command line.A tempting fix is to traverse the
3rdparty
directories unconditionally, but I don't know if that causes some breakage (why didn't we do that in the first place?).The text was updated successfully, but these errors were encountered: