karalabe / xgo

Go CGO cross compiler
MIT License
2.14k stars 280 forks source link

xgo not creating any binaries #178

Closed nevadascout closed 4 years ago

nevadascout commented 4 years ago

I'm trying to build a go app based on the zserge/webview library for MacOS from Linux using Jenkins and Docker.

xgo runs and returns exit code 0, but it doesn't generate any binary files

$ cd /home/jenkins/workspace/branchname/gopath/src/github.com/nevadascout/my-app/
$ mkdir bin_dist/
$ xgo --dest bin_dist/ --out my-app --targets=darwin-10.10/amd64 .
Cross compiling github.com/nevadascout/my-app...
Building locally github.com/nevadascout/my-app...
Compiling for darwin-10.10/amd64...
Cleaning up build environment...

$ echo $?
0

$ ls -lah bin_dist/
total 4.0K
drwxr-xr-x  3 root root   34 Jan 21 11:06 .
drwxr-xr-x 12 root root 4.0K Jan 21 11:06 ..

I've tried running it with and without the --dest and --out flags, but it still doesn't generate any binaries in any place that I can find.

Where are the output binaries supposed to be?

nevadascout commented 4 years ago

It turns out that binaries are written to the /build/ directory!

Hope this helps anyone else having this problem.