Go version

go1.21.11

Output of go env in your module/workspace:

GO111MODULE=''
GOARCH='loong64'
GOBIN=''
GOCACHE='/tmp/abner-gocache'
GOENV='/home/chenguoqi/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='loong64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/chenguoqi/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/chenguoqi/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/lib/go'
GOSUMDB='sum.golang.org'
GOTMPDIR='/tmp/abner-gotmp'
GOTOOLCHAIN='local'
GOVERSION='go1.21.11'
GCCGO='gccgo'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='0'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -mabi=lp64d -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/abner-gotmp/go-build195864624=/tmp/go-build -gno-record-gcc-switches'

What did you do?

cd src && ./all.bash -a

What did you see happen?

ok   cmd/cgo/internal/testnocgo 0.006s
ok   cmd/cgo/internal/testplugin 63.253s
ok   cmd/cgo/internal/testsanitizers 0.056s
--- FAIL: TestTrivialPIE (8.58s)
    shared_test.go:57: executing ./trivial_pie (trivial_pie) failed fork/exec ./trivial_pie: no such file or directory:
FAIL
FAIL cmd/cgo/internal/testshared 92.937s
ok   cmd/cgo/internal/testso 1.982s
ok   cmd/cgo/internal/teststdio 2.282s

What did you expect to see?

all test pass

Comment From: gopherbot

Change https://go.dev/cl/590695 mentions this issue: cmd/link/internal/loong64: correct the musl dynamic linker path

Comment From: abner-chenc

Can we backport this CL to the Go1.21 and Go1.22 release-branch?

Comment From: ianlancetaylor

@abner-chenc Are you just worried about the test or is this something that arises in practice? Very few people use -buildmode=shared.

Comment From: abner-chenc

@abner-chenc Are you just worried about the test or is this something that arises in practice? Very few people use -buildmode=shared.

I am just worried about the test. Indeed, -buildmode=shared is rarely used. So there is no need to backport this CL to Go1.21 and Go1.22 release-branches.

Thanks!