Friends, I have the same problem. Interestingly, for 2 weeks the compilation was correctly. Now not ArduinoIDE not Platformio has the same error.
arduino-cli installed on my linux-server compiles properly - most likely old versions of adafruit libraries / esp32 sourse code