Update espressif 32 Version >4.1.0 leads to Error: collect2.exe: error: ld returned 1 exit status

I’ve updated the Board Version from 3.5 to 4.1. and to 4.2

Suddenly I got a strange error and different kind of existing projects. So I’ve tried so far to update all the Librarys.

collect2.exe: error: ld returned 1 exit status
*** [.pio\build\az-delivery-devkit-v4\firmware.elf] Error 1

Any suggestion what I can check?

1 Like

What’s the crucial error message above the line you showed?

"myfile/.pio/libdeps/az-delivery-devkit-v4/ESP Async WebServer/src/WebAuthentication.cpp:73: undefined reference to `mbedtls_md5_starts’

But this is in “yellow” written so I thought this is a warning message.
Nevertheless, If I’m creating a fresh new project with the AsyncWebServer, I got the same Error?

Any clue?

Bingo! Known issue of the library: the mbedtls_md5_starts() was removed from the orginal md5.h · Issue #1149 · me-no-dev/ESPAsyncWebServer · GitHub. The update of mbedtls (with its associated function names) seems to have broken a bunch of libraries using it.

Someone filed a fix PR at Fix compiler error for ESP32-C3 and mbed TLS v2.7.0+ by khoih-prog · Pull Request #970 · me-no-dev/ESPAsyncWebServer · GitHub. In your platformio.ini, replace your previous me-no-dev/ESP Async WebServer@^1... line with https://github.com/khoih-prog/ESPAsyncWebServer/archive/refs/heads/master.zip. Does it get any better?

Note: Another ‘fix’ is to not use the new Arduino-ESP32 core that breaks these libraries. For that, revert to an older platform version in the platformio.ini.

platform = espressif32@3.5.0

THIS is it!

Many Thanks for the explanation and the solution! I really appreciate it.

1 Like