(resolved) moving between IDF versions breaks make

User avatar
mzimmers
Posts: 643
Joined: Wed Mar 07, 2018 11:54 pm
Location: USA

(resolved) moving between IDF versions breaks make

Postby mzimmers » Tue Feb 12, 2019 10:17 pm

Hi all -

I've been trying to move between IDF versions using git's checkout command. My IDF folder is C:\esp-idf. When I try to make my application with release/v3.1, I get this error:
make[1]: *** No rule to make target 'C:/esp-idf/esp-idf-v3.1.2/components/libsodium/libsodium/src/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c', needed by 'libsodium/src/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.o'. Stop.
make: *** [/c/esp-idf/make/project.mk:468: component-libsodium-build] Error 2
Any ideas what I might have done wrong? Thanks.
Last edited by mzimmers on Wed Apr 17, 2019 8:44 pm, edited 1 time in total.

vonnieda
Posts: 145
Joined: Tue Nov 07, 2017 3:42 pm

Re: moving between IDF versions breaks make

Postby vonnieda » Tue Feb 12, 2019 10:40 pm

Make sure to run `git submodule update --recursive` in your IDF directory, and then `make clean` in your project directory. Then try `make` to build.

User avatar
mzimmers
Posts: 643
Joined: Wed Mar 07, 2018 11:54 pm
Location: USA

Re: moving between IDF versions breaks make

Postby mzimmers » Tue Feb 12, 2019 10:57 pm

Hi vonneida - that was it; thanks. So is that something I have to do every time I change which branch I'm using, or only when I'm using a particular branch for the first time?

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

Re: moving between IDF versions breaks make

Postby ESP_Angus » Fri Mar 01, 2019 6:01 am

Hi mzimmers,

This can happen when files are moved around in the source directories. There is some stale "make" dependency information in the build directory, and "make" tries to expand these dependencies early in the build pass - before it can be told that these files may have moved.

So it's not the case that you have to do a clean build each time you change IDF versions, but if you change IDF versions and this happens then a clean build will usually solve it.

The new CMake-based build system should not experience this issue.

Who is online

Users browsing this forum: No registered users and 111 guests