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: -buildmode=plugin fails on linux/arm64 #17138

Closed
crawshaw opened this issue Sep 16, 2016 · 8 comments
Closed

cmd/link: -buildmode=plugin fails on linux/arm64 #17138

crawshaw opened this issue Sep 16, 2016 · 8 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@crawshaw
Copy link
Member

At least on the builder, it tickles gold the wrong way:

/tmp/workdir/go/pkg/tool/linux_arm64/link: running gcc failed: exit status 1
/usr/bin/ld.gold: internal error in global, at ../../gold/aarch64.cc:4973

Odd, as the plugin mode mostly depends on linker configuration used by either c-shared or shared.

gopherbot pushed a commit that referenced this issue Sep 16, 2016
Mysterious error and no time or easy machine access to investigate
now, so disabling the -buildmode=plugin test on arm64. (The arm
version is working as expected.)

Updates #17138

Change-Id: I4cc56ddf47e7597213462e48d4934a765168bd07
Reviewed-on: https://go-review.googlesource.com/29363
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@mwhudson
Copy link
Contributor

Do you know which version of gold is installed?

@mwhudson
Copy link
Contributor

If I revert 569340e it fails with:

##### ../misc/cgo/testplugin
fatal error: runtime: no plugin module data

goroutine 1 [running]:
runtime.throw(0x520f77, 0x1e)

do you know what's going on there?

@crawshaw
Copy link
Member Author

Nope, I'd have to spend some time with an arm64 machine, and I don't think I'll get to it in 1.8. I'd rather just say we haven't implemented -buildmode=plugin there yet and deal with it in 1.9.

@quentinmit quentinmit added this to the Go1.8Maybe milestone Oct 3, 2016
@quentinmit quentinmit added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 3, 2016
@quentinmit
Copy link
Contributor

We haven't made a Go1.9 milestone yet, so I'll tag this 1.8Maybe with the expectation that it's likely going to get punted.

@gopherbot
Copy link

Change https://golang.org/cl/109917 mentions this issue: cmd/link: fix plugin on linux/arm64

@cherrymui
Copy link
Member

With CL https://go-review.googlesource.com/c/go/+/109917, testplugin passes locally. It still fails on the builder with an internal error in gold.

##### ../misc/cgo/testplugin
# host
/workdir/go/pkg/tool/linux_arm64/link: running gcc failed: exit status 1
/usr/bin/ld.gold: internal error in global, at ../../gold/aarch64.cc:4973
collect2: error: ld returned 1 exit status

Seems the gold linker on the builder is rather old:

$ gomote run $VM /usr/bin/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.

On the machine where the test passes:

$ gold --version
GNU gold (GNU Binutils for Ubuntu 2.26.1) 1.11
Copyright (C) 2015 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.

I wonder, could we update gold on the builder, and require a newer gold for using plugin on linux/arm64? cc @bradfitz

gopherbot pushed a commit that referenced this issue Apr 27, 2018
The init function and runtime.addmoduledata were not added when
building plugin, which caused the runtime could not find the
module.

Testplugin is still not enabled on linux/arm64
(https://go.googlesource.com/go/+/master/src/cmd/dist/test.go#948)
because the gold linker on the builder is too old, which fails
with an internal error (see issue #17138). I tested locally and
it passes.

Fixes #24940.
Updates #17138.

Change-Id: I26aebca6c38a3443af0949471fa12b6d550e8c6c
Reviewed-on: https://go-review.googlesource.com/109917
Run-TryBot: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
@gopherbot gopherbot modified the milestones: Go1.11, Unplanned May 23, 2018
@zhouguangyuan0718
Copy link
Contributor

I'm sorry for bothering. It is unbelievable for me, I had used buildmode=plugin on linux-arm64 on our production environment for three years. I found it is not tested just now.
Three years on, had gold been updated on the builder? And can we run the testcases on the builder now?

Thanks.

@gopherbot
Copy link

Change https://golang.org/cl/369814 mentions this issue: cmd/dist: enable plugin test on Linux/ARM64

thaJeztah added a commit to thaJeztah/containerd that referenced this issue Aug 23, 2022
- we don't support go < 1.8. this restriction as added because plugin support
  requires go 1.8 or up, but with such old versions being EOL, this check was
  rather redundant
- arm64 support for plugins was fixed in go, according to golang/go#17138
- add back arm64 support; in 6bd0710, non-amd64
  was disabled, pending golang/go#17138, which was tracking arm64 support, and
  is now resolved. It's unclear if architectures other than amd64 and arm64 are
  supported, so keeping it restricted to amd64 and arm64.
- enable plugin support on Windows; it was disabled in 0b44e24
  but the code looks to take windows into account.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah added a commit to thaJeztah/containerd that referenced this issue Aug 23, 2022
- we don't support go < 1.8. this restriction as added because plugin support
  requires go 1.8 or up, but with such old versions being EOL, this check was
  rather redundant
- add back arm64 support; in 6bd0710, non-amd64
  was disabled, pending golang/go#17138, which was tracking arm64 support, and
  is now resolved. It's unclear if architectures other than amd64 and arm64 are
  supported, so keeping it restricted to amd64 and arm64.
- enable plugin support on Windows; it was disabled in 0b44e24
  but the code looks to take windows into account.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah added a commit to thaJeztah/containerd that referenced this issue Aug 23, 2022
- we don't support go < 1.8. this restriction as added because plugin support
  requires go 1.8 or up, but with such old versions being EOL, this check was
  rather redundant
- add back arm64 support; in 6bd0710, non-amd64
  was disabled, pending golang/go#17138, which was tracking arm64 support, and
  is now resolved. It's unclear if architectures other than amd64 and arm64 are
  supported, so keeping it restricted to amd64 and arm64.
- enable plugin support on Windows; it was disabled in 0b44e24
  but the code looks to take windows into account.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah added a commit to thaJeztah/containerd that referenced this issue Oct 8, 2022
- we don't support go < 1.8. this restriction as added because plugin support
  requires go 1.8 or up, but with such old versions being EOL, this check was
  rather redundant
- add back arm64 support; in 6bd0710, non-amd64
  was disabled, pending golang/go#17138, which was tracking arm64 support, and
  is now resolved. It's unclear if architectures other than amd64 and arm64 are
  supported, so keeping it restricted to amd64 and arm64.
- enable plugin support on Windows; it was disabled in 0b44e24
  but the code looks to take windows into account.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@golang golang locked and limited conversation to collaborators Dec 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

8 participants