Copyright ©

Mongoose OS Forum

ATTENTION! This forum has moved to:

Do not post any new messages.

Help with local build on Windows

I am attempting to make a local build of a project under Windows 10.
After running the following command in the project folder:
mos build --local --arch esp32 --clean --libs-dir ~/.mos/libs --repo ~/.mos/mongoose-os

I get the following error:
make: *** /app\myDemoApp: No such file or directory. Stop.

I'm sure the trouble is with the \ character, but I don't know how to fix it. I can see that the following is being used by Docker in the failed build log:
nice make '-j' '8' '-C' '/app\myDemoApp' '-f'

I am able to use the same build command to compile the test project from mos init. In the log, I can see this builds using:
nice make '-j' '8' '-C' '/app'

Can someone help me fix the backslash or otherwise fix this? Thanks!


  • BTW the same project builds fine on Mac and Linux. Please help!

  • SergeySergey Dublin, Ireland

    make sure there no spaces in the path

  • Thanks @Sergey , but there are no spaces in the path. Any other ideas?

  • nliviunliviu Romania

    Could you post your full build log on pastebin or similar, please?

  • nliviunliviu Romania

    I assume you are running mos build in ...\yetiFirmwareESP32 and all the source files are in ...\yetiFirmwareESP32\AWSGoalZero\src. At least that's what I understand reading the log.
    There is something strange about the generated mounting points:

    mount from "C:\\Users\\srobison1\\_work\\_fw\\fw_projects\\yeti_wifi\\yetiFirmwareESP32" to "/app"
    mount from "C:\\Users\\srobison1\\_work\\_fw\\fw_projects\\yeti_wifi\\yetiFirmwareESP32\\AWSGoalZero\\build" to "/c/Users/srobison1/_work/_fw/fw_projects/yeti_wifi/yetiFirmwareESP32/AWSGoalZero/build"

    /app is ok, but, AFAIK, build should read

    mount from "C:\\Users\\srobison1\\_work\\_fw\\fw_projects\\yeti_wifi\\yetiFirmwareESP32\\build" to "/c/Users/srobison1/_work/_fw/fw_projects/yeti_wifi/yetiFirmwareESP32/build"

    Somehow mos appends AWSGoalZero in '-C' '/app\AWSGoalZero'
    Can you create a simple project to reproduce this issue and publish it?

    Let's hope @Sergey or @rojer have an ideea.

  • I'm suffering the exact same problem as the OP. I am using the following command, which has worked for the last 2 months, but has suddenly broken.
    mos build --local --arch esp8266 --repo $REPO_DIR --libs-dir $LIBS_DIR --verbose

  • Comparing the build/build.log of a successful and non-successful build, I can see this:

    Successful build:
    mount from "C:\\Users\\andrew.jones\\Downloads\\SSS\\myAppName" to "/app"

    Unsuccessful build:
    mount from "C:\\Users\\andrew.jones\\Downloads\\SSS" to "/app"

    Which eventually yields the error: /app\myAppName: No such file or directory.

  • edited July 2018

    Found the bug and the solution.

            appMountPath := ""
            appSubdir := ""
            if gitToplevelDir == "" {
                // We're outside of any git repository: will just mount the application
                // path
                appMountPath = appPath
                appSubdir = ""
            } else {
                // We're inside some git repo: will mount the root of this repo, and
                // remember the app's subdir inside it.
                appMountPath = gitToplevelDir
                appSubdir = appPath[len(gitToplevelDir):]

    Move your .git folder away from your project directory (not a parent!) and the problem will go away.

    This would explain why some users are experiencing issues with local build and some are not; their preferences for source control.

  • Sambo007Sambo007 USA
    edited July 2018


    I tried your suggestion and wasn't as lucky.

    Would you, or anybody else, kindly take a look at my problem and advise?

    I am currently using VS Code, which is much more productive than mos online IDE - IntelliSense, quickly jumping to include files and function definitions, etc...

    I wish invoking 'mos build --local' generates a Docker/Linux script file that we can edit in order to correct any error(s) and be able to run it manually later; although I'm still learning how to interact with the Docker environment.

    I really like Mongoose-OS and I hope the guys behind it extend a helping hand.


  • edited July 2018

    Yours is a separate (but similar) problem.
    When you build, you are getting past the mount from <path> to "/app" issue we were having (which is git related) and having a separate one.

    I think you're correct that the issue is here:
    mount from "/d/Embedded/_Development/_IoT/_Projects/MgOS/ESP8266/demo-c/deps/mongoose-os" to "/mongoose-os"

    Could you show us the full build --local command that you are using, including all arguments?

    Just for reference, my (working) one is:
    mos build --local --arch esp8266 --repo $REPO_DIR --libs-dir $LIBS_DIR --verbose

    I have a pretty strong feeling that something is wrong with your $REPO_DIR.

  • I'm happy to report that I dug back into this today after seeing the successful reports by @Sambo007 and @ziarehman . Attempting the local build using the latest mos v2.4.3 downloaded a new docker image (3.0-r11) which I think was half the battle. I was then getting the

    make: /mongoose-os/fw/platforms/esp8266/ No such file or directory
    make: *** No rule to make target '/mongoose-os/fw/platforms/esp8266/'.  Stop.

    error as was being reported by Samboo007 and ziarehman. I then disabled the unused secondary drive (D) share under Docker->Shared Drives and applied the new settings. After this the local build worked as expected. Thanks for all of the posts and suggestions that got me here - hopefully this saves someone else some time!
Sign In or Register to comment.