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

cmd/link: misc/cgo/testshared fail on ARM64 #17642

Closed
cherrymui opened this issue Oct 28, 2016 · 10 comments
Closed

cmd/link: misc/cgo/testshared fail on ARM64 #17642

cherrymui opened this issue Oct 28, 2016 · 10 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@cherrymui
Copy link
Member

cherrymui commented Oct 28, 2016

What version of Go are you using (go version)?

tip +bba1ac4

What operating system and processor architecture are you using (go env)?

linux/arm64

##### ../misc/cgo/testshared
2016/10/27 20:49:17 executing go install -installsuffix=8674665223082153551 -buildmode=shared runtime sync/atomic failed exit status 2:
# /tmp/go-build461932225/libruntime,sync-atomic.so
/home/cherry/src/go/pkg/tool/linux_arm64/link: running gcc failed: exit status 1
/usr/bin/ld.gold: error: /tmp/go-link-711780168/go.o: unsupported reloc 311 against local symbol
/usr/bin/ld.gold: error: /tmp/go-link-711780168/go.o: unsupported reloc 312 against local symbol
/usr/bin/ld.gold: internal error in relocate, at ../../gold/aarch64.cc:5651
collect2: error: ld returned 1 exit status

It wasn't broken yesterday when I tested my CL 32180 locally. So, I think it is probably somewhere between 829aa67 and bba1ac4.

@cherrymui
Copy link
Member Author

cherrymui commented Oct 28, 2016

I think it is probably somewhere between 89632aa and bba1ac4.

I was wrong. 89632aa is today. The commit I tested yesterday was 829aa67, which was ok.

@mwhudson
Copy link
Contributor

I presume this is 8b07ec2. Where has the arm64 builder gone? :(

@mwhudson
Copy link
Contributor

Although that worked when backported to 1.7 on Ubuntu zesty: https://launchpadlibrarian.net/291097700/buildlog_ubuntu-zesty-arm64.golang-1.7_1.7.3-1ubuntu2_BUILDING.txt.gz -- which version of gold do you have installed?

@cherrymui
Copy link
Member Author

Where has the arm64 builder gone? :(

I am wondering it, too.

@cherrymui
Copy link
Member Author

which version of gold do you have installed?

$ gold --version
GNU gold (GNU Binutils for Debian 2.25) 1.11
Copyright (C) 2014 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

@mwhudson
Copy link
Contributor

Looks like this was fixed in October 2015 (https://sourceware.org/bugzilla/show_bug.cgi?id=19042) which I think means binutils 2.26.

I'm a bit confused as to how this is happening. Can you confirm that it really is the commit I mentioned that causes the problem? (I don't have easy access to an arm64 system with a sufficiently old version of gold installed).

@cherrymui
Copy link
Member Author

Thank you for investigation. Yes, it is indeed that commit. I tested it and one commit before to confirm.

So, the problem seems that my gold linker is too old? Are we going to require a newer version? At the least we should document it, though I'm not sure where.

mwhudson added a commit to mwhudson/go that referenced this issue Oct 28, 2016
Change-Id: I4ba060bb1ce73a527ce276e5a769c44692b50016
@mwhudson
Copy link
Contributor

Well there is something strange going on in that we really shouldn't be accessing a local symbol via the GOT. Can you see if mwhudson@f30efbd helps?

@cherrymui
Copy link
Member Author

This indeed works. Thank you! (I have not tested on other architectures though.)

@gopherbot
Copy link

CL https://golang.org/cl/32236 mentions this issue.

@quentinmit quentinmit added the NeedsFix The path to resolution is known, but the work has not been done. label Nov 1, 2016
@quentinmit quentinmit added this to the Go1.8 milestone Nov 1, 2016
@golang golang locked and limited conversation to collaborators Nov 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants