Bug 13966 - Go fails on riscv
Summary: Go fails on riscv
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 3.3
Hardware: x86 other
: Medium+ normal
Target Milestone: 3.2 M2
Assignee: Khem Raj
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2020-07-01 07:38 UTC by Ross Burton
Modified: 2020-08-14 02:29 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.