pcbreflux / espressif

all espressif stuff will committed here
GNU General Public License v3.0
595 stars 441 forks source link

Make on secure MQTT examples yeilds dependency file error #7

Open lakidd opened 7 years ago

lakidd commented 7 years ago

Hi My googling on this topic yields very little useful information on this type of error.

`

CC mqtt_subscribe_main.o CC MQTTClient-C/src/MQTTClient.o CC MQTTClient-C/src/mbedtls/MQTTmbedtls.o /Users/lakidd1/esp32/pcbreflux/esp32/app/ESP32_mqtt_secure_subscribe/main/MQTTClient-C/src/mbedtls/MQTTmbedtls.c:632:1: fatal error: opening dependency file MQTTClient-C/src/mbedtls/MQTTmbedtls.d: No such file or directory } ^ compilation terminated. make[1]: *** [MQTTClient-C/src/mbedtls/MQTTmbedtls.o] Error 1 make: *** [main-build] Error 2` I've seen comments that paths can be too long but this is OS X so shouldn't be an issue. Other examples build fine. Looks like a duplicate of #1 `[lakidd1:...ESP32_mqtt_secure_subscribe]$ xtensa-esp32-elf-cc --version (master✱) xtensa-esp32-elf-cc (crosstool-NG crosstool-ng-1.22.0-61-gab8375a) 5.2.0` `Darwin xxx-MacBook-Pro.local 16.4.0 Darwin Kernel Version 16.4.0: Thu Dec 22 22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64 x86_64` Any thoughts ? I've tried creating that directory in the location its complaining about
pcbreflux commented 7 years ago

Hi,

sorry still have no clue: my dependency files on ubuntu would build fine. Like MQTTmbedtls.d under build/main/MQTTClient-C/src/mbedtls/MQTTmbedtls.d.

But maybe can you exclude the longpath error by shorten/copy
/Users/lakidd1/esp32/pcbreflux/esp32/app/ESP32_mqtt_secure_subscribe to something like /Users/lakidd1/esp32/esp32_msecsub and compile again?

make clean
make menuconfig
make

Just to exclude this also, do you use a new esp-idf?

lakidd commented 7 years ago

Ok so this gets interesting...ubuntu on 14.04 gives me exactly the same result. If i go in and manually create the directory, it compiles which is a good start. The question is, why is the directory creation failing in the makefile ? I tried shortening the path with no luck

pcbreflux commented 7 years ago

Hi, using Ubuntu 16.04 but I delete the build directory very often an have not discovered any problem with make and all the included scripts from espressif. Sorry, still got no clue.

dattranfiot commented 7 years ago

Hi, I have encountered an error like you and I edited it as follows:

COMPONENT_ADD_INCLUDEDIRS := . MQTTClient-C/src/mbedtls MQTTClient-C/src MQTTPacket/src in file "component.mk"