fyrtur-esp icon indicating copy to clipboard operation
fyrtur-esp copied to clipboard

undefined reference to `MD5Init'

Open carstenkoester opened this issue 2 years ago • 1 comments

Got the following errors while trying to compile for ESP32 (brand new install of ESP-IDF, version v4.4.1):

FAILED: fyrtur-esp32.elf
cmd.exe /C "cd . && C:\Espressif\tools\xtensa-esp32-elf\esp-2021r2-patch3-8.4.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-g++.exe -mlongcalls -Wno-frame-address  @CMakeFiles\fyrtur-esp32.elf.rsp -o fyrtur-esp32.elf  && cd ."
c:/espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: esp-idf/idf-stm-flash/libidf-stm-flash.a(stm_flash_http.c.obj):(.literal._http_event_handler+0x4c): undefined reference to `MD5Init'
c:/espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: esp-idf/idf-stm-flash/libidf-stm-flash.a(stm_flash_http.c.obj):(.literal._http_event_handler+0x60): undefined reference to `MD5Update'
c:/espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: esp-idf/idf-stm-flash/libidf-stm-flash.a(stm_flash_http.c.obj):(.literal._http_event_handler+0x64): undefined reference to `MD5Final'
c:/espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: esp-idf/idf-stm-flash/libidf-stm-flash.a(stm_flash_http.c.obj): in function `_http_event_handler':
C:/Temp/Fyrtur/iot/components/idf-stm-flash/main/stm_flash_http.c:32: undefined reference to `MD5Init'
c:/espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:/Temp/Fyrtur/iot/components/idf-stm-flash/main/stm_flash_http.c:68: undefined reference to `MD5Update'
c:/espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:/Temp/Fyrtur/iot/components/idf-stm-flash/main/stm_flash_http.c:78: undefined reference to `MD5Final'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
ninja failed with exit code 1

Solved this by setting CONFIG_WPA_MBEDTLS_CRYPTO=n (in idf.py menuconfig, Component config -> Supplicant -> Disable Use MbedTLS crypto APIs), so dropping this here mostly for information in case others run into the same issue.

carstenkoester avatar Jun 12 '22 23:06 carstenkoester

Solved this by setting CONFIG_WPA_MBEDTLS_CRYPTO=n (in idf.py menuconfig, Component config -> Supplicant -> Disable Use MbedTLS crypto APIs), so dropping this here mostly for information in case others run into the same issue.

Thank you! It's worked out for me.

klim123123 avatar Jun 07 '23 20:06 klim123123