-
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
Build fails if gmtime_s() or gmtime_r() are not available #1907
Comments
ARM Internal Ref: IOTSSL-2436 |
That's not a problem with armcc, it's a problem with libc compatibility. If the toolchain makes a difference, it's because it's picking up a different libc. |
The documentation for
#1198 added the requirement that the platform must have |
To expand on the information above:
@gilles-peskine-arm: I agree that the problem can be solved by detecting whether the libc is POSIX (by checking _POSIX_VERSION for example) and then using the appropriate function. However, as pointed out in #1198, the issue is that gmtime() is not thread safe. Do you think we should provide some sort of _ALT option, perhaps something else, to allow platforms like Mbed OS to deal with this sort of problem safely? |
There's actually an underlying problem here that armcc doesn't actually support The fix in #1927 will doubtless help someone, but it doesn't help Mbed OS. The PR in #1927 will now allow the code to build - but it still won't yield a useful date and time nor do the right certificate date checks. Therefore, I've changed the title to 'Build fails if gmtime_s() or gmtime_r() are not available' and created a new bug of #1975 - 'Arm C Compiler doesn't support gmtime()'. |
@sbutcher-arm: Thanks for the information regarding the state of gmtime() for armcc. While the PR #1927 does not fully resolve the armcc situation for Mbed OS, I do think that it is a first step towards fixing the issue for Mbed OS. This is because #1927 allows us to configure an implementation for gmtime() at compile time. So in the case of Mbed OS, we could detect the supported toolchains/libcs that do not have a gmtime() and automatically configure a suitable implementation. |
The Arm C Compiler does not support In addition, on Mbed OS, date/time support is now disabled by default with Mbed OS PR #7868, so the build is no longer broken. Therefore this issue can now be closed. |
Description
Bug
OS
Mbed OS
mbed TLS build:
Version: 2.12.0
Compiler and options (if you used a pre-built binary, please indicate how you obtained it): ARM Compiler
Additional environment information:
Expected behavior
build to succeed
Actual behavior
build failure:
Steps to reproduce
build an mbed OS application, with Mbed TLS 2.12.0, using mbed-cli
This is from change introduced in 512b4ee
The text was updated successfully, but these errors were encountered: