You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This happens with any version from go version devel +b7c600d Mon Aug 14 18:45:21 2017 +0000 linux/amd64 onward, and reproduces in the current git tip go version devel +9c9df65.
What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOOS="linux"
What did you do?
If you have a git clone of the Go tree on amd64 Linux, you update the tree with eg 'git pull', and you attempt to rebuild without removing linux_amd64_shared/runtime/cgo.a, you'll get a failure during TestBuildmodePIE:
--- FAIL: TestBuildmodePIE (1.19s)
go_test.go:312: running testgo [build -buildmode=pie -o /tmpfs/gotest561625280/main /tmpfs/gotest561625280/main.go]
go_test.go:325: standard error:
go_test.go:326: # command-line-arguments
/tmp/go/pkg/linux_amd64_shared/runtime/cgo.a(_go_.o): object is [linux amd64 devel +25b040c Wed Aug 16 10:07:47 2017 +0000 X:framepointer] expected [linux amd64 devel +b26ad60 Wed Aug 16 15:30:35 2017 +0000 ]
/tmp/go/pkg/linux_amd64_shared/runtime/cgo.a(asm_amd64.o): object is [linux amd64 devel +25b040c Wed Aug 16 10:07:47 2017 +0000] expected [linux amd64 devel +b26ad60 Wed Aug 16 15:30:35 2017 +0000 ]
go_test.go:335: go [build -buildmode=pie -o /tmpfs/gotest561625280/main /tmpfs/gotest561625280/main.go] failed unexpectedly: exit status 2
FAIL
FAIL cmd/go 40.721s
A typical reproduction on a system with a /usr/bin/go is:
clone the git repo into /tmp: cd /tmp; git clone https://go.googlesource.com/go
set up to build: export GOROOT_BOOTSTRAP=$(/usr/bin/go env GOROOT)
step back a version or two: cd go; git checkout 25b040c
build and test that version: cd src; ./all.bash
check out the current version: git checkout master
try to build and test the current version: ./all.bash
The last step will fail. Removing the cgo.a file and retrying the ./all.bash will cause the build to succeed.
My testing says that this was introduced in commit b7c600d, 'cmd/go, cmd/link: enable buildmode=pie on darwin/amd64', intended to fix #21220. This commit is where TestBuildmodePIE is added.
The text was updated successfully, but these errors were encountered:
What version of Go are you using (
go version
)?This happens with any version from
go version devel +b7c600d Mon Aug 14 18:45:21 2017 +0000 linux/amd64
onward, and reproduces in the current git tipgo version devel +9c9df65
.What operating system and processor architecture are you using (
go env
)?What did you do?
If you have a git clone of the Go tree on amd64 Linux, you update the tree with eg 'git pull', and you attempt to rebuild without removing
linux_amd64_shared/runtime/cgo.a
, you'll get a failure during TestBuildmodePIE:A typical reproduction on a system with a /usr/bin/go is:
cd /tmp; git clone https://go.googlesource.com/go
export GOROOT_BOOTSTRAP=$(/usr/bin/go env GOROOT)
cd go; git checkout 25b040c
cd src; ./all.bash
git checkout master
./all.bash
The last step will fail. Removing the cgo.a file and retrying the
./all.bash
will cause the build to succeed.My testing says that this was introduced in commit b7c600d, 'cmd/go, cmd/link: enable buildmode=pie on darwin/amd64', intended to fix #21220. This commit is where TestBuildmodePIE is added.
The text was updated successfully, but these errors were encountered: