Go version
go version go1.21.0 linux/amd64 (master branch also influence)
Output of go env
in your module/workspace:
GO111MODULE='auto'
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/{username}/.cache/go-build'
GOENV='/home/{username}/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/{username}/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/{username}/go'
GOPRIVATE=''
GOPROXY='http://goproxy.cn'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.0'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/home/{username}/codetest/gotest/test/go.mod'
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 -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build3179341232=/tmp/go-build -gno-record-gcc-switches'
What did you do?
when I use go build -asan.
What did you see happen?
it report "-asan is not supported with gcc compiler 0.0" gcc -v looks like this: gcc -v
使用内建 specs。
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-newstart-linux/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
目标:x86_64-newstart-linux
配置为:../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-newstart-linux
线程模型:posix
gcc 版本 8.4.1 20200928
What did you expect to see?
that's because compilerVersion , Use of regular expressions is gcc version (\d+)\.(\d+)
but, it couldn't pattern with 'gcc 版本 8.4.1 20200928 '
I think should change the regexp, if needed I would like to pull this pr.
Comment From: gabyhelp
Related Issues and Documentation
- all: `go tool dist test -asan` fails many tests #64257
- misc/cgo/testsanitizers: ASAN test skipped due to old compiler version even though gcc is quite recent #54370 (closed)
- some issues here ! #39105 (closed)
- go build #51949 (closed)
- go version go1.21.5 linux/amd64 #67008 (closed)
- buildmode #57437 (closed)
- runtime/cgo: Compilation Error #58320 (closed)
- test001 #53494 (closed)
- go version #53102 (closed)
- affected/package: toolchain test/fixedbugs/10607 #62399 (closed)
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
Comment From: gopherbot
Change https://go.dev/cl/610215 mentions this issue: work/init:Change regular expressions
Comment From: dmitshur
CC @matloob, @ianlancetaylor.