package/yq: disable CGO to fix cross-compilation failures
PATCH 1/1 package/yq: disable CGO to fix cross-compilation failures
runtime.cgo_yield: relocation target _cgo_yield not defined net._cgo_77133bf98b3a_C2func_getaddrinfo: relocation target _cgo_77133bf98b3a_C2func_getaddrinfo not defined net._cgo_77133bf98b3a_Cfunc_freeaddrinfo: relocation target _cgo_77133bf98b3a_Cfunc_freeaddrinfo not defined net._cgo_77133bf98b3a_Cfunc_gai_strerror: relocation target _cgo_77133bf98b3a_Cfunc_gai_strerror not defined /home/thomas/Documents/external/buildroot/output/host/lib/go/pkg/tool/linux_amd64/link: too many errors
The errors occur because yq doesn't actually require CGO - it's a pure Go application with no C dependencies. However, the Go toolchain was attempting to use CGO during cross-compilation, leading to unresolved symbols.
So disable CGO, which is confirmed by upstream's build configuration that explicitly sets CGO_ENABLED=0 in their .goreleaser.yaml:
https://github.com/mikefarah/yq/blob/v4.49.2/.goreleaser.yaml#L14
Fixes:
- https://autobuild.buildroot.org/results/52ec88fdcfea00f32a4dffea5cebb901ecdbd1ad
--- package/yq/yq.mk | 1 + 1 file changed, 1 insertion(+)
package/yq/yq.mk +1 -0
@@ -9,5 +9,6 @@ YQ_SITE = $(call github,mikefarah,yq,v$(YQ_VERSION)) YQ_LICENSE = MIT YQ_LICENSE_FILES = LICENSE YQ_GOMOD = github.com/mikefarah/yq/v4 +YQ_GO_ENV = CGO_ENABLED=0 $(eval $(golang-package))
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot