MacOS unable to bundle for Windows
datosh opened this issue · comments
When I tried to bundle for Windows on MacOS I got the following error
[...]
DEBU[0032] Building for os windows and arch amd64
DEBU[0032] Executing go build -ldflags -s -X "main.AppName=Astilectron demo" -X "main.BuiltAt=2018-12-02 13:22:56.834262 +0100 CET m=+32.398994832" -H windowsgui -o /Users/datosh/Code/go-astilectron-demo/output/windows-amd64/binary .
FATA[0032] bundling failed: bundling for environment windows/amd64 failed: building failed: ../../go/src/github.com/sirupsen/logrus/terminal_windows.go:10:2: cannot find package "github.com/konsorten/go-windows-terminal-sequences" in any of:
/usr/local/Cellar/go/1.11/libexec/src/github.com/konsorten/go-windows-terminal-sequences (from $GOROOT)
/Users/datosh/go/src/github.com/konsorten/go-windows-terminal-sequences (from $GOPATH)
../../go/src/github.com/asticode/go-astilog/out.go:9:2: cannot find package "github.com/mattn/go-colorable" in any of:
/usr/local/Cellar/go/1.11/libexec/src/github.com/mattn/go-colorable (from $GOROOT)
/Users/datosh/go/src/github.com/mattn/go-colorable (from $GOPATH)
: exit status 1
After manually go getting the specified package, I got the same error for package github.com/mattn/go-colorable
.
Same procedure. I downloaded it manually via go get, and afterwards was able to build for windows. both amd64 & 386.
Maybe these are just some missing deps in the bundler?
Happy to provide more infos, if needed.
Cheers,
DaTosh
@datosh mmmm I think this is a go get
problem.
Basically when you use go get
, it will install packages needed by your OS (MacOSX in your case). If other packages are needed to cross-compile for another OS, they won't be installed automatically.
Therefore you don't have any other choice than installing them manually.
If anybody has a better solution I'm all ears.
Closing this issue for now.