Updated esp-idf and now KeyError: 'liblwip.a' [solved: sdkconfig]

jcsbanks
Posts: 305
Joined: Tue Mar 28, 2017 8:03 pm

Updated esp-idf and now KeyError: 'liblwip.a' [solved: sdkconfig]

Postby jcsbanks » Mon Mar 04, 2019 12:05 am

If I build (even after a clean) a project that was working on esp-idf 3.3 from about two weeks ago to an update now like I usually do:

Code: Select all

cd $IDF_PATH
git checkout master
git pull
git submodule update --init --recursive


at the end of the build I get this:

Code: Select all

Generating libxtensa-debug-module.a.sections_info
CC build/wpa_supplicant/src/wpa2/utils/ext_password.o
CC build/wpa_supplicant/src/wpa2/utils/base64.o
CC build/wpa_supplicant/src/wps/wps_enrollee.o
CC build/wpa_supplicant/src/wps/uuid.o
CC build/wpa_supplicant/src/wps/wps_attr_build.o
CC build/wpa_supplicant/src/wps/wps_registrar.o
CC build/wpa_supplicant/src/wps/wps_common.o
CC build/wpa_supplicant/src/wps/wps.o
CC build/wpa_supplicant/src/wps/wps_dev_attr.o
CC build/wpa_supplicant/src/wps/wps_attr_parse.o
CC build/wpa_supplicant/src/wps/wps_validate.o
CC build/wpa_supplicant/src/wps/wps_attr_process.o
CC build/wpa_supplicant/src/wps/eap_common.o

AR build/wpa_supplicant/libwpa_supplicant.a
Generating liblwip.a.sections_info
Generating libmbedtls.a.sections_info
Generating libwpa_supplicant.a.sections_info
Generating esp32.common.ld
Traceback (most recent call last):
  File "C:/msys32/home/jcsba/esp/esp-idf/tools/ldgen/ldgen.py", line 113, in <module>
    main()
  File "C:/msys32/home/jcsba/esp/esp-idf/tools/ldgen/ldgen.py", line 97, in main
    mapping_rules = generation_model.generate_rules(sdkconfig, sections_infos)
  File "C:/msys32/home/jcsba/esp/esp-idf/tools/ldgen/generation.py", line 370, in generate_rules
    self._create_exclusions(mapping_rules, default_rules, sections_infos)
  File "C:/msys32/home/jcsba/esp/esp-idf/tools/ldgen/generation.py", line 465, in _create_exclusions
    general_rule.add_exclusion(specific_rule, sections_info)
  File "C:/msys32/home/jcsba/esp/esp-idf/tools/ldgen/generation.py", line 99, in add_exclusion
    expansions = do_section_expansion(self, section)
  File "C:/msys32/home/jcsba/esp/esp-idf/tools/ldgen/generation.py", line 81, in do_section_expansion
    sections_in_obj = sections_infos.get_obj_sections(rule.archive, rule.obj)
  File "C:/msys32/home/jcsba/esp/esp-idf/tools/ldgen/generation.py", line 634, in get_obj_sections
    stored = self.sections[archive]
KeyError: 'liblwip.a'
make: *** [/home/jcsba/esp/esp-idf/components/esp32/Makefile.projbuild:51: /c/Users/jcsba/Documents/GitHub/Testing/C/Olimex/build/esp32/esp32.common.ld] Error 1
I can copy hello_world example project and it builds fine. I can see it is going wrong at the linker but not sure why.

I'm trying to keep up to date to see what changes there have been to the WiFi drivers as I have various ongoing problems, eg Android hotpot reconnecting after ESP32 reset and not getting events when password is incorrect when connecting to the ESP32's AP.
Last edited by jcsbanks on Mon Mar 04, 2019 12:27 pm, edited 4 times in total.

jcsbanks
Posts: 305
Joined: Tue Mar 28, 2017 8:03 pm

Re: Updated esp-idf and now KeyError: 'liblwip.a'

Postby jcsbanks » Mon Mar 04, 2019 10:45 am

make clean or deleting the build folder do not help on two projects.

Going to start with new msys32 installation and download and install the whole esp-idf again and then see if my old projects will build.

Edit re above: same error.
Last edited by jcsbanks on Mon Mar 04, 2019 11:26 am, edited 1 time in total.

jcsbanks
Posts: 305
Joined: Tue Mar 28, 2017 8:03 pm

Re: Updated esp-idf and now KeyError: 'liblwip.a'

Postby jcsbanks » Mon Mar 04, 2019 11:13 am

The only warning in the build before the linking is this which was also present on previous esp-idf versions so unlikely to be relevant:

Code: Select all

C:/msys32/home/jcsba/esp/esp-idf/components/lwip/lwip/src/core/tcp.c: In function 'tcp_recved':
C:/msys32/home/jcsba/esp/esp-idf/components/lwip/lwip/src/core/tcp.c:806:20: warning: comparison is always false due to limited range of data type [-Wtype-limits]
   if (pcb->rcv_wnd > TCP_WND_MAX(pcb)) {
                    ^

jcsbanks
Posts: 305
Joined: Tue Mar 28, 2017 8:03 pm

Re: Updated esp-idf and now KeyError: 'liblwip.a'

Postby jcsbanks » Mon Mar 04, 2019 11:47 am

Code: Select all

 git checkout 7a174f99a30f74d92861a7eab299c2bdb1d03ad7
To go back to the commit around when it used to build also gives the same error.

jcsbanks
Posts: 305
Joined: Tue Mar 28, 2017 8:03 pm

Re: Updated esp-idf and now KeyError: 'liblwip.a'

Postby jcsbanks » Mon Mar 04, 2019 12:07 pm

It is something to do with the sdkconfig because deleting the old one and copying the one from hello_world it then built. I'll try to work out why.

Adrian
Posts: 6
Joined: Wed Mar 20, 2019 8:57 am

Re: Updated esp-idf and now KeyError: 'liblwip.a' [solved: sdkconfig]

Postby Adrian » Wed Mar 20, 2019 8:58 am

I have the same error. Do you have any new insights on this problem?

Adrian
Posts: 6
Joined: Wed Mar 20, 2019 8:57 am

Re: Updated esp-idf and now KeyError: 'liblwip.a' [solved: sdkconfig]

Postby Adrian » Wed Mar 20, 2019 9:24 am

I figured out that this error occurs if you enable "LWIP IRAM optimization" in make menuconfig. A GitHub issue is already opened for this error in esp-idf project.

https://github.com/espressif/esp-idf/issues/3173

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Updated esp-idf and now KeyError: 'liblwip.a' [solved: sdkconfig]

Postby ESP_Angus » Wed Mar 20, 2019 11:12 pm

Hi folks,

The root cause (for both your reports and the GitHub issue) is to do with path parsing on Windows. A fix for this should be merged very soon (Subscribe to the linked GitHub issue to be updated when it is available).

Angus

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 176 guests