I just wasted a few hours due to that totally non-intuitive error message... only when I double checked the options in `make menuconfig` and saw an option to enable that specific component (in my case, ESP_CONSOLE) and that it was turned off, I managed to solve it.
For those that eventually will come a-googling, this is the exact message I received:
CC build/cmd_system/cmd_system.o
REDACTED/ESP8266_RTOS_SDK/examples/system/console/components/cmd_system/cmd_system.c:15:25: fatal error: esp_console.h: No such file or directory
compilation terminated.
make[1]: *** [REDACTED/ESP8266_RTOS_SDK/make/component_wrapper.mk:292: cmd_system.o] Error 1
make: *** [REDACTED/ESP8266_RTOS_SDK/make/project.mk:571: component-cmd_system-build] Error 2
I hope this can save someone frustration and wasted time.
Cheers,
-- Durval.