Page 1 of 1

All-in-one Windows zip env incorrectly reports compiler version issue

Posted: Sat Jan 14, 2017 2:28 am
by MarcusW
The latest all-in-one windows environment (esp32_win32_mysys2_environment_and_toolchain-20170111.zip), when executing the make command incorrectly reports that the wrong tool chain has been installed.

The cause is in code added to esp-idf/make/project.mk which checks the version number of the compiler does not take into account that programs under windows end in a .exe extension.

This can be corrected, probably without ill effects in Linux environments by changing lines 432-433 in the make file from:
TOOLCHAIN_COMMIT_DESC := $(shell $(CC) --version | sed -E -n 's|xtensa-esp32-elf-gcc\ \(([^)]*).*|\1|gp')
TOOLCHAIN_GCC_VER := $(shell $(CC) --version | sed -E -n 's|xtensa-esp32-elf-gcc\ \(.*\)\ (.*)|\1|gp')

to:

TOOLCHAIN_COMMIT_DESC := $(shell $(CC) --version | sed -E -n 's|xtensa-esp32-elf-gcc.*\ \(([^)]*).*|\1|gp')
TOOLCHAIN_GCC_VER := $(shell $(CC) --version | sed -E -n 's|xtensa-esp32-elf-gcc.*\ \(.*\)\ (.*)|\1|gp')

the extra ./ after "gcc" should swallow up the extension if it exists, and not change anything if it does not.

Re: All-in-one Windows zip env incorrectly reports compiler version issue

Posted: Sat Jan 14, 2017 3:23 pm
by kolban
Howdy MarcusW,
This sounds like an issue that may have been previously reported ... see:

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

The Espressif team have said in the issue that they seem to see the problem and hope to have a resolution/fix shortly.