Skip to content
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

Unable to compile MIPS Go using steps provided in README #1

Open
jberlet opened this issue Jun 24, 2022 · 0 comments
Open

Unable to compile MIPS Go using steps provided in README #1

jberlet opened this issue Jun 24, 2022 · 0 comments

Comments

@jberlet
Copy link

jberlet commented Jun 24, 2022

Hello,
I am trying to compile the MIPS Go binary using the steps you listed and am getting the following error:
`./make.bash

Building Go bootstrap tool.

cmd/dist

Building Go toolchain using /usr/local/go.

bootstrap/cmd/internal/obj
bootstrap/cmd/internal/obj/arm
bootstrap/cmd/internal/obj/arm64
bootstrap/cmd/internal/obj/mips
bootstrap/cmd/internal/obj/ppc64
bootstrap/cmd/internal/obj/s390x
bootstrap/cmd/internal/obj/x86
bootstrap/cmd/asm/internal/arch
bootstrap/cmd/asm/internal/lex
bootstrap/cmd/asm/internal/asm
bootstrap/cmd/asm
bootstrap/cmd/compile/internal/ssa
bootstrap/cmd/compile/internal/gc
bootstrap/cmd/compile/internal/amd64
bootstrap/cmd/compile/internal/arm
bootstrap/cmd/compile/internal/arm64
bootstrap/cmd/compile/internal/mips
bootstrap/cmd/compile/internal/mips64
bootstrap/cmd/compile/internal/ppc64
bootstrap/cmd/compile/internal/s390x
bootstrap/cmd/compile/internal/x86
bootstrap/cmd/compile
bootstrap/cmd/link/internal/ld
bootstrap/cmd/link/internal/amd64
bootstrap/cmd/link/internal/arm
bootstrap/cmd/link/internal/arm64
bootstrap/cmd/link/internal/mips
bootstrap/cmd/link/internal/mips64
bootstrap/cmd/link/internal/ppc64
bootstrap/cmd/link/internal/s390x
bootstrap/cmd/link/internal/x86
bootstrap/cmd/link

Building go_bootstrap for host, linux/amd64.

runtime/internal/sys
2022/06/22 17:57:54 Invalid GOMIPS value. Valid values are: soft-float/hard-floa t, mips32/mips32r2.
If more than one, separate them with comma. E.g. GOMIPS=soft-float,mips32.
go tool dist: FAILED: /home/johnb/goproj/ddwrt/go-mips32/pkg/tool/linux_amd64/co mpile -pack -o /tmp/go-tool-dist-2499533563/runtime/internal/sys/go.a -p runti me/internal/sys /home/johnb/goproj/ddwrt/go-mips32/src/runtime/internal/sys/arch .go /home/johnb/goproj/ddwrt/go-mips32/src/runtime/internal/sys/arch_amd64.go /h ome/johnb/goproj/ddwrt/go-mips32/src/runtime/internal/sys/intrinsics.go /home/jo hnb/goproj/ddwrt/go-mips32/src/runtime/internal/sys/stubs.go /home/johnb/goproj/ ddwrt/go-mips32/src/runtime/internal/sys/sys.go /home/johnb/goproj/ddwrt/go-mips 32/src/runtime/internal/sys/zgoarch_amd64.go /home/johnb/goproj/ddwrt/go-mips32/ src/runtime/internal/sys/zgoos_linux.go /home/johnb/goproj/ddwrt/go-mips32/src/r untime/internal/sys/zversion.go: exit status 1
`

I tried setting the GOMIPS to GOMIPS=soft-float but then that generates the following error:
##### Building Go bootstrap tool. cmd/dist go: invalid GOMIPS: must be hardfloat, softfloat

It appears that my golang dev. environment is confusing the mips32 go environment I am trying to build for but I am not sure how to tell the main.bash bootstrap to ignore that environment setup.

Golang installed on my Rocky Linux desktop:
go1.18.3
Host OS (Linux): Rocky Linux release 8.5 (Green Obsidian)
All steps below (from your README) work except:
git clone https://go.googlesource.com/go go-mips32 cd go-mips32 git reset --hard 26e726c3092264584053a4f81714dcc8c91d2153 git pull https://go.googlesource.com/go refs/changes/58/37958/1 cd src GOROOT_BOOTSTRAP=/usr/local/go ./make.bash
**** Last line above Generates error mentioned earlier ****
Thank you!
John

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant