Skip to content

runtime/debuginfo: Build info for plan 9 binaries cannot be read due to missing a.out implementation #53949

Closed
@oridb

Description

@oridb

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

$ go version
2aa473cc54128c1498f80263763a2a876308e565

Does this issue reproduce with the latest release?

Yes.

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

go env Output
$ go env
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/usr/orib/lib/cache/go-build'
GOENV='/usr/orib/lib/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='plan9'
GOINSECURE=''
GOMODCACHE='/usr/orib/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='plan9'
GOPATH='/usr/orib/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/orib/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLDIR='/usr/orib/go/pkg/tool/plan9_amd64'
GOVCS=''
GOVERSION='VERS'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='6c'
CXX='g++'
CGO_ENABLED='0'
GOMOD='/dev/null'
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 -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3108623332=/tmp/go-build -gno-record-gcc-switches'

There is a missing implementation to read the debug version out of a plan 9 binary, which causes reading the
build info from a binary to fail:

    --- FAIL: TestScript/mod_install_pkg_version (2.71s)
        script_test.go:272: 
            # (2022-07-17T01:37:54Z)
            # 'go install pkg@version' works outside a module. (1.106s)
            # 'go install pkg@version' reports an error if modules are disabled. (0.069s)
            # 'go install pkg@version' ignores go.mod in current directory. (1.326s)
            > cd m
            $WORK/gopath/src/m
            > cp go.mod go.mod.orig
            > ! go list -m all
            [stderr]
            go: example.com/[email protected]: reading http://127.0.0.1:58036/mod/example.com/cmd/@v/v1.1.0-doesnotexist.info: 404 Not Found
            	server response: 404 page not found
            go: example.com/[email protected]: missing go.sum entry; to add it:
            	go mod download example.com/cmd
            [exit status: 'go 705913: 1']
            > stderr '^go: example.com/[email protected]: missing go.sum entry; to add it:\n\tgo mod download example.com/cmd$'
            > go install example.com/cmd/a@latest
            > cmp go.mod go.mod.orig
            > exists $GOPATH/bin/a$GOEXE
            > go version -m $GOPATH/bin/a$GOEXE
            [stderr]
            $WORK/gopath/bin/a: could not read Go build info from $WORK/gopath/bin/a: unrecognized file format
            > stdout '^\tmod\texample.com/cmd\tv1.0.0\t' # "latest", not from go.mod
            FAIL: testdata/script/mod_install_pkg_version.txt:24: no match for `(?m)^\tmod\texample.com/cmd\tv1.0.0\t` found in stdout

What did you see instead?

A test that passed after reading debug info.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions