Closed
Description
What version of Go are you using (go version
)?
Currently I'm using 1.15.8 which I compiled on my Netgear ReadyNAS RN204 that is using an Annapurna AL-212 chip.
When trying to build 1.16.x (tried with 1.16 and 1.16.2) I ran into compile problems, telling me about unexpected relocation type 296 (R_ARM_V4BX)
Does this issue reproduce with the latest release?
Yes.
Inspection of the code in question showed that the linker code handling R_ARM_V4BX was removed between 1.15.x and 1.16.
What operating system and processor architecture are you using (go env
)?
go env
Output
$ go env GO111MODULE="" GOARCH="arm" GOBIN="" GOCACHE="/home/stefan/.cache/go-build" GOENV="/home/stefan/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="arm" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/home/stefan/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/stefan/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/lib/go-1.15" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/lib/go-1.15/pkg/tool/linux_arm" GOVCS="" GOVERSION="go1.15.8" GCCGO="gccgo" GOARM="5" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/home/stefan/test/mc/go.mod" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -marm -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1804087667=/tmp/go-build -gno-record-gcc-switches"
What did you do?
go-go1.16.2/$ cd src go-go1.16.2/src$ ./make.bash Building Go cmd/dist using /usr/lib/go-1.15. (go1.15.8 linux/arm) Building Go toolchain1 using /usr/lib/go-1.16. Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1. Building Go toolchain2 using go_bootstrap and Go toolchain1. Building Go toolchain3 using go_bootstrap and Go toolchain2. Building packages and commands for linux/arm. net(.text): unexpected relocation type 296 (R_ARM_V4BX) panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x115a84]
What did you expect to see?
A working build.
What did you see instead?
Go 1.16 and 1.16.2 won't build, see above.