cmd/build: linker error while cross-compiling to riscv64 in go1.15 #45466
Labels
FrozenDueToAge
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Go version : go1.15.6 linux/amd64
Go env :
GO111MODULE="auto"
GOARCH="riscv64"
GOBIN=""
GOCACHE="/home/root/.cache/go-build"
GOENV="/home/root/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/root/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/root/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/root/sdk/sysroots/riscv64-oe-linux/usr/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/root/sdk/sysroots/x86_64-oesdk-linux/usr/lib/riscv64-oe-linux/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="riscv64-oe-linux-ar"
CC="riscv64-oe-linux-gcc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/root/sdk/sysroots/riscv64-oe-linux"
CXX="riscv64-oe-linux-g++ -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/root/sdk/sysroots/riscv64-oe-linux"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/root/sdk/sysroots/riscv64-oe-linux -fPIC -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build631991988=/tmp/go-build -gno-record-gcc-switches"
I am trying to build edgex app-service-configurable using cross-compilation.
Here I am using riscv sdk created from yocto.
Following is the error I am facing:
/home/root/workspace/sysroots/x86_64-oesdk-linux/usr/libexec/riscv64-oe-linux/gcc/riscv64-oe-linux/10.2.0/real-ld: $WORK/b068/_x008.o: in function x_cgo_thread_start': ../workspace/sysroots/riscv64-oe-linux/usr/lib/go/src/runtime/cgo/gcc_util.c:21: undefined reference to _cgo_sys_thread_start'
collect2: error: ld returned 1 exit status
The text was updated successfully, but these errors were encountered: