advanced_examples\dlna linker error while building

geiser
Posts: 1
Joined: Sat Jul 11, 2020 9:43 pm

advanced_examples\dlna linker error while building

Postby geiser » Sat Jul 11, 2020 9:55 pm

I tried to build and run the advanced_examples\dlna example, my installation runs on Windows and everything is default and up2date.
After running

Code: Select all

idf.py
build i get:

[Codebox]
C:\Users\sven\esp\esp-adf\examples\advanced_examples\dlna>idf.py build
Checking Python dependencies...
Python requirements from C:\Users\sven\Desktop\esp-idf\requirements.txt are satisfied.
Executing action: all (aliases: build)
Running ninja in directory c:\users\sven\esp\esp-adf\examples\advanced_examples\dlna\build
Executing "ninja all"...
[1/6] cmd.exe /C "cd /D C:\Users\sven\esp\esp-adf\examples\advanced_examples\dlna\build\es...e -E echo *******************************************************************************"
Partition table binary generated. Contents:
*******************************************************************************
# Espressif ESP32 Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0x9000,24K,
phy_init,data,phy,0xf000,4K,
factory,app,factory,0x10000,2M,
*******************************************************************************
[2/6] Performing build step for 'bootloader'
ninja: no work to do.
[3/4] Linking CXX executable dlna_example.elf
FAILED: dlna_example.elf
cmd.exe /C "cd . && C:\Users\sven\.espressif\tools\xtensa-esp32-elf\esp-2019r2-8.2.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-g++.exe -mlongcalls -Wno-frame-address -nostdlib @CMakeFiles\dlna_example.elf.rsp -o dlna_example.elf && cd ."
c:/users/sven/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:/Users/sven/esp/esp-adf/components/esp-adf-libs/esp_upnp/lib/esp32\libesp_upnp.a(upnp.o):(.literal.upnp_serve_root_files+0x1c): undefined reference to `_binary_devicelist_xml_start'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
[/Codebox]

The problem seems to originate in libesp_upnp.a, I'm using the latest commit:
Commit hash: 24b500ca688cfcd84ee30c7d7cc7ae9361d31e11
but also tried it with release V2.0 (Commit hash: a3be5b2fcaff02e9303e46a9d8b0f34d0d34f9bb) and got:

[Codebox]
C:\Users\sven\esp\esp-adf-v2.0\examples\advanced_examples\dlna>idf.py build
Checking Python dependencies...
Python requirements from C:\Users\sven\Desktop\esp-idf\requirements.txt are satisfied.
Executing action: all (aliases: build)
Running ninja in directory c:\users\sven\esp\esp-adf-v2.0\examples\advanced_examples\dlna\build
Executing "ninja all"...
[1/6] cmd.exe /C "cd /D C:\Users\sven\esp\esp-adf-v2.0\examples\advanced_examples\dlna\bui...e -E echo *******************************************************************************"
Partition table binary generated. Contents:
*******************************************************************************
# Espressif ESP32 Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0x9000,24K,
phy_init,data,phy,0xf000,4K,
factory,app,factory,0x10000,2M,
*******************************************************************************
[2/6] Performing build step for 'bootloader'
ninja: no work to do.
[3/4] Linking CXX executable dlna_example.elf
FAILED: dlna_example.elf
cmd.exe /C "cd . && C:\Users\sven\.espressif\tools\xtensa-esp32-elf\esp-2019r2-8.2.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-g++.exe -mlongcalls -Wno-frame-address -nostdlib @CMakeFiles\dlna_example.elf.rsp -o dlna_example.elf && cd ."
c:/users/sven/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:/Users/sven/esp/esp-adf-v2.0/components/esp-adf-libs/esp_ssdp/lib\libesp_ssdp.a(esp_ssdp.o):(.literal.ssdp_response+0x20): undefined reference to `lwip_sendto_r'
c:/users/sven/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:/Users/sven/esp/esp-adf-v2.0/components/esp-adf-libs/esp_ssdp/lib\libesp_ssdp.a(esp_ssdp.o):(.literal.ssdp_create_sock+0x1c): undefined reference to `lwip_setsockopt_r'
c:/users/sven/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:/Users/sven/esp/esp-adf-v2.0/components/esp-adf-libs/esp_ssdp/lib\libesp_ssdp.a(esp_ssdp.o):(.literal.ssdp_create_sock+0x20): undefined reference to `lwip_bind_r'
c:/users/sven/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:/Users/sven/esp/esp-adf-v2.0/components/esp-adf-libs/esp_ssdp/lib\libesp_ssdp.a(esp_ssdp.o):(.literal.ssdp_read_sock+0xc): undefined reference to `lwip_recvfrom_r'
c:/users/sven/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:/Users/sven/esp/esp-adf-v2.0/components/esp-adf-libs/esp_ssdp/lib\libesp_ssdp.a(esp_ssdp.o): in function `ssdp_response':
/home/michael/work/esp/esp-adf-libs-source/esp_ssdp/esp_ssdp.c:405: undefined reference to `lwip_sendto_r'
c:/users/sven/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:/Users/sven/esp/esp-adf-v2.0/components/esp-adf-libs/esp_ssdp/lib\libesp_ssdp.a(esp_ssdp.o): in function `setsockopt':
/home/michael/work/esp/esp-adf-internal/esp-idf/components/lwip/lwip/src/include/lwip/sockets.h:571: undefined reference to `lwip_setsockopt_r'
c:/users/sven/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:/Users/sven/esp/esp-adf-v2.0/components/esp-adf-libs/esp_ssdp/lib\libesp_ssdp.a(esp_ssdp.o): in function `ssdp_create_sock':
/home/michael/work/esp/esp-adf-libs-source/esp_ssdp/esp_ssdp.c:249: undefined reference to `lwip_bind_r'
c:/users/sven/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: /home/michael/work/esp/esp-adf-libs-source/esp_ssdp/esp_ssdp.c:260: undefined reference to `lwip_setsockopt_r'
c:/users/sven/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:/Users/sven/esp/esp-adf-v2.0/components/esp-adf-libs/esp_ssdp/lib\libesp_ssdp.a(esp_ssdp.o): in function `recvfrom':
/home/michael/work/esp/esp-adf-internal/esp-idf/components/lwip/lwip/src/include/lwip/sockets.h:585: undefined reference to `lwip_recvfrom_r'
c:/users/sven/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:/Users/sven/esp/esp-adf-v2.0/components/esp-adf-libs/esp_ssdp/lib\libesp_ssdp.a(esp_ssdp.o): in function `setsockopt':
/home/michael/work/esp/esp-adf-internal/esp-idf/components/lwip/lwip/src/include/lwip/sockets.h:571: undefined reference to `lwip_setsockopt_r'
c:/users/sven/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:/Users/sven/esp/esp-adf-v2.0/components/esp-adf-libs/esp_ssdp/lib\libesp_ssdp.a(esp_ssdp.o): in function `sendto':
/home/michael/work/esp/esp-adf-internal/esp-idf/components/lwip/lwip/src/include/lwip/sockets.h:591: undefined reference to `lwip_sendto_r'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
[/Codebox]

irknowles
Posts: 2
Joined: Sat Jun 13, 2020 7:43 pm

Re: advanced_examples\dlna linker error while building

Postby irknowles » Mon Aug 24, 2020 8:56 pm

Hello - I was facing the same type of error messages (trying the IDF V4.1) with the ssdp library from ADF. I thought all was up-to-date as I did a git pull at ADF_HOME top level which was already origin/master.

Long story short I also did a git pull under esp-adf-libs (which is under ADF_HOME/components and this fast forwarded me to origin/master. The ssdp linking error then disappeared. So it seems the 'libraries' were out-of-date. Perhaps if anyone else has the same errors, then give this a try.

Who is online

Users browsing this forum: No registered users and 13 guests