-
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
Error: 'MBEDTLS_ERR_SSL_FATAL_ALERT_MESSAGE' undeclared, while building with cmake. #6879
Comments
Hi @Mihir-Raj-Singh, thanks for raising an issue. I have been playing around with this today and I am really struggling to reproduce this bug. I am using Ubuntu 18.04, so I don't have access to Linux Mint however I have tested your reproduction steps with the following gcc versions: 7.5, 8.4, 9.4, 10.3 and 11.1. None of these compiler versions gave me the error you describe and the compilation completed successfully in all cases. I know you are using 11.3, so perhaps there is a specific issue with that version. Could I ask you please switch to a different version of gcc, maybe 10.X, and then try to compile in the way you have detailed in your post? Thanks in advance. |
|
So I am not exactly sure of the proceedure in Linux Mint, however this webpage explains how it works on my machine running Ubuntu 18.04. I guess since Mint is derived from Ubuntu there is a chance that this could work on Mint as well. Scroll down to the bottom of the webpage to the heading "Installing Multiple GCC Versions". From here you can see how the command Please report back with your findings. Thank you. |
Hi @Mihir-Raj-Singh , It's possible that we will end up closing the issue but I am happy to do some more investigating first if that is possible. Could you please paste your entire cmake output, both the configuration and the actual build output as text, rather than a partial screenshot? I might be able to get a bit more information that way. Also, have you tried cloning the project again? By that I mean does this error occur every time you try to clone the project from scratch? |
Note: Edited title to better reflect the nature of the error. |
Hey @tom-daubney-arm , It's alright let's do some more investigation on this issue. Will be a great opportunity for me to learn as a beginner in programming and in open source. I did try cloning the project from scratch , it occurs every time.
Can you please be more specific which configuration file you are talking about ? (If you need anything else let me know.) |
Thanks. The configuration output I was referring to is what you have copied over in the first block of output. Thanks for sending that. I will also need your cmake version please |
Thank you , Here you go :
|
Well, something went wrong here. Two bugs:
|
This is because there is no check for success/failure after Of course, the next obvious question is why did that open() fail? I'm wondering about the space in the pathname |
My guess is that cmake is invoking the script in the wrong directory when doing an out-of-tree build (perhaps with additional preconditions for it going wrong). |
Note to whoever fixes that bug: if you're not familiar with perl and you prefer to rewrite the script in python, feel free. |
Okay, I can reproduce this with a space in the path leading to the checked-out code |
and the fix is
(see https://stackoverflow.com/a/32262481/7761803 for the nightmare that is globbing in Perl with spaces in paths) |
So to the OP: until this fix gets into the library, the workaround is not to have a directory name with a space in it in the path leading to the code (even using |
Thanks @tom-cosgrove-arm and @gilles-peskine-arm. I will raise a PR that patches the Perl script. |
Thanks @tom-daubney-arm @gilles-peskine-arm @tom-cosgrove-arm For the collaboration and figuring out the problematic files.👍 |
Modify generate_errors.pl such that it can now handle opening files where the file path includes a directory names containing spaces. Raised in issue Mbed-TLS#6879. Fix provided by @tom-cosgrove-arm in aforementioned issue. Signed-off-by: Thomas Daubney <[email protected]>
Modify generate_errors.pl such that it can now handle opening files where the file path includes a directory name containing spaces. Raised in issue Mbed-TLS#6879. Fix provided by @tom-cosgrove-arm in aforementioned issue. Signed-off-by: Thomas Daubney <[email protected]>
Modify generate_errors.pl such that it can now handle opening files where the file path includes a directory name containing spaces. Raised in issue Mbed-TLS#6879. Fix provided by @tom-cosgrove-arm in aforementioned issue. Signed-off-by: Thomas Daubney <[email protected]>
Modify generate_errors.pl such that it can now handle opening files where the file path includes a directory name containing spaces. Raised in issue Mbed-TLS#6879. Fix provided by @tom-cosgrove-arm in aforementioned issue. Signed-off-by: Thomas Daubney <[email protected]>
I made these changes but still the same problem. |
Summary
After cloning the project , when I try to build it using cmake It throws an error.
error.c:108:25: error: ‘MBEDTLS_ERR_SSL_FATAL_ALERT_MESSAGE’ undeclared
System information
8c89224991adff88d53cd380f42a2baa36f91454
mbedtls_config.h
): Configuration is default.Expected behavior
Actual behavior
Steps to reproduce
mkdir build
cd build
cmake /path/to/mbedtls/folder/
cmake --build .
Additional information
The text was updated successfully, but these errors were encountered: