cesanta / mos-tool

The Mongoose OS command line tool
https://mongoose-os.com/software.html
24 stars 14 forks source link

Failed to build empty application after updating to mos 2.0 #4

Closed peter-valkov closed 6 years ago

peter-valkov commented 6 years ago

When try to build an empty application downloaded from https://github.com/mongoose-os-apps/empty/releases I'm getting undefined references error messages

mos build --clean --arch esp8266
LD    /fwbuild-volumes/2.0/apps/empty-2.0/esp8266/build_contexts/build_ctx_708695957/build/objs/empty-2.0.elf
/fwbuild-volumes/2.0/apps/empty-2.0/esp8266/build_contexts/build_ctx_708695957/build/objs/mgos_wifi.c.o:(.text.dns_ev_handler+0x0): undefined reference to `mg_dns_create_reply'
/fwbuild-volumes/2.0/apps/empty-2.0/esp8266/build_contexts/build_ctx_708695957/build/objs/mgos_wifi.c.o:(.text.dns_ev_handler+0x4): undefined reference to `mg_dns_reply_record'
/fwbuild-volumes/2.0/apps/empty-2.0/esp8266/build_contexts/build_ctx_708695957/build/objs/mgos_wifi.c.o:(.text.dns_ev_handler+0x8): undefined reference to `mg_dns_send_reply'
/fwbuild-volumes/2.0/apps/empty-2.0/esp8266/build_contexts/build_ctx_708695957/build/objs/mgos_wifi.c.o: In function `dns_ev_handler':
/fwbuild-volumes/2.0/apps/empty-2.0/esp8266/build_contexts/build_ctx_708695957/libs/wifi/src/mgos_wifi.c:110: undefined reference to `mg_dns_create_reply'
/fwbuild-volumes/2.0/apps/empty-2.0/esp8266/build_contexts/build_ctx_708695957/build/objs/mgos_wifi.c.o: In function `mgos_sys_config_get_wifi_ap_ip':
/fwbuild-volumes/2.0/apps/empty-2.0/esp8266/build_contexts/build_ctx_708695957/libs/wifi/src/mgos_wifi.c:110: undefined reference to `mg_dns_reply_record'
/fwbuild-volumes/2.0/apps/empty-2.0/esp8266/build_contexts/build_ctx_708695957/build/objs/mgos_wifi.c.o: In function `dns_ev_handler':
/fwbuild-volumes/2.0/apps/empty-2.0/esp8266/build_contexts/build_ctx_708695957/libs/wifi/src/mgos_wifi.c:110: undefined reference to `mg_dns_send_reply'
collect2: error: ld returned 1 exit status
make: *** [/fwbuild-volumes/2.0/apps/empty-2.0/esp8266/build_contexts/build_ctx_708695957/build/objs/empty-2.0.elf] Error 1
/mongoose-os/fw/platforms/esp8266/Makefile.build:444: recipe for target '/fwbuild-volumes/2.0/apps/empty-2.0/esp8266/build_contexts/build_ctx_708695957/build/objs/empty-2.0.elf'
ailed
make: Leaving directory '/app'
Error: exit status 2
Error: build failed
mos build --clean --arch esp32
CC mg_build_info.o
AR /fwbuild-volumes/2.0/apps/empty-2.0/esp32/build_contexts/build_ctx_560511596/build/objs/mosapp/libmosapp.a
make[1]: Leaving directory '/fwbuild-volumes/2.0/apps/empty-2.0/esp32/build_contexts/build_ctx_560511596/build/objs/mosapp'
LD /fwbuild-volumes/2.0/apps/empty-2.0/esp32/build_contexts/build_ctx_560511596/build/objs/empty-2.0.elf
/fwbuild-volumes/2.0/apps/empty-2.0/esp32/build_contexts/build_ctx_560511596/build/objs/mosapp/libmosapp.a(mgos_wifi.o): In function `scan_cb_cb':
/fwbuild-volumes/2.0/apps/empty-2.0/esp32/build_contexts/build_ctx_560511596/libs/wifi/src/mgos_wifi.c:310: undefined reference to `mg_dns_create_reply'
/fwbuild-volumes/2.0/apps/empty-2.0/esp32/build_contexts/build_ctx_560511596/libs/wifi/src/mgos_wifi.c:310: undefined reference to `mg_dns_reply_record'
/fwbuild-volumes/2.0/apps/empty-2.0/esp32/build_contexts/build_ctx_560511596/libs/wifi/src/mgos_wifi.c:310: undefined reference to `mg_dns_send_reply'
/fwbuild-volumes/2.0/apps/empty-2.0/esp32/build_contexts/build_ctx_560511596/build/objs/mosapp/libmosapp.a(mgos_wifi.o):(.text.dns_ev_handler$part$0+0x2a): undefined reference to
`mg_dns_create_reply'
/fwbuild-volumes/2.0/apps/empty-2.0/esp32/build_contexts/build_ctx_560511596/build/objs/mosapp/libmosapp.a(mgos_wifi.o): In function `mgos_sys_config_get_wifi_ap_ip':
/fwbuild-volumes/2.0/apps/empty-2.0/esp32/build_contexts/build_ctx_560511596/libs/wifi/src/mgos_wifi.c:310: undefined reference to `mg_dns_reply_record'
/fwbuild-volumes/2.0/apps/empty-2.0/esp32/build_contexts/build_ctx_560511596/build/objs/mosapp/libmosapp.a(mgos_wifi.o): In function `dns_ev_handler':
/fwbuild-volumes/2.0/apps/empty-2.0/esp32/build_contexts/build_ctx_560511596/libs/wifi/src/mgos_wifi.c:310: undefined reference to `mg_dns_send_reply'
collect2: error: ld returned 1 exit status
/opt/Espressif/esp-idf/make/project.mk:388: recipe for target '/fwbuild-volumes/2.0/apps/empty-2.0/esp32/build_contexts/build_ctx_560511596/build/objs/empty-2.0.elf' failed
make: *** [/fwbuild-volumes/2.0/apps/empty-2.0/esp32/build_contexts/build_ctx_560511596/build/objs/empty-2.0.elf] Error 1
make: Leaving directory '/app'
Error: exit status 2
Error: build failed
rojer commented 6 years ago

yes, i see the problem. will work on a fix.

rojer commented 6 years ago

fixed by https://github.com/mongoose-os-libs/mongoose/commit/f77042513b04137a2e1955a5b1e609308d168283