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

x/sys/cpu: go install -buildmode=shared std failed #49942

Closed
zhouguangyuan0718 opened this issue Dec 3, 2021 · 2 comments
Closed

x/sys/cpu: go install -buildmode=shared std failed #49942

zhouguangyuan0718 opened this issue Dec 3, 2021 · 2 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@zhouguangyuan0718
Copy link
Contributor

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

$ go version
go version devel go1.18-098599003b Fri Dec 3 01:09:21 2021 +0000 linux/amd64

Does this issue reproduce with the latest release?

No, it reproduce with tip.

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/mnt/d/01.golang/01.GOPATH/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/mnt/d/01.golang/01.GOPATH/"
GOPRIVATE=""
GOPROXY="https://goproxy.cn,direct"
GOROOT="/mnt/d/01.golang/03.godev/go"
GOSUMDB="off"
GOTMPDIR=""
GOTOOLDIR="/mnt/d/01.golang/03.godev/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="devel go1.18-098599003b Fri Dec 3 01:09:21 2021 +0000"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/mnt/d/01.golang/03.godev/go/src/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2041059842=/tmp/go-build -gno-record-gcc-switches"

What did you do?

run the command go install -buildmode=shared std

What did you expect to see?

Install the libstd.so in $goroot/pkg/....

What did you see instead?

Failed.

$ go install -buildmode=shared std
# /tmp/go-build268340113/b232/libstd.so
vendor/golang.org/x/sys/cpu.darwinSupportsAVX512·f: missing section for relocation target vendor/golang.org/x/sys/cpu.darwinSupportsAVX512

In the CL https://go-review.googlesource.com/c/sys/+/361255, the implement of darwinSupportsAVX512 is removed in cpu_x86.s, but it didn't be removed in cpu_gc_x86.go.
https://github.com/golang/sys/blob/fe61309f888157de161a48facf03d9412635cffe/cpu/cpu_gc_x86.go#L21

It should be removed in cpu_gc_x86.go and sync it to golang/go.

@gopherbot gopherbot added this to the Unreleased milestone Dec 3, 2021
@gopherbot
Copy link

Change https://golang.org/cl/368994 mentions this issue: x/sys/cpu: remove the declaration of function darwinSupportsAVX512

@mknyszek mknyszek added the NeedsFix The path to resolution is known, but the work has not been done. label Dec 3, 2021
gopherbot pushed a commit to golang/sys that referenced this issue Dec 5, 2021
The implement of darwinSupportsAVX512 has been removed in CL 361255.
But the command "go install -buildmode=shared std" failed because the
declaration of it is remained in cpu/cpu_gc_x86.go. It should be removed.

Update golang/go#49233
For golang/go#49942

Change-Id: I8fa7c61c20457e49414930029b9f026c335aa421
Reviewed-on: https://go-review.googlesource.com/c/sys/+/368994
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Trust: Ian Lance Taylor <iant@golang.org>
@gopherbot
Copy link

Change https://golang.org/cl/369454 mentions this issue: all: update vendored golang.org/x/sys

@golang golang locked and limited conversation to collaborators Dec 6, 2022
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

3 participants