(Solved) LFS issue while building (ESP8266 and MOS tool 2.15.0)

  1. My goal is: Solve an issue that appeared right after updating mos tool from 2.14.0 to 2.15.0. Code functions normally in previous version but the lfs seems to go bad while building

  2. My actions are: just plain mos build with the same code I was using before

  3. The result I see is:

>   CC    /data/fwbuild-volumes/2.15.0/apps/Master_Lite/esp8266/build_contexts/build_ctx_775061066/deps/vfs-fs-lfs/littlefs1/lfs1.c
>   CC    /data/fwbuild-volumes/2.15.0/apps/Master_Lite/esp8266/build_contexts/build_ctx_775061066/deps/vfs-fs-lfs/littlefs1/lfs1_util.c
> /data/fwbuild-volumes/2.15.0/apps/Master_Lite/esp8266/build_contexts/build_ctx_775061066/deps/vfs-fs-lfs/littlefs/lfs.c: In function 'lfs_dir_compact':
> /data/fwbuild-volumes/2.15.0/apps/Master_Lite/esp8266/build_contexts/build_ctx_775061066/deps/vfs-fs-lfs/littlefs/lfs.c:1503:5: error: "LFS_MIGRATE" is not defined [-Werror=undef]
>  #if LFS_MIGRATE
>      ^
>   CC    /data/fwbuild-volumes/2.15.0/apps/Master_Lite/esp8266/build_contexts/build_ctx_775061066/build/gen/ffi_exports.c
>   CC    /data/fwbuild-volumes/2.15.0/apps/Master_Lite/esp8266/build_contexts/build_ctx_775061066/deps/modules/mongoose-os/src/common/cs_file.c
> cc1: all warnings being treated as errors
> /data/fwbuild-volumes/2.15.0/apps/Master_Lite/esp8266/build_contexts/build_ctx_775061066/deps/modules/mongoose-os/platforms/esp8266/Makefile.build:398: recipe for target '/data/fwbuild-volumes/2.15.0/apps/Master_Lite/esp8266/build_contexts/build_ctx_775061066/build/objs/lfs.c.o' failed
> make: *** [/data/fwbuild-volumes/2.15.0/apps/Master_Lite/esp8266/build_contexts/build_ctx_775061066/build/objs/lfs.c.o] Error 1
> make: *** Waiting for unfinished jobs....
>   CC    /data/fwbuild-volumes/2.15.0/apps/Master_Lite/esp8266/build_contexts/build_ctx_775061066/deps/modules/mongoose-os/src/common/cs_rbuf.c
> make: *** wait: No child processes.  Stop.
> Error: exit status 2
> /go/src/github.com/mongoose-os/mos/mos/build_local.go:679: 
> /go/src/github.com/mongoose-os/mos/mos/build_local.go:666: 
> /go/src/github.com/mongoose-os/mos/mos/build_local.go:431: 
> /go/src/github.com/mongoose-os/mos/mos/build.go:223: 
> /go/src/github.com/mongoose-os/mos/mos/build.go:166: 
> /go/src/github.com/mongoose-os/mos/mos/main.go:196: build failed
> Error: /go/src/github.com/mongoose-os/mos/mos/build_remote.go:326: build failed
> /go/src/github.com/mongoose-os/mos/mos/build.go:223: 
> /go/src/github.com/mongoose-os/mos/mos/build.go:166: 
> /go/src/github.com/mongoose-os/mos/mos/main.go:196: build failed
  1. My expectation & question is:
    To get any insight on how to solve this

The library has been updated to 2.1 in 2.15.0.
Add the following lines in your mos.yml to silence that error

cdefs:
  LFS_MIGRATE: 0
1 Like

Nice nliviu!
Thanks a lot!

Have been fixed with https://github.com/mongoose-os-libs/vfs-fs-lfs/commit/ad140c037e3db5e3b79aa6604712fb5bff315d8c

1 Like

Is it necessary to leave the cdef LFS_MIGRATE: 0?

Not if you are using latest.