I’m using the esp8266_stage platform and recently ran pio platform update and now I cannot link any of my previously working projects:
.pioenvs\interdependulum_1_upper\libFrameworkArduino.a(Print.o):(.text._ZN5Print8printf_PEPKcz+0x0): undefined reference to `vsnprintf_P'
.pioenvs\interdependulum_1_upper\libFrameworkArduino.a(Print.o): In function `Print::printf_P(char const*, ...)':
Print.cpp:(.text._ZN5Print8printf_PEPKcz+0x53): undefined reference to `vsnprintf_P'
Print.cpp:(.text._ZN5Print8printf_PEPKcz+0x8e): undefined reference to `vsnprintf_P'
collect2.exe: error: ld returned 1 exit status
I have about 4hrs to fix this, anyone got any ideas?
I’m also experiencing the problem. Spending last few hours of debugging it.
It appears that if I remove -D DEBUG flag from build - it’s compiling. Otherwise - it fails.
The problem started since I’ve updated to latest version.
I will try to migrate to Arduino IDE and check but it will take days (my project has thousands of lines and I was only able to build it with PlatformIO only so far).
I was digging more and it looks that some of the dependencies I use are using DEBUG flag (as well as esp8266 arduino framework). The problematic libraries were EspAsyncWebServer and Sha256 (at least for me).
My code was using DEBUG flag as well which appears to be conflicting with arduino framework.
I’ve fixed the issue by replacing DEBUG in my code to sth different (like DEBUGLOG). I’m not using DEBUG flag anymore (so now there’s no conflict between arduino and my code). I know it’s a workaround but it’s working fine.
I hope my solution will help somebody if run into this problem again. It looks that the problem is related to some of the latest changes to esp8266 arduino framework (not platformio).