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/internal/notsha256: fails to bootstrap with gccgo #53662

Closed
zhsj opened this issue Jul 2, 2022 · 3 comments
Closed

cmd/internal/notsha256: fails to bootstrap with gccgo #53662

zhsj opened this issue Jul 2, 2022 · 3 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@zhsj
Copy link
Contributor

zhsj commented Jul 2, 2022

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

$ go version
go version unknown linux/amd64

It is gccgo-12.

Does this issue reproduce with the latest release?

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/zhsj/.cache/go-build"
GOENV="/home/zhsj/.config/go/env"
GOEXE=""
GOEXPERIMENT="fieldtrack,regabiwrappers"
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/zhsj/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/zhsj/go"
GOPRIVATE=""
GOPROXY="https://goproxy.cn"
GOROOT="/usr"
GOSUMDB="sum.golang.google.cn"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/gcc/x86_64-linux-gnu/12"
GOVCS=""
GOVERSION="unknown"
GCCGO="/usr/bin/x86_64-linux-gnu-gccgo-12"
GOAMD64="v1"
AR="ar"
CC="x86_64-linux-gnu-gcc-12"
CXX="x86_64-linux-gnu-g++-12"
CGO_ENABLED="1"
GOMOD="/tmp/t/go1.19/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-build2117576764=/tmp/go-build -gno-record-gcc-switches -funwind-tables"

What did you do?

zhsj@debian:/tmp/t/go1.19/go/src$ GOROOT_BOOTSTRAP=/usr/local ./make.bash 
Building Go cmd/dist using /usr/local. (unknown linux/amd64)
Building Go toolchain1 using /usr/local.
# bootstrap/cmd/internal/notsha256
cmd/internal/notsha256/sha256block_amd64.s:9:10: fatal error: textflag.h: No such file or directory
    9 | #include "textflag.h"
      |          ^~~~~~~~~~~~
compilation terminated.
go tool dist: FAILED: /usr/local/bin/go install -gcflags=-l -tags=math_big_pure_go compiler_bootstrap bootstrap/cmd/...: exit status 2

What did you expect to see?

Can bootstrap go1.19 with gccgo.

What did you see instead?

Compile error.

@gopherbot gopherbot added this to the Gccgo milestone Jul 2, 2022
@ianlancetaylor ianlancetaylor modified the milestones: Gccgo, Go1.19 Jul 3, 2022
@ianlancetaylor ianlancetaylor added NeedsFix The path to resolution is known, but the work has not been done. release-blocker labels Jul 3, 2022
@ianlancetaylor ianlancetaylor changed the title gccgo: fail to bootstrap go1.19beta1 cmd/internal/notsha256: fails to bootstrap with gccgo Jul 3, 2022
@ianlancetaylor
Copy link
Contributor

I have a patch.

@gopherbot
Copy link

Change https://go.dev/cl/415935 mentions this issue: cmd/internal/notsha256: add purego tag as needed

@gopherbot
Copy link

Change https://go.dev/cl/415934 mentions this issue: cmd/dist: use purego tag when building the bootstrap binaries

gopherbot pushed a commit that referenced this issue Jul 6, 2022
This is in addition to the current math_big_pure_go tag.
Using purego ensures that we can build the cmd binaries with gccgo.

For #53662

Change-Id: Ib82f8bf10659b5f94935f2b427ae8b2da875cd3b
Reviewed-on: https://go-review.googlesource.com/c/go/+/415934
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
jproberts pushed a commit to jproberts/go that referenced this issue Aug 10, 2022
This is in addition to the current math_big_pure_go tag.
Using purego ensures that we can build the cmd binaries with gccgo.

For golang#53662

Change-Id: Ib82f8bf10659b5f94935f2b427ae8b2da875cd3b
Reviewed-on: https://go-review.googlesource.com/c/go/+/415934
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
jproberts pushed a commit to jproberts/go that referenced this issue Aug 10, 2022
This permits building the package with gccgo, when using gccgo
as a bootstrap compiler.

Fixes golang#53662

Change-Id: Ic7ae9323ec5954e9306a32e1160e9aa1ed3aa202
Reviewed-on: https://go-review.googlesource.com/c/go/+/415935
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: David Chase <drchase@google.com>
@golang golang locked and limited conversation to collaborators Jul 6, 2023
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. release-blocker
Projects
None yet
Development

No branches or pull requests

3 participants