-
Notifications
You must be signed in to change notification settings - Fork 279
MIPS support? #46
Comments
Hmmm, will need to look into MIPS C/C++ toolchains too for this. Can't promise anything just yet but I'll look into it :) |
Thanks! And no worries if it doesn't work out, I was just curious since it seemed semi-possible now that the go compiler supports it. Thanks again! :) |
Currently Go doesn't support CGO linking on MIPS64x platforms :( Relevant issues:
Relevant CLs: Until these CLs get merged in I can't add cross compilation support. But will keep this issue open for future memo :) |
Ah, that's a shame. Thanks for looking into it! |
Seems 1.7 has cgo support for MIPS too. Will investigate this again. |
Oh awesome, thanks! |
Pling :) I've pushed in a change that should enable MIPS64 and MIPS64le support. Note, that you'll need the 1.7beta1 image at least as it's needed for CGO stuff. Also I don't have a MIPS platform to try out, so apart from checking that builds produce a binary, I couldn't actually try it out. Perhaps if you'd be so kind, I'd appreciate some feedback on this front. PS: Docker hub seems to be many hours behind in building automated builds, so you'll probably need to build the images yourself for now if you want to try it out. |
Woo! \o/ I'm on the road at the moment for a work trip, but I'll test it out as soon as I get home |
Hello @karalabe and @polyfractal , I was having an issue when trying to build the "flannel" package for MIPS, which needs go, and it was failing like this:
That was with go-1.6.1. Then I updated go to 1.7beta2 and it worked fine. |
Hi @karalabe, finally had a chance to give this a shot (sorry for the delay). I'm running into an error, but I think it's related to the layout of the target Go package, and not the xgo specifically. I'm trying to compile MetricBeat. The various beats all live in sub-directories of the main Beats repo, and I think that may be causing the problem since it isn't at the "root" of the repo?
|
@polyfractal Sorry, been having some crisis at my day job + been on a holiday afterwards. Seems your import path is wrong, should be just |
Sorry, again, for the massive delay. Life and all that :) I tried again with a fresh pull of the docker image, and this is the result:
|
So I had a closer look at this, and it's just a problem with one of the vendored dependencies. I forked the project, patched it with some build tags... but seem to be unable to get xgo to use the correct code. I even removed the offending file in my forked repo. Xgo still tries to compile it, making me think it's working off the parent repo instead:
Notice that it's trying to compile The command above has all the bell's and whistle's enabled in an attempt to fix the problem, but it should be noted that the basic command has similar behavior ( |
I've been having a bit of a poke around and have managed to get one of the other builds in your repo building:
Did your remove |
Hm, interesting! |
Uploaded it onto my router - still getting issues however:
Going to keep poking around to see if I can get it running. |
I just played around with MIPS 32 support (will pish soon)in an emulator, and apparently CGO/gcc may pull in a lot of dynamically linked libraries that won't be available on the device you're building to. I managed to solve those issue for my use case by adding |
* Enhancement: Support for s390x and ppc64le * Fix : Adjust go version verificatino for s390x and powerpc cross compile
Thanks for xgo, this looks really great! I was curious if MIPS support is possible? The 1.6 release notes mentioned that
linux/mips64
andlinux/mips64le
were now experimentally supported: https://golang.org/doc/go1.6#ports.I was hoping to crosscompile some go programs to my router :)
The text was updated successfully, but these errors were encountered: