Minimal Setup example can't build - framework version issue?

Hi I have tried the simple web server, and couldn’t get that to build. Also PlatformIO complained that platformio.ini didn’t have a “board = …” line in the supplied .ini? I added one in.

I could get an empty main.cpp to build OK. Using Mac OS Monterey.

In build I get the following. Seems its pointing to the wrong framework version? Can anyone suggest?

[{
“resource”: “/Users/maxlap/Documents/PlatformIO/Projects/Minimal Setup/Users/maxlap/.platformio/packages/framework-arduinoespressif32@src-ac062c2d4978b25cad32b0aa2d894938/libraries/Husarnet/src/HusarnetClient.cpp”,
“owner”: “cpp”,
“severity”: 8,
“message”: “‘malloc’ was not declared in this scope”,

},{
“resource”: “/Users/maxlap/Documents/PlatformIO/Projects/Minimal Setup/Users/maxlap/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/cstdlib”,
“owner”: “cpp”,
“severity”: 8,
“message”: “’::calloc’ has not been declared”,

},{
“resource”: “/Users/maxlap/Documents/PlatformIO/Projects/Minimal Setup/Users/maxlap/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/cstdlib”,
“owner”: “cpp”,
“severity”: 8,
“message”: “’::malloc’ has not been declared”,

},{
“resource”: “/Users/maxlap/Documents/PlatformIO/Projects/Minimal Setup/Users/maxlap/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/cstdlib”,
“owner”: “cpp”,
“severity”: 8,
“message”: “’::realloc’ has not been declared”,

},{
“resource”: “/Users/maxlap/Documents/PlatformIO/Projects/Minimal Setup/Users/maxlap/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/xtensa-esp32-elf/no-rtti/bits/gthr-default.h”,
“owner”: “cpp”,
“severity”: 8,
“message”: “‘pthread_mutex_timedlock’ was not declared in this scope”,

},{
“resource”: “/Users/maxlap/Documents/PlatformIO/Projects/Minimal Setup/Users/maxlap/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/sys-include/stdlib.h”,
“owner”: “cpp”,
“severity”: 8,
“message”: “expected initializer before ‘__result_use_check’”,

},{
“resource”: “/Users/maxlap/Documents/PlatformIO/Projects/Minimal Setup/Users/maxlap/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/sys-include/stdlib.h”,
“owner”: “cpp”,
“severity”: 8,
“message”: “expected initializer before ‘__result_use_check’”,

},{
“resource”: “/Users/maxlap/Documents/PlatformIO/Projects/Minimal Setup/Users/maxlap/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/sys-include/stdlib.h”,
“owner”: “cpp”,
“severity”: 8,
“message”: “expected initializer before ‘__result_use_check’”,

},{
“resource”: “/Users/maxlap/Documents/PlatformIO/Projects/Minimal Setup/Users/maxlap/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/sys-include/stdlib.h”,
“owner”: “cpp”,
“severity”: 8,
“message”: “expected initializer before ‘__result_use_check’”,

},{
“resource”: “/Users/maxlap/Documents/PlatformIO/Projects/Minimal Setup/Users/maxlap/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/sys-include/stdlib.h”,
“owner”: “cpp”,
“severity”: 8,
“message”: “expected initializer before ‘__result_use_check’”,

},{
“resource”: “/Users/maxlap/Documents/PlatformIO/Projects/Minimal Setup/Users/maxlap/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/sys-include/stdlib.h”,
“owner”: “cpp”,
“severity”: 8,
“message”: “expected initializer before ‘__result_use_check’”,

},{
“resource”: “/Users/maxlap/Documents/PlatformIO/Projects/Minimal Setup/Users/maxlap/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/sys-include/stdlib.h”,
“owner”: “cpp”,
“severity”: 8,
“message”: “expected initializer before ‘__alloc_align’”,

},{
“resource”: “/Users/maxlap/Documents/PlatformIO/Projects/Minimal Setup/.vscode/c_cpp_properties.json”,
“owner”: “/Users/maxlap/Documents/PlatformIO/Projects/Minimal Setup”,
“severity”: 4,
“message”: “Cannot find “/Users/maxlap/.platformio/packages/framework-arduinoespressif32@src-ac062c2d4978b25cad32b0aa2d894938/tools/sdk/include/nimble”.”,

},{
“resource”: “/Users/maxlap/Documents/PlatformIO/Projects/Minimal Setup/.vscode/c_cpp_properties.json”,
“owner”: “/Users/maxlap/Documents/PlatformIO/Projects/Minimal Setup”,
“severity”: 4,
“message”: “Cannot find “/Users/maxlap/.platformio/packages/framework-arduinoespressif32@src-ac062c2d4978b25cad32b0aa2d894938/tools/sdk/include/husarnet”.”,

},{
“resource”: “/Users/maxlap/Documents/PlatformIO/Projects/Minimal Setup/.vscode/c_cpp_properties.json”,
“owner”: “/Users/maxlap/Documents/PlatformIO/Projects/Minimal Setup”,
“severity”: 4,
“message”: “Cannot find “/Users/maxlap/.platformio/packages/framework-arduinoespressif32@src-ac062c2d4978b25cad32b0aa2d894938/tools/sdk/include/nimble”.”,

},{
“resource”: “/Users/maxlap/Documents/PlatformIO/Projects/Minimal Setup/.vscode/c_cpp_properties.json”,
“owner”: “/Users/maxlap/Documents/PlatformIO/Projects/Minimal Setup”,
“severity”: 4,
“message”: “Cannot find “/Users/maxlap/.platformio/packages/framework-arduinoespressif32@src-ac062c2d4978b25cad32b0aa2d894938/tools/sdk/include/husarnet”.”,

}]

Hi @Extremebias,

There was a bug in this line:

platform = espressif32

Should be

platform = espressif32@2.1.0

It’s the same issue as in this thread Problem using Husarnet in ESP32-Cam with Platformio .

Already pushed a commit fixing the docs.

Best,
Dominik