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

go test --race causes linker warning: undefined symbols to start #65940

Closed
martinrode opened this issue Feb 26, 2024 · 1 comment
Closed

go test --race causes linker warning: undefined symbols to start #65940

martinrode opened this issue Feb 26, 2024 · 1 comment

Comments

@martinrode
Copy link

Go version

go version go1.22.0 darwin/arm64

Output of go env in your module/workspace:

GO111MODULE='on'
GOARCH='arm64'
GOBIN='/Users/martin/go/bin'
GOCACHE='/Users/martin/Library/Caches/go-build'
GOENV='/Users/martin/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/martin/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/martin/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.22.0'
GCCGO='gccgo'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/Users/martin/go/src/github.com/programmfabrik/apitest/go.mod'
GOWORK='/Users/martin/go/src/github.com/programmfabrik/go.work'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/4f/l31kb4n521d6g89qxrwcx69h0000gp/T/go-build2013551003=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?

git clone https://github.com/programmfabrik/apitest.git
cd apitest
go test -race ./...

What did you see happen?

➜  apitest git:(master) go test -race ./... 
# github.com/programmfabrik/apitest.test
ld: warning: '/private/var/folders/4f/l31kb4n521d6g89qxrwcx69h0000gp/T/go-link-2150043348/000024.o' has malformed LC_DYSYMTAB, expected 98 undefined symbols to start at index 1626, found 95 undefined symbols starting at index 1626
?       github.com/programmfabrik/apitest/internal/httpproxy    [no test files]
?       github.com/programmfabrik/apitest/pkg/lib/csv   [no test files]
# github.com/programmfabrik/apitest/pkg/lib/template.test
ld: warning: '/private/var/folders/4f/l31kb4n521d6g89qxrwcx69h0000gp/T/go-link-3422871741/000024.o' has malformed LC_DYSYMTAB, expected 98 undefined symbols to start at index 1626, found 95 undefined symbols starting at index 1626
?       github.com/programmfabrik/apitest/pkg/lib/test_utils    [no test files]
ok      github.com/programmfabrik/apitest       1.937s
ok      github.com/programmfabrik/apitest/pkg/lib/api   1.741s
ok      github.com/programmfabrik/apitest/pkg/lib/compare       1.337s
ok      github.com/programmfabrik/apitest/pkg/lib/datastore     1.463s
ok      github.com/programmfabrik/apitest/pkg/lib/filesystem    1.611s
ok      github.com/programmfabrik/apitest/pkg/lib/report        2.272s
ok      github.com/programmfabrik/apitest/pkg/lib/template      1.271s
ok      github.com/programmfabrik/apitest/pkg/lib/util  1.190s

What did you expect to see?

➜  apitest git:(master) go test  ./...    
?       github.com/programmfabrik/apitest/internal/httpproxy    [no test files]
?       github.com/programmfabrik/apitest/pkg/lib/csv   [no test files]
ok      github.com/programmfabrik/apitest       (cached)
ok      github.com/programmfabrik/apitest/pkg/lib/api   (cached)
ok      github.com/programmfabrik/apitest/pkg/lib/compare       (cached)
ok      github.com/programmfabrik/apitest/pkg/lib/datastore     (cached)
ok      github.com/programmfabrik/apitest/pkg/lib/filesystem    (cached)
ok      github.com/programmfabrik/apitest/pkg/lib/report        (cached)
?       github.com/programmfabrik/apitest/pkg/lib/test_utils    [no test files]
ok      github.com/programmfabrik/apitest/pkg/lib/template      (cached)
ok      github.com/programmfabrik/apitest/pkg/lib/util  (cached)
@martinrode martinrode changed the title go test --race causes linker error: undefined symbols to start go test --race causes linker warning: undefined symbols to start Feb 26, 2024
@seankhliao
Copy link
Member

Duplicate of #61229

@seankhliao seankhliao marked this as a duplicate of #61229 Feb 26, 2024
@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants