Building locally without docker

Hi All,
I run OS X and have found local compile times with mongoose os via docker desktop to be unreasonably long sometime taking more than 5-10 minutes! When looking for a way to compile without docker I stumbled upon this repo and updated it for mos 2.20.0 with my fork here. Please take a look and offer any feedback! The installer will download a local toolchain and create a shell script you can use to invoke mos with the proper environment vars set.
I’ve tested it on OS X but I assume it will work on Linux.
Cheers,
Nic

1 Like

Hi @stopthatcow, very nice feature! I confirm that the script working on my Mac (M1 Pro). Thank you very much!

Just tried on M1 pro, I get a bunch of the below warnings then a build fail even when building the demo-c application.

<command-line>: warning: "MGOS_ROOT_FS_OPTS_LFS" redefined
<command-line>: warning: "MGOS_ROOT_FS_OPTS_LFS" redefined
<command-line>: warning: "MGOS_ROOT_FS_OPTS_LFS" redefined
<command-line>: warning: "MGOS_ROOT_FS_OPTS_LFS" redefined
<command-line>: warning: "MGOS_ROOT_FS_OPTS_LFS" redefined
<command-line>: warning: "MGOS_ROOT_FS_OPTS_LFS" redefined
<command-line>: note: this is the location of the previous definition
<command-line>: note: this is the location of the previous definition
<command-line>: note: this is the location of the previous definition
<command-line>: warning: "MGOS_ROOT_FS_OPTS_SPIFFS" redefined
<command-line>: warning: "MGOS_ROOT_FS_OPTS_SPIFFS" redefined
<command-line>: note: this is the location of the previous definition
<command-line>: note: this is the location of the previous definition
<command-line>: warning: "MGOS_ROOT_FS_OPTS_SPIFFS" redefined
<command-line>: warning: "MGOS_ROOT_FS_OPTS_SPIFFS" redefined
<command-line>: warning: "MGOS_ROOT_FS_OPTS_SPIFFS" redefined
<command-line>: note: this is the location of the previous definition
<command-line>: note: this is the location of the previous definition
...
<command-line>: note: this is the location of the previous definition
<command-line>: warning: "MGOS_ROOT_FS_OPTS_SPIFFS" redefined
<command-line>: note: this is the location of the previous definition
<command-line>: warning: "MGOS_ROOT_FS_OPTS_LFS" redefined
<command-line>: note: this is the location of the previous definition
<command-line>: warning: "MGOS_ROOT_FS_OPTS_SPIFFS" redefined
<command-line>: note: this is the location of the previous definition
<command-line>: warning: "MGOS_ROOT_FS_OPTS_SPIFFS" redefined
<command-line>: note: this is the location of the previous definition
<command-line>: warning: "MGOS_ROOT_FS_OPTS_LFS" redefined
<command-line>: note: this is the location of the previous definition
<command-line>: warning: "MGOS_ROOT_FS_OPTS_SPIFFS" redefined
<command-line>: note: this is the location of the previous definition
<command-line>: warning: "MGOS_ROOT_FS_OPTS_SPIFFS" redefined
<command-line>: note: this is the location of the previous definition
<command-line>: warning: "MGOS_ROOT_FS_OPTS_SPIFFS" redefined
<command-line>: note: this is the location of the previous definition
AR build/objs/bootloader_support/libbootloader_support.a
AR build/objs/esp_common/libesp_common.a
Error: exit status 2
/Users/admin/mos/cli/build_local.go:692: 
/Users/admin/mos/cli/build_local.go:475: 
/Users/admin/mos/cli/build.go:278: 
/Users/admin/mos/cli/build.go:221: 
/Users/admin/mos/cli/main.go:194: build failed

I’ve only ever use the docker based build, wondering if the stuffing around I did to get it working with M1 pro has mucked something up.