-
Notifications
You must be signed in to change notification settings - Fork 222
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
"Creating a New Project" tutorial is broken #155
Comments
Hey @alejoseb, Thanks for letting us know, completely forgot about this change in the latest couple of mbed-os releases. Give me a few min, will try to fix it now -Michael |
Update, can confirm this is actually an issue with mbed OS. Going to raise an issue with them now. |
@alejoseb. The temporary fix would be:
This should rollback to |
The issue is that your build profile pushes the language version up to C++11, but disables GNU extensions, because it's selecting Mbed OS should work fine built as C++11, but I wouldn't expect it to be happy with GNU extensions disabled. |
Both mbed os issues linked above have been closed (as "not a bug"), so this should probably be re-opened. |
@kjbracey-arm the uTensor codebase was designed around vanilla C++11 for portability. Do you see any issues with enabling gnu extensions limiting the scope of uptake? If not I have no problem updating the build profile |
I'm not really in favour of using GNU extensions either, but the Mbed OS build profiles have always had them on for GCC and ARM Compiler, so actually turning them off is liable to upset the Mbed OS half of the build. The GNU extensions don't normally actually interfere with standard C++11 code. I'd suggest you could use a Also, if you're publishing a variant Mbed OS build profile, you're liable to hit glitches with new Mbed OS versions - we occasionally do have to make changes to them. If ARMmbed/mbed-os#10427 lands then you wouldn't actually need to use a profile for Mbed OS 5.13 or later, as it will be selecting (GNU) C++14, so should compile your code fine. |
I guess the build profiles are mbed specific anyways so there really is not harm updating them to the gnu extensions for the time being. |
Thanks this is good quick fix. |
Hi,
I was testing the examples provided, the first one "Creating a New Project" is not working currently.
It is not compiling with the current version of mbed ( mbed-os-5.12.3). It seems that the build profile to enable C++11 support is not compatible with mbed mbed_rtc_time.cpp file.
The other two examples works as expected.
is it possible to update the example or avoid the C++11 profile?
Part of the output is as follow:
Compile [ 88.4%]: mbed_rtc_time.cpp
[Error] mbed_rtc_time.cpp@89,22: invalid use of incomplete type 'const struct timeval'
[Error] mbed_rtc_time.cpp@110,7: invalid use of incomplete type 'struct timeval'
[Error] mbed_rtc_time.cpp@111,7: invalid use of incomplete type 'struct timeval'
[Error] mbed_rtc_time.cpp@124,20: aggregate 'timeval tv' has incomplete type and cannot be defined
[Error] mbed_rtc_time.cpp@137,26: variable 'const timeval tv' has initializer but incomplete type
[ERROR] ./mbed-os/platform/mbed_rtc_time.cpp: In function 'int settimeofday(const timeval*, const timezone*)':
./mbed-os/platform/mbed_rtc_time.cpp:89:22: error: invalid use of incomplete type 'const struct timeval'
Thanks for your help
The text was updated successfully, but these errors were encountered: