karalabe / xgo

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

xgo wrapper? #174

Open CaptainSkywave opened 4 years ago

CaptainSkywave commented 4 years ago

Great work @karalabe ! Have just downloaded and installed xgo-latest on an arm SDB similar to RPi with headless Linux 18.04.3 LTS. When doing this go get github.com/karalabe/xgo I'm informed that go not found and can be installed with sudo apt install golang-go or gccgo-go Do I need to install those also? I suspect I should be issuing go get github.com/karalabe/xgo from inside your xgo-latest docker container? But how to?

ushuz commented 4 years ago

When doing this go get github.com/karalabe/xgo I'm informed that go not found and can be installed with sudo apt install golang-go or gccgo-go

go get install the wrapper on host to make the toolchain easier to use. So you need Golang installed on host if you want to go get the wrapper on host.

I suspect I should be issuing go get github.com/karalabe/xgo from inside your xgo-latest docker container?

No. Inside container, xgo executable is already available so you don't have to run go get. It seems that xgo-in-xgo is viable but haven't tested it myself so I can't say for that. Better stick to xgo-on-host approach for now.

W1M0R commented 4 years ago

@karalabe Is it possible for you to provide the xgo wrapper as a prebuilt-binary and to publish it as a release on this GitHub project's Releases page?

crazy-max commented 4 years ago

@W1M0R You can use this one from my fork if you want.

W1M0R commented 4 years ago

Thanks @crazy-max