Bug 14859 - Go selftest fails when target=qemux86-64 but host=aarch64
Summary: Go selftest fails when target=qemux86-64 but host=aarch64
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 4.2
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 4.1 M3
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2022-07-12 10:42 UTC by Ross Burton
Modified: 2022-07-26 15:37 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 2022-07-12 10:42:24 UTC
If I run the gotoolchain selftest on an aarch64 host with MACHINE=qemux86-64, the test fails:

AssertionError: Command 'cd /tmp/SDKQAg7yt6cs3/go/src/github.com/direnv/direnv; . /tmp/SDKQAg7yt6cs3/environment-setup-core2-64-poky-linux; export GOPATH=/tmp/SDKQAg7yt6cs3/go; ${CROSS_COMPILE}go build' returned non-zero exit status 2:
go: downloading github.com/BurntSushi/toml v0.3.1
go: downloading golang.org/x/mod v0.4.0
go: downloading github.com/direnv/go-dotenv v0.0.0-20181227095604-4cce6d1a66f7
go: downloading github.com/mattn/go-isatty v0.0.12
go: downloading golang.org/x/sys v0.0.0-20200116001909-b77594299b42
# github.com/direnv/direnv
cannot find package runtime/cgo (using -importcfg)
/tmp/SDKQAg7yt6cs3/sysroots/aarch64-pokysdk-linux/usr/lib/x86_64-poky-linux/go/pkg/tool/linux_arm64/link: cannot open file : open : no such file or directory
Comment 1 Ross Burton 2022-07-12 13:38:07 UTC
https://bugzilla.yoctoproject.org/show_bug.cgi?id=14860 is another Go/SDK issue.
Comment 2 Ross Burton 2022-07-25 15:53:59 UTC
CGO_ENABLED=1 needed to be set.  Patch on the list.
Comment 3 Ross Burton 2022-07-26 15:37:28 UTC
Fixed in 19be072619d39267df44f23c4c8b64f3808f6148.