-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/compile: go1.8 failed to install from source on mips64le #19140
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
My understanding is that you need to have an FPU. |
@isolesty Could you use a debugger to find out what the faulty instruction is? |
@cherrymui Sorry, I can't get any useful information in gdb. Thread 1 "go" received signal SIGILL, Illegal instruction. P.S. It builds successfully on Loongson 3a 2000 and Loongson 3a 3000, failed on Loongson 3b 1500. So it may be a CPU dependent error. Some programs builded by go 1.7 get the same illegal instruction error on Loongson 3b 1500. |
Is there any instruction that Loongson 3a has but Loongson 3b doesn't? |
When it receives SIGILL in gdb, could you run |
The fault is in |
Sorry, I don't know the difference between 3a 2000 and 3b 1500. In gdb, the x/i $pc show
|
|
@cherrymui I use a new gcc from Debian and go 1.8 builds successfully. The failed gcc had been patched by Loongson, I will report this bug to Loongson. |
What version of Go are you using (
go version
)?go 1.8 bootstrap from amd64
What operating system and processor architecture are you using (
go env
)?go env from go-linux-mips64le-bootstrap/bin/go
GOARCH="mips64le"
GOBIN=""
GOEXE=""
GOHOSTARCH="mips64le"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/test/go"
GORACE=""
GOROOT="/home/test/go-linux-mips64le-bootstrap"
GOTOOLDIR="/home/test/go-linux-mips64le-bootstrap/pkg/tool/linux_mips64le"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -mabi=64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build176825134=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
What did you do?
try to build go 1.8 from source on loongson
What did you expect to see?
successfully build go 1.8 on mips64le
the same steps from https://golang.org/doc/install/source build go 1.7.5 right.
What did you see instead?
cmd/compile/internal/gc
cmd/compile/internal/arm
cmd/compile/internal/arm64
cmd/compile/internal/mips
cmd/compile/internal/amd64
cmd/compile/internal/mips64
cmd/compile/internal/ppc64
cmd/compile/internal/s390x
cmd/compile/internal/x86
cmd/compile
SIGILL: illegal instruction
PC=0x1203ce804 m=0 sigcode=128
goroutine 0 [idle]:
goroutine 1 [runnable, locked to thread]:
runtime.init.3()
/home/test/go/src/runtime/proc.go:214 +0x1c
runtime.init()
/home/test/go/src/runtime/write_err.go:14 +0x108
runtime.main()
/home/test/go/src/runtime/proc.go:141 +0x100
runtime.goexit()
/home/test/go/src/runtime/asm_mips64x.s:868 +0x4
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/home/test/go/src/runtime/asm_mips64x.s:868 +0x4
r0 0x0 r1 0xffffd38ef0
r2 0x2d8 r3 0xffffd38eb8
r4 0xffffd38ef0 r5 0x1206b34a0
r6 0x1206b2f20 r7 0xc420000d00
r8 0x0 r9 0xfff1554000
r10 0x1350 r11 0x1204e0322
r12 0x0 r13 0x0
r14 0xc41fffff8c r15 0xf3
r16 0x0 r17 0x120063c48
r18 0x0 r19 0xffffd38dc0
r20 0xffffd38eb8 r21 0x12004e078
r22 0x1204c4548 r23 0x120670000
r24 0x0 r25 0x1203ce800
r26 0xc420030800 r27 0x0
r28 0x100000000 r29 0xffffd38e88
r30 0x1206b2f20 r31 0x120063bc4
pc 0x1203ce804 link 0x120063bc4
lo 0xd00 hi 0x0
SIGILL: illegal instruction
PC=0x1203ce804 m=0 sigcode=128
goroutine 0 [idle]:
goroutine 1 [runnable, locked to thread]:
runtime.gcenable()
/home/test/go/src/runtime/mgc.go:210 +0x1c
runtime.main()
/home/test/go/src/runtime/proc.go:151 +0x140
runtime.goexit()
/home/test/go/src/runtime/asm_mips64x.s:868 +0x4
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/home/test/go/src/runtime/asm_mips64x.s:868 +0x4
r0 0x0 r1 0xffffe69270
r2 0x2d8 r3 0xffffe69238
r4 0xffffe69270 r5 0x1206b34a0
r6 0x1206b2f20 r7 0xc4200011e0
r8 0x0 r9 0xffec5d4000
r10 0x1b00 r11 0x1204e0322
r12 0x0 r13 0x0
r14 0xc41fffff65 r15 0xf3
r16 0x0 r17 0x120063c48
r18 0x0 r19 0xffffe69140
r20 0xffffe69238 r21 0x12004e078
r22 0x1204c4548 r23 0x120670000
r24 0x30 r25 0x1203ce800
r26 0x0 r27 0x0
r28 0x100000000 r29 0xffffe69208
r30 0x1206b2f20 r31 0x120063bc4
pc 0x1203ce804 link 0x120063bc4
lo 0x11e0 hi 0x0
The text was updated successfully, but these errors were encountered: