I am working on a project where I am using Husarnet to connect my ESP32 (M5Tough ESP32) to serve HTML files online. I have downloaded the Husarnet library for ESP32 in the Arduino framework using PlatformIO. However, I am encountering compilation errors that seem to relate to both the Husarnet library and the ESP32 toolchain.
Here are the errors I am facing:
error: 'pthread_mutex_timedlock' was not declared in this scope
Suggested alternative: 'pthread_mutex_trylock'
error: expected initializer before '__result_use_check'
error: '::calloc' has not been declared
error: '::malloc' has not been declared
error: '::realloc' has not been declared
error: 'malloc' was not declared in this scope
Note: 'malloc' is defined in header '<cstdlib>'; did you forget to '#include <cstdlib>'?
error: expected initializer before '__alloc_align'
From what I understand, the issues are around:
I have ensured that my PlatformIO environment, ESP32 core, and all libraries are updated to their latest versions. However, the issues persist.
Is there a known resolution for these errors, or any steps you would recommend for troubleshooting this further?
Additionally, if there’s any further information needed to diagnose these issues, I’d be happy to provide it.
I ensured this in the beginning. I have rechecked the code several times, Didnt work. Could it be because of M5Core libraries like M5Unified or Asyncwebserver and AsyncTCP libraries?
If that doesn’t help try using older M5Unified library version, especially if latest version require newer versions of arduino-esp32. We’re quite frankly using a pretty ancient one and still working on making it more modern.