Dependency chain: which option in my .config is requiring golang host?

Currently, I cannot build the host package of golang. Is there is an easy way to determine which option in my .diffconfig is depending on the host package of golang?

How could we guess? Host golang can be used to bootstrap cross golang for OpenWrt

Many packages in the packages repo depend on it.

$ git grep -l golang/host
admin/qbee-agent/Makefile
devel/delve/Makefile
devel/gitlab-runner/Makefile
lang/golang/golang/Makefile
libs/boringssl/Makefile
multimedia/go2rtc/Makefile
net/adguardhome/Makefile
net/alist/Makefile
net/cloudflared/Makefile
net/cloudreve/Makefile
net/cni-route-override/Makefile
net/croc/Makefile
net/crowdsec-firewall-bouncer/Makefile
net/crowdsec/Makefile
net/databag/Makefile
net/dns-over-https/Makefile
net/dnscrypt-proxy2/Makefile
net/dnslookup/Makefile
net/dnsproxy/Makefile
net/dnstap/Makefile
net/evilginx2/Makefile
net/frp/Makefile
net/gateway-go/Makefile
net/geoipupdate/Makefile
net/gg/Makefile
net/git-lfs/Makefile
net/irtt/Makefile
net/kcptun/Makefile
net/librespeed-go/Makefile
net/nebula/Makefile
net/netbird/Makefile
net/nextdns/Makefile
net/obfs4proxy/Makefile
net/overture/Makefile
net/rclone/Makefile
net/restic-rest-server/Makefile
net/sing-box/Makefile
net/snowflake/Makefile
net/speedtest-go/Makefile
net/tailscale/Makefile
net/v2ray-core/Makefile
net/v2raya/Makefile
net/wgsd/Makefile
net/wifi-presence/Makefile
net/xray-core/Makefile
net/yggdrasil/Makefile
net/ztdns/Makefile
utils/cni-plugins-nft/Makefile
utils/cni-plugins/Makefile
utils/cni/Makefile
utils/containerd/Makefile
utils/ctop/Makefile
utils/docker-compose/Makefile
utils/docker/Makefile
utils/dockerd/Makefile
utils/fx/Makefile
utils/librespeed-cli/Makefile
utils/miniflux/Makefile
utils/nerdctl/Makefile
utils/oci-runtime-tools/Makefile
utils/podman/Makefile
utils/prometheus-statsd-exporter/Makefile
utils/restic/Makefile
utils/runc/Makefile
utils/syncthing/Makefile
utils/telegraf/Makefile
utils/yq/Makefile
1 Like

@dave14305 - Here is a way to look at a fully expanded .config to see which, if any, packages are causing host/golang to build:

grepscript.sh
#!/bin/bash
find . -name Makefile -exec grep -l "golang\|GO_PKG\|PKG_BUILD_DEPENDS.*golang" {} \; > host-golang-packages
find . -name Makefile -exec grep -l "HOST_BUILD_DEPENDS.*golang\|PKG_BUILD_DEPENDS.*golang" {} \; >> host-golang-packages
mapfile -t list < <(grep -oP '[^/]+(?=/Makefile$)' host-golang-packages|sort|uniq)

for i in "${list[@]}"; do
  grep --color=auto "$i"= .config
done

rm -f host-golang-packages

You need to run this in your openwrt directory that is ready to build the image.