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

cmd/build: debug and test fail to run on mac OS 10.15.4 #38552

Closed
timwangmusic opened this issue Apr 21, 2020 · 2 comments
Closed

cmd/build: debug and test fail to run on mac OS 10.15.4 #38552

timwangmusic opened this issue Apr 21, 2020 · 2 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@timwangmusic
Copy link

timwangmusic commented Apr 21, 2020

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

$ go version go1.14.2 darwin/amd64

Does this issue reproduce with the latest release?

Tested with Go 1.14.2

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

go env Output
$ go env

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/Weihe/Library/Caches/go-build"
GOENV="/Users/Weihe/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/Weihe/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.14.2_1/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.14.2_1/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/Weihe/code/Mew/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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/h6/znnjnf1n2t970n6rdht824t40000gn/T/go-build615583220=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

tried to run test suite on a golang code repo with command go test ./....
debug mode for main application also fails.

What did you expect to see?

Expect test case to run.

What did you see instead?

GOROOT=/usr/local/Cellar/go/1.14.2_1/libexec #gosetup
GOPATH=/Users/Weihe/go #gosetup
/usr/local/Cellar/go/1.14.2_1/libexec/bin/go build -o /private/var/folders/h6/znnjnf1n2t970n6rdht824t40000gn/T/___go_build_mew_go -gcflags "all=-N -l" /Users/Weihe/code/Mew/mew.go #gosetup
`# runtime/cgo`
In file included from gcc_darwin_amd64.c:6:
/usr/local/include/pthread.h:331:6: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
/usr/local/include/pthread.h:200:2: note: expanded from macro '_PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT'
/usr/local/include/pthread.h:331:6: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
/usr/local/include/pthread.h:200:34: note: expanded from macro '_PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT'
/usr/local/include/pthread.h:540:6: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
/usr/local/include/pthread.h:200:2: note: expanded from macro '_PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT'
/usr/local/include/pthread.h:540:6: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
/usr/local/include/pthread.h:200:34: note: expanded from macro '_PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT'
@andybons
Copy link
Member

Can you provide a minimal code example that shows this error?

Thanks

@andybons andybons changed the title [Issue]Debug and test fail to run on mac OS 10.15.4 cmd/build: debug and test fail to run on mac OS 10.15.4 Apr 21, 2020
@andybons andybons added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Apr 21, 2020
@andybons andybons added this to the Unplanned milestone Apr 21, 2020
@ALTree
Copy link
Member

ALTree commented May 5, 2020

The OP in #38876 reported this error and provided a reproducer. Closing here in favour of the other thread.

@ALTree ALTree closed this as completed May 5, 2020
@golang golang locked and limited conversation to collaborators May 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants