Bug 13966

Summary: Go fails on riscv
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Ross Burton <ross.burton>
Component: devtools / tool chainAssignee: Khem Raj <raj.khem>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: akuster808, meta.mr.watcher, meta.watcher, randy.macleod
Version: 3.3   
Target Milestone: 3.2 M2   
Hardware: x86   
OS: other   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Ross Burton 2020-07-01 07:38:19 UTC
Go for qemuriscv64 fails to build:

| Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
| Building Go toolchain2 using go_bootstrap and Go toolchain1.
| Building Go toolchain3 using go_bootstrap and Go toolchain2.
| Building std for target, linux/riscv64.
| # runtime/cgo
| /home/ross/Yocto/build/tmp/work/riscv64-poky-linux/go-runtime/1.14.4-r0/recipe-sysroot-native/usr/bin/riscv64-poky-linux/../../libexec/riscv64-poky-linux/gcc/riscv64-poky-linux/10.1.0/ld: $WORK/b037/_x008.o: in function `x_cgo_thread_start':
| /usr/src/debug/go-runtime/1.14.4-r0/go/src/runtime/cgo/gcc_util.c:21: undefined reference to `_cgo_sys_thread_start'
| collect2: error: ld returned 1 exit status
| go tool dist: FAILED: /home/ross/Yocto/build/tmp/work/riscv64-poky-linux/go-runtime/1.14.4-r0/go/pkg/tool/native_native/go_bootstrap install -gcflags=all= -ldflags=all= std: exit status 2
| WARNING: exit code 2 from a shell command.
Comment 1 Khem Raj 2020-07-01 08:14:25 UTC
yes we need to disable CGO which is not yet in and therefore not part of 1.14.x release
Comment 2 Khem Raj 2020-07-09 12:49:55 UTC
patch is on ml
Comment 4 Ross Burton 2020-08-14 02:29:58 UTC
Yeah, CGO is disbaled now so that's the work around.  Hopefully in the future we can re-bale CGO for all these platforms.