From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Petazzoni Date: Wed, 15 Aug 2018 00:14:13 +0200 Subject: [Buildroot] pkg-golang: host package not supported In-Reply-To: References: <20180810140056.5cf7d9ed@windsurf> Message-ID: <20180815001413.5c063d83@windsurf> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net 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)))) $(2)_SRC_SUBDIR ?= $$($(2)_SRC_DOMAIN)/$$($(2)_SRC_VENDOR)/$$($(2)_SRC_SOFTWARE) $(2)_SRC_PATH = $$(@D)/$$($(2)_WORKSPACE)/src/$$($(2)_SRC_SUBDIR) Thanks! Thomas -- Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com