cnlohr / esp82xx

Useful ESP8266 C Environment
Other
288 stars 107 forks source link

Error compiling projects #95

Closed prater27 closed 4 years ago

prater27 commented 4 years ago

Hi!

I am trying to compile https://github.com/con-f-use/esp82XX-basic but I am having an error during linking. I also tried with another project and the same error appears. I am not being able to figure out what is wrong, since the compile command apparently includes the libraries in the place where they are, and the linked libraries do not have 0B or something like that.

jbg@jbg:~/esp8266/projects/test_project_2/esp82XX-basic/esp82xx/toolchain/esp_nonos_sdk/lib$ pwd
/home/jbg/esp8266/projects/test_project_2/esp82XX-basic/esp82xx/toolchain/esp_nonos_sdk/lib
jbg@jbg:~/esp8266/projects/test_project_2/esp82XX-basic/esp82xx/toolchain/esp_nonos_sdk/lib$ ls
libairkiss.a  libcrypto.a  libespnow.a  libjson.a      liblwip.a  libmesh.a      libphy.a  libpwm.a          libssl.a      libwpa2.a  libwps.a
libat.a       libdriver.a  libgcc.a     liblwip_536.a  libmain.a  libnet80211.a  libpp.a   libsmartconfig.a  libupgrade.a  libwpa.a
jbg@jbg:~/esp8266/projects/test_project_2/esp82XX-basic$ sudo make burn
esp82xx/common.mf:39: Warning: No shell variable 'ESP_ROOT', using '/home/jbg/esp8266/esp-open-sdk'
/home/jbg/esp8266/esp-open-sdk/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc -mlongcalls -Os -I/esp82xx/toolchain/esp_nonos_sdk/include -Iesp82xx/include -I. -Iesp82xx/fwsrc -Iuser -DICACHE_FLASH -DWEB_PORT=80 -DCOM_PORT=7777 -DBACKEND_PORT=7878  -DSLOWTICK_MS=50 -DVERSSTR='"Version: v0.1-12-g1b377 - Build Fri, 21 Aug 2020 17:52:26 +0200 with -DICACHE_FLASH -DWEB_PORT=80 -DCOM_PORT=7777 -DBACKEND_PORT=7878  -DSLOWTICK_MS=50"' esp82xx/fwsrc/uart.c esp82xx/fwsrc/esp82xxutil.c esp82xx/fwsrc/flash_rewriter.c esp82xx/fwsrc/http.c esp82xx/fwsrc/commonservices.c esp82xx/fwsrc/http_custom.c esp82xx/fwsrc/mdns.c esp82xx/fwsrc/mfs.c user/custom_commands.c user/user_main.c -flto -Wl,--relax -Wl,--gc-sections -nostdlib -L/esp82xx/toolchain/esp_nonos_sdk/lib -L/home/jbg/esp8266/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.5/libgcc.a /esp82xx/toolchain/esp_nonos_sdk/lib/libmain.a /esp82xx/toolchain/esp_nonos_sdk/lib/liblwip.a /esp82xx/toolchain/esp_nonos_sdk/lib/libssl.a /esp82xx/toolchain/esp_nonos_sdk/lib/libupgrade.a /esp82xx/toolchain/esp_nonos_sdk/lib/libnet80211.a /esp82xx/toolchain/esp_nonos_sdk/lib/libwpa.a /esp82xx/toolchain/esp_nonos_sdk/lib/libphy.a /esp82xx/toolchain/esp_nonos_sdk/lib/liblwip.a /esp82xx/toolchain/esp_nonos_sdk/lib/libcrypto.a /esp82xx/toolchain/esp_nonos_sdk/lib/libpp.a /home/jbg/esp8266/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.5/libgcc.a -T esp82xx/toolchain/ld/linkerscript.ld -T /esp82xx/toolchain/esp_nonos_sdk/ld/eagle.rom.addr.v6.ld -B/esp82xx/toolchain/esp_nonos_sdk/lib  -o image.elf
xtensa-lx106-elf-gcc: error: /esp82xx/toolchain/esp_nonos_sdk/lib/libmain.a: No such file or directory
xtensa-lx106-elf-gcc: error: /esp82xx/toolchain/esp_nonos_sdk/lib/liblwip.a: No such file or directory
xtensa-lx106-elf-gcc: error: /esp82xx/toolchain/esp_nonos_sdk/lib/libssl.a: No such file or directory
xtensa-lx106-elf-gcc: error: /esp82xx/toolchain/esp_nonos_sdk/lib/libupgrade.a: No such file or directory
xtensa-lx106-elf-gcc: error: /esp82xx/toolchain/esp_nonos_sdk/lib/libnet80211.a: No such file or directory
xtensa-lx106-elf-gcc: error: /esp82xx/toolchain/esp_nonos_sdk/lib/libwpa.a: No such file or directory
xtensa-lx106-elf-gcc: error: /esp82xx/toolchain/esp_nonos_sdk/lib/libphy.a: No such file or directory
xtensa-lx106-elf-gcc: error: /esp82xx/toolchain/esp_nonos_sdk/lib/liblwip.a: No such file or directory
xtensa-lx106-elf-gcc: error: /esp82xx/toolchain/esp_nonos_sdk/lib/libcrypto.a: No such file or directory
xtensa-lx106-elf-gcc: error: /esp82xx/toolchain/esp_nonos_sdk/lib/libpp.a: No such file or directory
esp82xx/main.mf:82: recipe for target 'image.elf' failed
make: *** [image.elf] Error 1

Any suggestion what could I be doing wrong?

Thank you very much in advance!!

Best regards

cnlohr commented 4 years ago

This looks like a submodule issue. Do you mind trying my esp82xx-basic?

https://github.com/cnlohr/esp82XX-basic

con-f-use commented 4 years ago

Yes, my esp82XX-basic is not up to date anymore and not the preferred method of using esp82XX. It's not needed anymore. See the esp82XX readme for information on how to start a new project.

prater27 commented 4 years ago

Hi!

Thank you very much for your answer.

I have tried again with @cnlohr esp82XX-basic but unfortunately I get the same error.

Again, the libraries are in place and the compilation command gives the right path to the files, nevertheless they are not found...

Thanks in advance!!

con-f-use commented 4 years ago

xtensa-lx106-elf-gcc: error: /esp82xx/toolchain/esp_nonos_sdk/lib/libmain.a: No such file or directory

This is not the right path to the files. I suspect there is either an $(ESP_ROOT) missing or a variable is empty.

prater27 commented 4 years ago

Hi!

@con-f-use you were right, the environment variable I gave ESP_ROOT was not right. Now everything worked like a charm! Thanks!!!