Copyright ©

Mongoose OS Forum


local build compilation error, not found

ziarehmanziarehman pakistan
edited April 2018 in Mongoose OS

OS: Windows 7 64bit
mos version latest.
docker version latest.

i am trying to build demo-c i.e. A demo Mongoose OS firmware for C/C++ . now when i write in terminal
mos build --verbose --platform esp32
it works and build fine.
but when i try to build locally, such as:
mos build --local --verbose --platform esp32
it is showing me following error:

-DMGOS_HAVE_SPI=1 -DMGOS_HAVE_PWM=1 -DMGOS_HAVE_SNTP=1 -DMGOS_HAVE_MQTT=1 -DMGOS_HAVE_DASH=1' 'APP_FS_FILES=/z/Mongoos/demo-c-master/deps/ca-bundle/fs/ca.pem /z/Mongoos/demo-c-master/fs/index.html' 'FW_DIR=build/fw' 'MGOS_HAVE_SPI=1' 'APP_BIN_LIBS=/z/Mongoos/demo-c-master/deps/mongoose/lib/esp8266/libmongoose.a /z/Mongoos/demo-c-master/deps/ota-shadow/lib/esp8266/libota-shadow.a /z/Mongoos/demo-c-master/deps/dash/lib/esp8266/libdash.a /z/Mongoos/demo-c-master/deps/ota-http-client/lib/esp8266/libota-http-client.a /z/Mongoos/demo-c-master/deps/ota-http-server/lib/esp8266/libota-http-server.a /z/Mongoos/demo-c-master/deps/rpc-service-ota/lib/esp8266/librpc-service-ota.a' 'MGOS_HAVE_DEMO_BUNDLE=1' 'APP_VERSION=1.0' 'MGOS_HAVE_OTA_HTTP_SERVER=1' 'APP=demo-c-master' 'MGOS_HAVE_SHADOW=1' 'MGOS_HAVE_ADC=1'
**make: Entering directory '/app'
make: Leaving directory '/app'
make: /mongoose-os/fw/platforms/esp8266/ No such file or directory
make: *** No rule to make target '/mongoose-os/fw/platforms/esp8266/'.  Stop.
Error: exit status 2**


  • nliviunliviu Romania

    It's strange that you specify --platform esp32 and the error is related to esp8266.
    Did you try to mos build --local --verbose --platform esp32 --clean or delete the deps and build directories an build again?

  • ziarehmanziarehman pakistan

    oh i mistakenly posted esp32 command and shown esp8266 error, actually i tried mos build --local --verbose --platform esp8266 and the above mentioned error appeared. also with newly created demo-c folder tried to build for esp32 with mos build --local --verbose --platform esp32, but the same error appeared.

  • ziarehmanziarehman pakistan
    edited May 2018

    i have also tried as per your suggestion mos build --local --verbose --platform esp32 --clean but again the same error appeared.

    /z/Mongoos/SmartMeter_vbeta/deps/pppos/include /z/Mongoos/SmartMeter_vbeta/deps/pwm/include /z/Mongoos/SmartMeter_vbeta/deps/rpc-loopback/include /z/Mongoos/SmartMeter_vbeta/deps/rpc-mqtt/include /z/Mongoos/SmartMeter_vbeta/deps/rpc-service-config/include /z/Mongoos/SmartMeter_vbeta/deps/rpc-service-fs/include /z/Mongoos/SmartMeter_vbeta/deps/rpc-service-gpio/include /z/Mongoos/SmartMeter_vbeta/deps/rpc-service-i2c/include /z/Mongoos/SmartMeter_vbeta/deps/rpc-service-ota/include /z/Mongoos/SmartMeter_vbeta/deps/rpc-uart/include /z/Mongoos/SmartMeter_vbeta/deps/spi/include /z/Mongoos/SmartMeter_vbeta/deps/vfs-dev-spi-flash/include /z/Mongoos/SmartMeter_vbeta/include' 'MGOS_HAVE_VFS_DEV_SPI_FLASH=1' 'MGOS_HAVE_RPC_LOOPBACK=1' 'MGOS_WIFI_ENABLE_AP_STA=1' 'MGOS_HAVE_RPC_SERVICE_ATCA=1' 'MGOS_HAVE_RPC_SERVICE_I2C=1' 'MGOS_HAVE_RPC_MQTT=1' 'MGOS_HAVE_RPC_UART=1'
    make: /mongoose-os/fw/platforms/esp32/ No such file or directory
    make: *** No rule to make target '/mongoose-os/fw/platforms/esp32/'.  Stop.
    make: Entering directory '/app'
    make: Leaving directory '/app'
    Error: exit status 2
  • nliviunliviu Romania

    This is Docker Toolbox related issue.
    You have to add /z to virtual machine's "Shared Folders"

  • ziarehmanziarehman pakistan

    thanks, it worked!
    but its taking about 4 times more time than online build,
    i am building demo-c example code, is there any thing i am missing or a way to build fast.

  • nliviunliviu Romania
    edited May 2018

    The build process needs to download all necessary libraries and modules.
    Depending on your internet connection speed, it will take a certain time...
    Forgot to mention that at the first run, the docker build image will be downloaded too (~1GB for ESP32, ~900MB for ESP8266).

  • I am getting the same error(s) shown above.

    I have two questions to ask, please:

    1. After the installation of Docker Toolbox in Win7, what do I need to do to set up this environment to work with mos? Is there a link you can provide please?
    2. What is meant by 'You have to add /z to virtual machine's "Shared Folders"'? Where do you add /z?


  • Solved for me as well. In my case, I already had /c and /d shared in Docker (shown as C: and D: under Win10). Something must have gone stale since I first installed docker or the image I was working with because disabling /d prompted me for my password again then the PC spun its gears for a minute. After this, the local build worked fine!

Sign In or Register to comment.