apache/mynewt-newt

build.sh on windows is not creating binary where it should

Closed this issue · 4 comments

sjanc commented

newt binary is left in /tmp folder which deleted at then end of script...

There seems to be some subtle change in go 1.12 about how it handles paths..

utzig commented

If just run go build on newt path does it work?

sjanc commented

yeap, it works just fine and binary is in folder I executed 'go build'.
I suspect build.sh magic with tmp godir etc is causing issues...

sjanc commented

ok, the issue was not running msys2 shell as administrator (which prevented symlinks from working). Closing.

Hi @sjanc,

Running the msys2 shell as administrator didn't work for me on Windows 10 system.

For those trying to build newt from source before running ./build.sh open the file and comment out rm -rf "$godir"

Run ./build.sh
Go to your msys2 install directory and look inside the /tmp folder. You will find the newt build directory and then navigate to /newt and you will find the newt.exe file.