[Buildroot] pkg-golang: host package not supported

Mirza Krak mirza.krak at northern.tech
Tue Aug 14 22:16:48 UTC 2018


On Wed, Aug 15, 2018 at 12:14 AM, Thomas Petazzoni
<thomas.petazzoni at bootlin.com> wrote:
> Hello,
>
> On Wed, 15 Aug 2018 00:05:47 +0200, Mirza Krak wrote:
>
>> I did have one problem with $(2)_SRC_SUBDIR, it turns out to be empty
>> when building host target. Workaround was to explicitly set this in
>> the .mk file with the HOST_ prefix. Any hints on why? Need some ifeq
>> ($(4),target) ... else ... endif  magic? :)
>
> Could you try this change:
>
> diff --git a/package/pkg-golang.mk b/package/pkg-golang.mk
> index bf178622b5..6eacd14180 100644
> --- a/package/pkg-golang.mk
> +++ b/package/pkg-golang.mk
> @@ -77,9 +77,9 @@ $(2)_INSTALL_BINS ?= $(1)
>  # of GOPATH. It usually resolves around domain/vendor/software. By default, we
>  # derive domain/vendor/software from the upstream URL of the project, but we
>  # allow $(2)_SRC_SUBDIR to be overridden if needed.
> -$(2)_SRC_DOMAIN = $$(call domain,$($(2)_SITE))
> -$(2)_SRC_VENDOR = $$(word 1,$$(subst /, ,$$(call notdomain,$($(2)_SITE))))
> -$(2)_SRC_SOFTWARE = $$(word 2,$$(subst /, ,$$(call notdomain,$($(2)_SITE))))
> +$(2)_SRC_DOMAIN = $$(call domain,$$($(2)_SITE))
> +$(2)_SRC_VENDOR = $$(word 1,$$(subst /, ,$$(call notdomain,$$($(2)_SITE))))
> +$(2)_SRC_SOFTWARE = $$(word 2,$$(subst /, ,$$(call notdomain,$$($(2)_SITE))))

Yeah, this works!

-- 
Mirza Krak | Embedded Solutions Architect | https://mender.io

 Northern.tech AS | @northerntechHQ



More information about the buildroot mailing list