-
Notifications
You must be signed in to change notification settings - Fork 7.2k
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
Missing std::to_string C++ support (libstdc++) (IDFGH-133) #1445
Comments
Some libstdc++ features which depend on C99 support in C library are currently unavailable, because GCC 5.2.0 incorrectly checks for these C99 features during configuration step. We plan to switch to a more recent version of GCC in the future, which will also fix this configuration issue. |
Fair enough, is there a workaround or patch currently? I am already building my own toolchain using Is this PR in the direction you are going? Seems... too easy? And not sure how to fully test it. However if a fully tested toolchain release will be coming within a month or two, I can probably get along fine with this patch: |
I've been wanting to use
I don't know if there are any side effects, seems to work fine though. |
@PerMalmberg I can confirm that seems to work for me. I'm applying it selectively to the files that need it (i.e. are using I'm also curious about any potential downsides? And/or if we will be getting a significantly new toolchain version any time soon? |
Not usable yet. Problem: the library json.hpp uses std::to_string, which is not available in the current STL implementation of the xtensa toolchain :-( That has been fixed in esp-idf though, and plans exist to merge ESP8266_RTOS_SDK with that. See espressif/esp-idf#1445
Half a year later - how is the time schedule looking for switching to a new gcc @igrr ? |
@PerMalmberg There is a preview version of toolchain based on GCC 8.2 available now, please see https://esp32.com/viewtopic.php?f=10&t=7400. Will keep this issue open while the new version is in preview. |
Nice, @igrr . I just finished a new design based on the ESP32 so I'm going to start working with this again. Currently setting up a new dev system and will also have to convert my Smooth framework to use CMake also when built for ESP-IDF (it already uses CMake when compiling for Linux so that should be fairly easy). |
Just a heads up, there is currently an issue when using GCC8 based toolchain with CMake build system, due to a linking issue the application is non-functional. Other combinations: GCC5 + CMake, GCC8 + Make, GCC8 + (linker from GCC5 based toolchain) + CMake — all work fine. Fix is currently in review. |
Thanks for the heads up. I saw the forum post re. that. It'll probably take another week before I can try out gcc8. |
@igrr Hows the linker fix coming along? |
Fixed in 9240bbb, sorry that I forgot to tag this issue. |
@igrr Before we switch to it, do you think the GCC 8.2 toolchain is relatively stable? We've have to do some extensive refactors on some of our source code because it uses std::any, std::optional, and lots of non-trivial return constexprs in c++. Just curious if you think it's potentially stable enough to switch to. Oh, and we're using the CMake build system. |
Closes espressif#1445 (std::to_string) Closes espressif#1876 (std::chrono_steady_clock) Closes espressif#1995 (std::timed_mutex) Closes espressif#2149 (addr2line) Closes espressif#2308 (lsiu/lsip) Closes espressif#2449 (c++17) Closes espressif#3258 (objdump)
Hi, how can I find this file: component.m? |
… OK result in the last few messages (espressif#1445)
For me, it's ok, but whether any side effects? |
I confront this many times, it not presented. I solve it like this. Don't think I am facing issues with this, but I rather want to use
|
I notice that
std::to_string
support is missing from the libstdc++, not sure what it takes to get that added, but it is useful especially when porting other C++11 code.Specifically, the following
app_main
should work. The example usage is directly from cppreference:http://www.cplusplus.com/reference/string/to_string/
(it currently fails to compile)
The error I see when running
make
:The text was updated successfully, but these errors were encountered: