-
Notifications
You must be signed in to change notification settings - Fork 18k
x/sys/unix: Does not build on mipsel/mips64el/alpha/powerpc with gccgo #18031
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
By making mipsn64 an alias of mips64, I get this to compile (on mips64el). I also had to add Dup2 based on Dup3 (like in arm64) to get tests passing. |
Want to send a change? https://golang.org/doc/contribute.html /cc @ianlancetaylor |
@bradfitz I will try to prepare a proper patch for mips64, as it seems to work OK. I was just trying to add support for mips, but I am finding some roadblocks, so that might take a while. Hopefully somebody who knows this will be faster than me :) |
@TheTincho: Thank you for bringing up this issue and for pioneering the solution for mips64le, which can be found in https://anonscm.debian.org/cgit/pkg-go/packages/golang-golang-x-sys.git/commit/?id=f11a3adc214152ad98e27e7896b697cfcc376959 For probably more than I year, I had been scratching my head over this, namely, Hugo failing to build on MIPS and Alpha (etc.) architectures on Debian buildd (see https://buildd.debian.org/status/package.php?p=hugo&suite=sid). Your solution opened my eyes! A few things happened since you visited the issue in November 2016:
And it turns out that gccgo reports the same GOARCH of Anyhow, expanding on @TheTincho's idea, I came up with something like this:
to make sure gccgo can see these files, and then run gccgo (e.g. For completeness, here is what I have actually used in debian/rules for the golang-golang-x-sys package: https://anonscm.debian.org/cgit/pkg-go/packages/golang-golang-x-sys.git/commit/?id=bb8f8e16490ce03ce084c8e170ea4c9e79f53ba2 I do wonder though:
My apologies if these questions sound silly, or have been answered elsewhere before. Many thanks! /cc @ianlancetaylor |
It seems like a bug that different GOARCH values are being used between gc and gccgo. |
@anthonyfok Thanks for picking up this issue, I did not have any spare cycles to continue the work so far.. @bradfitz That is an issue that I have experienced a few times already with the MIPS family, having to patch sources to make gccgo work |
I believe that the |
This is also relevant for the sparc64 and powerpcspe architectures. |
Change https://golang.org/cl/262517 mentions this issue: |
Update scripts slightly to work with an unsupported GOARCH. For golang/go#18031 Fixes golang/go#37443 Fixes golang/go# Change-Id: I1a1f7b4be8bf8974b2b627331cbe93416ef21bf3
Change https://golang.org/cl/270317 mentions this issue: |
For golang/go#18031 For golang/go#37443 Change-Id: I49dabb362592bb61532a0c4f193919c3f2036af3 Reviewed-on: https://go-review.googlesource.com/c/sys/+/270317 Trust: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This is the result of re-running mkall.sh. For golang/go#18031 Fixes golang/go#37443
Change https://golang.org/cl/312349 mentions this issue: |
Add system call definitions for 32-bit PowerPC (ppc). These are expected to be used with gccgo, as gc does not have a suitable code generator. These definitions are largely copied from ppc64x, with some 32-bit specific wrappers copied from arm. The glibc definitions of epoll_event and sockaddr_un structures need to be overridden on ppc, similarly to some other architectures. For golang/go#18031 Fixes golang/go#37443 Change-Id: I061ac2b8fa452dd37c2239a0b09dff2f3e9d50da GitHub-Last-Rev: aada37a GitHub-Pull-Request: #106 Reviewed-on: https://go-review.googlesource.com/c/sys/+/312349 Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Go Bot <gobot@golang.org>
as a continuation of the effort that Martín Ferrari started, see golang/go#18031 Due to the current minimal code change to golang.org/x/sys/unix, and to ensure the bool isBigEndian is set correctly, please run gccgo with "-tags mips", "-tags mipsle" or "-tags mips64le" as appropriate.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.6.1 gccgo (Debian 6.2.1-4) 6.2.1 20161119 linux/mipsn64
go version go1.6.1 gccgo (Debian 6.2.1-4) 6.2.1 20161119 linux/mipso32
Same for alpha and powerpc (the 4 arches use gccgo in Debian).
What operating system and processor architecture are you using (
go env
)?What did you do?
(The log of errors is huge, you can see a complete build log here: https://buildd.debian.org/status/fetch.php?pkg=mtail&arch=powerpc&ver=0.0%2Bgit20161027.a7b3e3c-1&stamp=1479766693)
For mips64el, I pressume it is just a disparity of GOARCH between gccgo and gc, and possibly could be fixed by renaminng. But I don't see any support in the code for mipsel/mipso32, alpha, or powerpc (32bits)
The text was updated successfully, but these errors were encountered: