Page 1 of 1

(resolved) moving between IDF versions breaks make

Posted: Tue Feb 12, 2019 10:17 pm
by mzimmers
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.

Re: moving between IDF versions breaks make

Posted: Tue Feb 12, 2019 10:40 pm
by vonnieda
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.

Re: moving between IDF versions breaks make

Posted: Tue Feb 12, 2019 10:57 pm
by mzimmers
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?

Re: moving between IDF versions breaks make

Posted: Fri Mar 01, 2019 6:01 am
by ESP_Angus
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.