What version of Go are you using (go version)?
$ go version
go version go1.12.2 gccgo (GCC) 9.1.0 linux/ppc64
Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GOARCH="ppc64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="ppc64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/opt/golang"
GOPROXY=""
GORACE=""
GOROOT="/opt/gcc-9.1.0"
GOTMPDIR=""
GOTOOLDIR="/opt/gcc-9.1.0/libexec/gcc/powerpc64-unknown-linux-gnu/9.1.0"
GCCGO="/opt/gcc-9.1.0/bin/gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="0"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build451740613=/tmp/go-build -gno-record-gcc-switches -funwind-tables"
What did you do?
cat /proc/version
Linux version 4.1.35-g2019-05-20-637432e (houzp@dev) (gcc version 4.9.2 (GCC) ) #118 SMP Mon May 20 12:59:31 CST 2019
go build
What did you expect to see?
compile success
What did you see instead?
usb_client
/root/.cache/go-build/09/09c966f52bbded84a8ec71e8ff39f8486d6c851665f52cc7420a13ecb26bdaf5-d(go.o): In function unix.realSyscallNoError': /opt/golang/src/usb_client/vendor/golang.org/x/sys/unix/gccgo.go:22: undefined reference to gccgoRealSyscall'
/root/.cache/go-build/09/09c966f52bbded84a8ec71e8ff39f8486d6c851665f52cc7420a13ecb26bdaf5-d(go.o): In function usb_client..z2fvendor..z2fgolang.org..z2fx..z2fsys..z2funix.RawSyscallNoError': affinity_linux.go:(.text+0x6168): undefined reference to gccgoRealSyscall'
/root/.cache/go-build/09/09c966f52bbded84a8ec71e8ff39f8486d6c851665f52cc7420a13ecb26bdaf5-d(go.o): In function usb_client..z2fvendor..z2fgolang.org..z2fx..z2fsys..z2funix.Syscall': affinity_linux.go:(.text+0x6498): undefined reference to gccgoRealSyscall'
/root/.cache/go-build/09/09c966f52bbded84a8ec71e8ff39f8486d6c851665f52cc7420a13ecb26bdaf5-d(go.o): In function usb_client..z2fvendor..z2fgolang.org..z2fx..z2fsys..z2funix.Syscall6': affinity_linux.go:(.text+0x6704): undefined reference to gccgoRealSyscall'
/root/.cache/go-build/09/09c966f52bbded84a8ec71e8ff39f8486d6c851665f52cc7420a13ecb26bdaf5-d(go.o): In function usb_client..z2fvendor..z2fgolang.org..z2fx..z2fsys..z2funix.Syscall9': affinity_linux.go:(.text+0x68c8): undefined reference to gccgoRealSyscall'
/root/.cache/go-build/09/09c966f52bbded84a8ec71e8ff39f8486d6c851665f52cc7420a13ecb26bdaf5-d(go.o):affinity_linux.go:(.text+0x6958): more undefined references to `gccgoRealSyscall' follow
collect2: error: ld returned 1 exit status
What version of Go are you using (
go version)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env)?go envOutputWhat did you do?
cat /proc/version
Linux version 4.1.35-g2019-05-20-637432e (houzp@dev) (gcc version 4.9.2 (GCC) ) #118 SMP Mon May 20 12:59:31 CST 2019
go build
What did you expect to see?
compile success
What did you see instead?
usb_client
/root/.cache/go-build/09/09c966f52bbded84a8ec71e8ff39f8486d6c851665f52cc7420a13ecb26bdaf5-d(go.o): In function
unix.realSyscallNoError': /opt/golang/src/usb_client/vendor/golang.org/x/sys/unix/gccgo.go:22: undefined reference togccgoRealSyscall'/root/.cache/go-build/09/09c966f52bbded84a8ec71e8ff39f8486d6c851665f52cc7420a13ecb26bdaf5-d(go.o): In function
usb_client..z2fvendor..z2fgolang.org..z2fx..z2fsys..z2funix.RawSyscallNoError': affinity_linux.go:(.text+0x6168): undefined reference togccgoRealSyscall'/root/.cache/go-build/09/09c966f52bbded84a8ec71e8ff39f8486d6c851665f52cc7420a13ecb26bdaf5-d(go.o): In function
usb_client..z2fvendor..z2fgolang.org..z2fx..z2fsys..z2funix.Syscall': affinity_linux.go:(.text+0x6498): undefined reference togccgoRealSyscall'/root/.cache/go-build/09/09c966f52bbded84a8ec71e8ff39f8486d6c851665f52cc7420a13ecb26bdaf5-d(go.o): In function
usb_client..z2fvendor..z2fgolang.org..z2fx..z2fsys..z2funix.Syscall6': affinity_linux.go:(.text+0x6704): undefined reference togccgoRealSyscall'/root/.cache/go-build/09/09c966f52bbded84a8ec71e8ff39f8486d6c851665f52cc7420a13ecb26bdaf5-d(go.o): In function
usb_client..z2fvendor..z2fgolang.org..z2fx..z2fsys..z2funix.Syscall9': affinity_linux.go:(.text+0x68c8): undefined reference togccgoRealSyscall'/root/.cache/go-build/09/09c966f52bbded84a8ec71e8ff39f8486d6c851665f52cc7420a13ecb26bdaf5-d(go.o):affinity_linux.go:(.text+0x6958): more undefined references to `gccgoRealSyscall' follow
collect2: error: ld returned 1 exit status