tripflex / wifi-captive-portal

Mongoose OS WiFi Captive Portal Library
https://forum.mongoose-os.com/discussion/2702/library-wifi-captive-portal-web-ui-list-ssids-test-configure-rpc-gzip-support
Other
24 stars 9 forks source link

Library doesn't build with latest mos tool #12

Closed loicdrbx closed 5 years ago

loicdrbx commented 5 years ago

I'm not not sure why, but I haven't been able to build projects that include this library with the latest mos tool (2.10.2).

My mos.yml file is setup as follows and builds properly when I exclude the library:

author: mongoose-os
description: A JS-enabled demo Mongoose OS firmware
arch: esp32
version: 1.0
manifest_version: 2017-05-18
libs_version: ${mos.version}
modules_version: ${mos.version}
mongoose_os_version: ${mos.version}

config_schema:
  - ["mqtt.server", "iot.eclipse.org:1883"]
  - ["i2c.enable", true]

tags:
  - js

filesystem:
  - fs

libs:
  - origin: https://github.com/mongoose-os-libs/boards
  - origin: https://github.com/mongoose-os-libs/js-demo-bundle
  - origin: https://github.com/tripflex/wifi-captive-portal/

I am getting the following errors:

volumes/2.10.2/apps/app1/esp32/build_contexts/build_ctx_165963155/build/objs/mosapp/libmosapp.a(mgos_deps_init.o):(.rodata.descrs+0x74): undefined reference to `mgos__init'
collect2: error: ld returned 1 exit status
make: *** [/fwbuild-volumes/2.10.2/apps/app1/esp32/build_contexts/build_ctx_165963155/build/objs/app1.elf] Error 1
/opt/Espressif/esp-idf/make/project.mk:435: recipe for target '/fwbuild-volumes/2.10.2/apps/app1/esp32/build_contexts/build_ctx_165963155/build/objs/app1.elf' failed
make: Leaving directory '/app'
Error: exit status 2
/go/src/cesanta.com/mos/build_local.go:648: 
/go/src/cesanta.com/mos/build_local.go:635: 
/go/src/cesanta.com/mos/build_local.go:396: 
/go/src/cesanta.com/mos/build.go:203: 
/go/src/cesanta.com/mos/build.go:146: 
/go/src/cesanta.com/mos/main.go:176: build failed
Error: /go/src/cesanta.com/mos/build_remote.go:281: build failed
/go/src/cesanta.com/mos/build.go:203: 
/go/src/cesanta.com/mos/build.go:146: 
/go/src/cesanta.com/mos/main.go:176: build failed

The full log is attached below. Any help resolving this issue would be much appreciated.

log.txt

tripflex commented 5 years ago

@Wolf4992 thanks for report this (and providing full log).

So I see this as the first issue in the log:

CC /fwbuild-volumes/2.10.2/apps/app1/esp32/build_contexts/build_ctx_800774480/build/objs/bt/bluedroid/btc/profile/std/gatt/btc_gatt_common.o
error: object directory /fwbuild-volumes/2.10.2/mongoose-os/.git/objects does not exist; check .git/objects/info/alternates.
fatal: bad object HEAD
  CC mg_build_info.o

And then this:

CC /fwbuild-volumes/2.10.2/apps/app1/esp32/build_contexts/build_ctx_165963155/build/objs/bt/bluedroid/stack/avct/avct_lcb_act.o
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

Which I suspect is what is causing the issues you're having (appear to be unrelated to this library).

I recommend trying mos update release to switch to release version (which i believe is 2.10.2) or mos update latest to update to the very latest version, and try with both of those to see if you still have issues

You can also completely remove the deps directory and try that again to force it to re-download all libraries.

I'll try and test this myself on a blank project in the next day or two

tripflex commented 5 years ago

You can also try changing your mos.yml file to match:

manifest_version: 2017-09-19
loicdrbx commented 5 years ago

I really appreciate the help @tripflex. In the end, a creating a new app from scratch is what did the trick.

For reference, I tried the following with no success: