-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Compile error under 2.0.8 if library function explicitly returns const __FlashStringHelper * from F() macro #8108
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
Comments
Forgot to mention: although the sketch shown above does not explicitly need the F() macro, several libraries available through the Arduino IDE library manager do use this pattern internally. I was bitten by this issue when trying to compile a project using the ESPAsyncWebServer library. |
Apparently the breaking change was introduced in b98255d . |
@dok-net any comments? Please take some action or we will need to revert your PR |
@me-no-dev Now people start calling the fix a bug... #7940 details how there is an inconsistency in this core's libraries, on the other hand. Do we want to add __FlashStringHelper wrappers to all ESP32 libs that don't use it now, because it is redundant on ESP32, then? It seems like a lot of work for nothing. This has just been left to rot for far too long, it seems? |
Anyway, here's a PR #8111 to fix what originally got in my way. |
Same problem compiling this popular RFID lib with 2.0.8: |
Same problem here with the WS2812FX Library too.
|
@P-R-O-C-H-Y can you please add those libs and examples to the CI? Let's see what will fix it for them |
So how to fix it while we are waiting for the release? |
Thanks, i did copy these two lines #define FPSTR(pstr_pointer) (reinterpret_cast<const __FlashStringHelper *>(pstr_pointer))
#define F(string_literal) (FPSTR(PSTR(string_literal))) to my project and it fixed it. ( with a lot of prev def warning ) Thanks! |
Stick at 6.1.0 at the moment... There is already a issue opened on arduino-esp32 (espressif/arduino-esp32#8108)
Board
ESP32
Device Description
YUBOX-Node
Hardware Configuration
No special hardware configuration needed.
Version
v2.0.8
IDE Name
Arduino IDE 2.1.0
Operating System
Fedora Linux 38 x86_64
Flash frequency
80MHz
PSRAM enabled
no
Upload speed
115200
Description
After updating to Arduino-ESP32 2.0.8, the attached sketch will no longer compile, and displays the following error messages:
The same sketch compiles correctly under previous 2.0.7.
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: