Skip to content

cmd/compile: failed to build istio with internal compiler error: width not calculated: func() #44732

@johejo

Description

@johejo

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

$ go version
go version devel +2b50ab2aee Tue Mar 2 06:38:07 2021 +0000 linux/amd64

Does this issue reproduce with the latest release?

No, gotip only.

1.16 is fine.

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/heijo/.cache/go-build"
GOENV="/home/heijo/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/heijo/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/heijo/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/heijo/ghq/go.googlesource.com/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/heijo/ghq/go.googlesource.com/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="devel +2b50ab2aee Tue Mar 2 06:38:07 2021 +0000"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/heijo/ghq/github.com/istio/istio/go.mod"
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-build3113425185=/tmp/go-build -gno-record-gcc-switches"

What did you do?

git clone https://github.com/istio/istio.git
cd istio/
go build ./...

What did you expect to see?

Build successful

What did you see instead?

# istio.io/istio/pilot/pkg/bootstrap
<autogenerated>:1: internal compiler error: width not calculated: func()

goroutine 5 [running]:
runtime/debug.Stack(0xf954c0, 0xc0000c4008, 0x0)
        /home/heijo/ghq/go.googlesource.com/go/src/runtime/debug/stack.go:24 +0x9f
cmd/compile/internal/base.FatalfAt(0x100000000001, 0xe5ea7d, 0x18, 0xc0041fb158, 0x1, 0x1)
        /home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/base/print.go:227 +0x1bc
cmd/compile/internal/base.Fatalf(...)
        /home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/base/print.go:196
cmd/compile/internal/types.CalcSize(0xc005027800)
        /home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/types/size.go:344 +0xf3
cmd/compile/internal/ssagen.TypeOK(0xc005027800, 0xc005027800)
        /home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/ssagen/ssa.go:5243 +0x2f
cmd/compile/internal/ssagen.(*state).stmt(0xc0041d0000, 0xfa7850, 0xc0055c1d60)
        /home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/ssagen/ssa.go:1530 +0x26c
cmd/compile/internal/ssagen.(*state).stmtList(0xc0041d0000, 0xc00558bef0, 0x1, 0x1)
        /home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/ssagen/ssa.go:1312 +0x68
cmd/compile/internal/ssagen.(*state).stmt(0xc0041d0000, 0xfa7aa8, 0xc0055bcdc0)
        /home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/ssagen/ssa.go:1335 +0x1689
cmd/compile/internal/ssagen.(*state).stmtList(0xc0041d0000, 0xc0055c4480, 0x5, 0x8)
        /home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/ssagen/ssa.go:1312 +0x68
cmd/compile/internal/ssagen.(*state).stmt(0xc0041d0000, 0xfa7850, 0xc00500d720)
        /home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/ssagen/ssa.go:1330 +0xf3
cmd/compile/internal/ssagen.(*state).stmtList(0xc0041d0000, 0xc00512f000, 0xeb, 0x100)
        /home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/ssagen/ssa.go:1312 +0x68
cmd/compile/internal/ssagen.buildssa(0xc0004ca580, 0x2, 0x0)
        /home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/ssagen/ssa.go:565 +0x1645
cmd/compile/internal/ssagen.Compile(0xc0004ca580, 0x2)
        /home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/ssagen/pgen.go:158 +0x5f
cmd/compile/internal/gc.compileFunctions.func2.1(0xc004aa7b80, 0xc0004ca580, 0xc00580a7b0, 0xc00574b394)
        /home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/gc/compile.go:127 +0x65
created by cmd/compile/internal/gc.compileFunctions.func2
        /home/heijo/ghq/go.googlesource.com/go/src/cmd/compile/internal/gc/compile.go:125 +0x8e

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions