Bug 13474 - go install/build fails on target for programs importing log/syslog
Summary: go install/build fails on target for programs importing log/syslog
Status: RESOLVED INVALID
Alias: None
Product: General Runtime
Classification: Runtime
Component: General Runtime (show other bugs)
Version: 3.0
Hardware: x86 Multiple
: Medium normal
Target Milestone: 6.1
Assignee: Chen Qi
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2019-08-12 08:31 UTC by Chen Qi
Modified: 2026-07-09 15:10 UTC (History)
3 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 Chen Qi 2019-08-12 08:31:55 UTC
root@yocto-k8s-master:~/projects/golang/src/testgo# go install
go build runtime/cgo: x86_64-poky-linux-gcc  -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong  -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/buildarea2/chenqi/poky/build-systemd/tmp/work/core2-64-poky-linux/go/1.12.6-r0/recipe-sysroot: fork/exec x86_64-poky-linux-gcc  -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong  -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/buildarea2/chenqi/poky/build-systemd/tmp/work/core2-64-poky-linux/go/1.12.6-r0/recipe-sysroot: no such file or directory

root@yocto-k8s-master:~/projects/golang/src/testgo# cat testgo.go
package main

import "fmt"
import "log/syslog"

func main() {
	fmt.Println("========== testgo ===============")
}
root@yocto-k8s-master:~/projects/golang/src/testgo#
Comment 1 Chen Qi 2019-10-25 01:11:50 UTC
There's a go upgrade in master, let's see how things will turn out after the upgrade.
Comment 2 Randy MacLeod 2022-04-11 22:00:07 UTC
@Chen, please check again either now or once we have 1.18 in master.
Comment 3 Randy MacLeod 2023-10-30 15:37:29 UTC
Build move to 5.0 -- ../Randy
Comment 4 Randy MacLeod 2024-04-25 01:13:51 UTC
Bulk move of 5.0 medium importance issues to 5.99.
Move to 5.1 if you want to actively work on an issue.
Comment 5 Randy MacLeod 2024-04-25 01:23:14 UTC
Move to 5.99 since no one is actively working on this issue.
Move to 5.x if you start on a task, please.
Comment 6 Mathieu Dubois-Briand 2026-04-30 15:07:43 UTC
Need to retest and see if this is still an issue
Comment 7 Gunashree K L 2026-06-22 09:22:27 UTC
The issue has been verified on oe-core master branch.

It is reproducible in the default setup:
    go list log/syslog
results in:
    package log/syslog is not in std

However, this is resolved by including:
    IMAGE_INSTALL += "packagegroup-go-sdk-target"

With this packagegroup, the required Go stdlib components are available, and both:
    go list log/syslog
    and building simple Go programs (go-helloworld)

work correctly on the target.

Since the required functionality is already provided through existing packaging, no changes to the go recipe are required.

Requesting reporter to confirm the solution.
Comment 8 Randy MacLeod 2026-07-09 15:10:55 UTC
Thanks Gunashree.