Esp32 mongoose-os-modbus-example. mos build errors

Hi.
I’d like to flash my esp32 with modbus-example-master, but when I start building the error appears:

$ mos build --platform esp32
Connecting to https://build.mongoose-os.com, user test
Uploading sources (1983 bytes)
Reading lib at "https://github.com/mongoose-os-libs/boards"...
Reading lib at "https://github.com/mongoose-os-libs/ca-bundle"...
Reading lib at "https://github.com/mongoose-os-libs/wifi"...
Reading lib at "https://github.com/mongoose-os-libs/rpc-service-config"...
zz_boards: Does not exist, cloning from "https://github.com/mongoose-os-libs/boards"...
Reading lib at "https://github.com/mongoose-os-libs/http-server"...
Reading lib at "../mongoose-os-modbus"...
ca-bundle: Does not exist, cloning from "https://github.com/mongoose-os-libs/ca-bundle"...
Reading lib at "https://github.com/mongoose-os-libs/rpc-service-fs"...
modbus: Prepared local dir: "/data/fwbuild-volumes/latest/apps/modbus-example/esp32/build_contexts/mongoose-os-modbus"
Reading lib at "https://github.com/mongoose-os-libs/rpc-service-gpio"...
rpc-service-gpio: Does not exist, cloning from "https://github.com/mongoose-os-libs/rpc-service-gpio"...
rpc-service-config: Does not exist, cloning from "https://github.com/mongoose-os-libs/rpc-service-config"...
wifi: Does not exist, cloning from "https://github.com/mongoose-os-libs/wifi"...
Reading lib at "https://github.com/mongoose-os-libs/rpc-uart"...
http-server: Does not exist, cloning from "https://github.com/mongoose-os-libs/http-server"...
Error: open /data/fwbuild-volumes/latest/apps/modbus-example/esp32/build_contexts/mongoose-os-modbus/mos.yml: no such file or directory
/src/cli/manifest_parser/manifest_parser.go:1093: reading manifest "/data/fwbuild-volumes/latest/apps/modbus-example/esp32/build_contexts/mongoose-os-modbus/mos.yml"
/src/cli/manifest_parser/manifest_parser.go:1000: 
/src/cli/manifest_parser/manifest_parser.go:692: 
/src/cli/manifest_parser/manifest_parser.go:905: 
/src/cli/manifest_parser/manifest_parser.go:779: 
/src/cli/manifest_parser/manifest_parser.go:556: 
/src/cli/manifest_parser/manifest_parser.go:143: 
/src/cli/build_local.go:146: error parsing manifest
/src/cli/build.go:270: 
/src/cli/build.go:213: 
/src/cli/main.go:198: build failed
rpc-uart: Does not exist, cloning from "https://github.com/mongoose-os-libs/rpc-uart"...
rpc-service-fs: Does not exist, cloning from "https://github.com/mongoose-os-libs/rpc-service-fs"...
Reading lib at "https://github.com/mongoose-os-libs/core"...
Error: /src/cli/build_remote.go:333: build failed
/src/cli/build.go:270: 
/src/cli/build.go:213: 
/src/cli/main.go:198: build failed
exit status 1

What’s wrong???

Since that example does not belong to the mOS distribution, you sould contact the author.
As far as I can tell, the build log is pretty informative

There is no mongoose-os-modbus directory in your build path; or it does not have the mos.yml file in it
Perhaps you are trying to compile an example without a library referenced by it ?
If you check the mos.yml file in your example, you’ll see it references a local directory for build purposes:

- origin: ../mongoose-os-modbus

and my bet is that you don’t have it or at least it is not where the example expects it to be.

2 Likes

Thanks, for your help!
I changed

origin: …/mongoose-os-modbus

to

origin: GitHub - mongoose-os-libs/modbus: Modbus implementation

and the building ended successfully.