Skip to content

cmd/go: failed to build if the testdata contains broken symlinks #53305

@johejo

Description

@johejo

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

$ go version
go version devel go1.19-1a2ca95ad2 Thu Jun 9 01:07:11 2022 +0000 darwin/arm64

Does this issue reproduce with the latest release?

No, tip only.

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

go env Output
$ go env
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/mitsuoheijo/Library/Caches/go-build"
GOENV="/Users/mitsuoheijo/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/mitsuoheijo/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/mitsuoheijo/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/Users/mitsuoheijo/ghq/github.com/golang/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/mitsuoheijo/ghq/github.com/golang/go/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="devel go1.19-1a2ca95ad2 Thu Jun 9 01:07:11 2022 +0000"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/mitsuoheijo/ghq/github.com/goreleaser/goreleaser/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 -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/bq/s3vkkxm17jq79lx5qy3856zh0000gn/T/go-build2641546270=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

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

What did you expect to see?

Build succeeds.

What did you see instead?

stat /Users/mitsuoheijo/ghq/github.com/goreleaser/goreleaser/pkg/archive/testdata/badlink.txt: no such file or directory
pattern ./...: stat /Users/mitsuoheijo/ghq/github.com/goreleaser/goreleaser/pkg/archive/testdata/badlink.txt: no such file or directory

Related d651660

I encountered the same thing in several repository builds.

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions