* [Buildroot] [PATCH 1/1] package/pkg-golang: add cflags/ldflags to GO_HOST_ENV
@ 2019-06-03 9:21 Mirza Krak
2019-06-08 19:36 ` Adam Duskett
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Mirza Krak @ 2019-06-03 9:21 UTC (permalink / raw)
To: buildroot
If a go host package is built using cgo, it needs access
to HOST_CFLAGS/HOST_LDFLAGS to utilize host packages it
might depend on.
Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
---
This fixes current build errors of mender-artifact-3.0.0:
http://autobuild.buildroot.net/results/dd1a6dac03dd3b68ee63761c33dbb01c328d4f14/build-end.log
package/pkg-golang.mk | 2 ++
1 file changed, 2 insertions(+)
diff --git a/package/pkg-golang.mk b/package/pkg-golang.mk
index b4e8a53065..72e8f6b7af 100644
--- a/package/pkg-golang.mk
+++ b/package/pkg-golang.mk
@@ -35,6 +35,8 @@ GO_TARGET_ENV = \
$(GO_COMMON_ENV)
GO_HOST_ENV = \
+ CGO_CFLAGS="$(HOST_CFLAGS)" \
+ CGO_LDFLAGS="$(HOST_LDFLAGS)" \
$(GO_COMMON_ENV)
################################################################################
--
2.11.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/1] package/pkg-golang: add cflags/ldflags to GO_HOST_ENV
2019-06-03 9:21 [Buildroot] [PATCH 1/1] package/pkg-golang: add cflags/ldflags to GO_HOST_ENV Mirza Krak
@ 2019-06-08 19:36 ` Adam Duskett
2019-06-10 11:53 ` Arnout Vandecappelle
2019-06-23 19:20 ` Peter Korsgaard
2 siblings, 0 replies; 8+ messages in thread
From: Adam Duskett @ 2019-06-08 19:36 UTC (permalink / raw)
To: buildroot
All:
Acked-by: Adam Duskett <aduskett@gmail.com>
Tested-by: Adam Duskett <aduskett@gmail.com>
On Mon, Jun 3, 2019 at 5:21 AM Mirza Krak <mirza.krak@northern.tech> wrote:
>
> If a go host package is built using cgo, it needs access
> to HOST_CFLAGS/HOST_LDFLAGS to utilize host packages it
> might depend on.
>
> Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
> ---
>
> This fixes current build errors of mender-artifact-3.0.0:
>
> http://autobuild.buildroot.net/results/dd1a6dac03dd3b68ee63761c33dbb01c328d4f14/build-end.log
>
> package/pkg-golang.mk | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/package/pkg-golang.mk b/package/pkg-golang.mk
> index b4e8a53065..72e8f6b7af 100644
> --- a/package/pkg-golang.mk
> +++ b/package/pkg-golang.mk
> @@ -35,6 +35,8 @@ GO_TARGET_ENV = \
> $(GO_COMMON_ENV)
>
> GO_HOST_ENV = \
> + CGO_CFLAGS="$(HOST_CFLAGS)" \
> + CGO_LDFLAGS="$(HOST_LDFLAGS)" \
> $(GO_COMMON_ENV)
>
> ################################################################################
> --
> 2.11.0
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/1] package/pkg-golang: add cflags/ldflags to GO_HOST_ENV
2019-06-03 9:21 [Buildroot] [PATCH 1/1] package/pkg-golang: add cflags/ldflags to GO_HOST_ENV Mirza Krak
2019-06-08 19:36 ` Adam Duskett
@ 2019-06-10 11:53 ` Arnout Vandecappelle
2019-06-10 12:10 ` Mirza Krak
2019-06-23 19:20 ` Peter Korsgaard
2 siblings, 1 reply; 8+ messages in thread
From: Arnout Vandecappelle @ 2019-06-10 11:53 UTC (permalink / raw)
To: buildroot
On 03/06/2019 11:21, Mirza Krak wrote:
> If a go host package is built using cgo, it needs access
> to HOST_CFLAGS/HOST_LDFLAGS to utilize host packages it
> might depend on.
>
> Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
I apparently forgot to mention that I applied this to master, thanks. However...
> ---
>
> This fixes current build errors of mender-artifact-3.0.0:
>
> http://autobuild.buildroot.net/results/dd1a6dac03dd3b68ee63761c33dbb01c328d4f14/build-end.log
Still failing:
http://autobuild.buildroot.net/results/f9b/f9ba64ab4c8d7fa6cb301fab37ee4141ba442f61/build-end.log
I think the problem is that it is being linked statically, but host-xz only
builds the shared library...
Regards,
Arnout
>
> package/pkg-golang.mk | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/package/pkg-golang.mk b/package/pkg-golang.mk
> index b4e8a53065..72e8f6b7af 100644
> --- a/package/pkg-golang.mk
> +++ b/package/pkg-golang.mk
> @@ -35,6 +35,8 @@ GO_TARGET_ENV = \
> $(GO_COMMON_ENV)
>
> GO_HOST_ENV = \
> + CGO_CFLAGS="$(HOST_CFLAGS)" \
> + CGO_LDFLAGS="$(HOST_LDFLAGS)" \
> $(GO_COMMON_ENV)
>
> ################################################################################
> --
> 2.11.0
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/1] package/pkg-golang: add cflags/ldflags to GO_HOST_ENV
2019-06-10 11:53 ` Arnout Vandecappelle
@ 2019-06-10 12:10 ` Mirza Krak
2019-06-10 14:55 ` Arnout Vandecappelle
0 siblings, 1 reply; 8+ messages in thread
From: Mirza Krak @ 2019-06-10 12:10 UTC (permalink / raw)
To: buildroot
On Mon, Jun 10, 2019 at 1:53 PM Arnout Vandecappelle <arnout@mind.be> wrote:
>
>
>
> On 03/06/2019 11:21, Mirza Krak wrote:
> > If a go host package is built using cgo, it needs access
> > to HOST_CFLAGS/HOST_LDFLAGS to utilize host packages it
> > might depend on.
> >
> > Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
>
> I apparently forgot to mention that I applied this to master, thanks. However...
>
> > ---
> >
> > This fixes current build errors of mender-artifact-3.0.0:
> >
> > http://autobuild.buildroot.net/results/dd1a6dac03dd3b68ee63761c33dbb01c328d4f14/build-end.log
>
> Still failing:
>
> http://autobuild.buildroot.net/results/f9b/f9ba64ab4c8d7fa6cb301fab37ee4141ba442f61/build-end.log
>
> I think the problem is that it is being linked statically, but host-xz only
> builds the shared library...
I do not believe that it would try to link statically, at least that
was not the intention. However I am not able to reproduce this
locally.
Will compare defconfigs but I suspect it is related to,
BR2_STATIC_LIBS=y
being set in the erroneous build. This not something that I use
locally. Maybe this is also what you where referring to?
--
Mirza Krak | Embedded Solutions Architect | https://mender.io
Northern.tech AS | @northerntechHQ
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/1] package/pkg-golang: add cflags/ldflags to GO_HOST_ENV
2019-06-10 12:10 ` Mirza Krak
@ 2019-06-10 14:55 ` Arnout Vandecappelle
2019-06-10 15:12 ` Mirza Krak
0 siblings, 1 reply; 8+ messages in thread
From: Arnout Vandecappelle @ 2019-06-10 14:55 UTC (permalink / raw)
To: buildroot
On 10/06/2019 14:10, Mirza Krak wrote:
> On Mon, Jun 10, 2019 at 1:53 PM Arnout Vandecappelle <arnout@mind.be> wrote:
>>
>>
>>
>> On 03/06/2019 11:21, Mirza Krak wrote:
>>> If a go host package is built using cgo, it needs access
>>> to HOST_CFLAGS/HOST_LDFLAGS to utilize host packages it
>>> might depend on.
>>>
>>> Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
>>
>> I apparently forgot to mention that I applied this to master, thanks. However...
>>
>>> ---
>>>
>>> This fixes current build errors of mender-artifact-3.0.0:
>>>
>>> http://autobuild.buildroot.net/results/dd1a6dac03dd3b68ee63761c33dbb01c328d4f14/build-end.log
>>
>> Still failing:
>>
>> http://autobuild.buildroot.net/results/f9b/f9ba64ab4c8d7fa6cb301fab37ee4141ba442f61/build-end.log
>>
>> I think the problem is that it is being linked statically, but host-xz only
>> builds the shared library...
>
> I do not believe that it would try to link statically, at least that
> was not the intention.
Doesn't Go always link statically?
> However I am not able to reproduce this
> locally.
Maybe you have liblzma.a installed on your host system?
>
> Will compare defconfigs but I suspect it is related to,
>
> BR2_STATIC_LIBS=y
>
> being set in the erroneous build.
It may be related, but it shouldn't be: the build of host packages should not
depend on the setting of BR2_STATIC_LIBS on the target.
> This not something that I use
> locally.
You can try to reproduce locally using the config from the autobuilder.
Regards,
Arnout
> Maybe this is also what you where referring to?
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/1] package/pkg-golang: add cflags/ldflags to GO_HOST_ENV
2019-06-10 14:55 ` Arnout Vandecappelle
@ 2019-06-10 15:12 ` Mirza Krak
2019-06-10 15:41 ` Mirza Krak
0 siblings, 1 reply; 8+ messages in thread
From: Mirza Krak @ 2019-06-10 15:12 UTC (permalink / raw)
To: buildroot
On Mon, Jun 10, 2019 at 4:55 PM Arnout Vandecappelle <arnout@mind.be> wrote:
>
>
>
> On 10/06/2019 14:10, Mirza Krak wrote:
> > On Mon, Jun 10, 2019 at 1:53 PM Arnout Vandecappelle <arnout@mind.be> wrote:
> >>
> >>
> >>
> >> On 03/06/2019 11:21, Mirza Krak wrote:
> >>> If a go host package is built using cgo, it needs access
> >>> to HOST_CFLAGS/HOST_LDFLAGS to utilize host packages it
> >>> might depend on.
> >>>
> >>> Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
> >>
> >> I apparently forgot to mention that I applied this to master, thanks. However...
> >>
> >>> ---
> >>>
> >>> This fixes current build errors of mender-artifact-3.0.0:
> >>>
> >>> http://autobuild.buildroot.net/results/dd1a6dac03dd3b68ee63761c33dbb01c328d4f14/build-end.log
> >>
> >> Still failing:
> >>
> >> http://autobuild.buildroot.net/results/f9b/f9ba64ab4c8d7fa6cb301fab37ee4141ba442f61/build-end.log
> >>
> >> I think the problem is that it is being linked statically, but host-xz only
> >> builds the shared library...
> >
> > I do not believe that it would try to link statically, at least that
> > was not the intention.
>
> Doesn't Go always link statically?
From my understanding, this is not the case when using CGO unless you
explicitly state so.
> > However I am not able to reproduce this
> > locally.
>
> Maybe you have liblzma.a installed on your host system?
>
> >
> > Will compare defconfigs but I suspect it is related to,
> >
> > BR2_STATIC_LIBS=y
> >
> > being set in the erroneous build.
>
> It may be related, but it shouldn't be: the build of host packages should not
> depend on the setting of BR2_STATIC_LIBS on the target.
>
> > This not something that I use
> > locally.
>
> You can try to reproduce locally using the config from the autobuilder.
Thanks for the pointers, I will investigate further.
--
Mirza Krak | Embedded Solutions Architect | https://mender.io
Northern.tech AS | @northerntechHQ
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/1] package/pkg-golang: add cflags/ldflags to GO_HOST_ENV
2019-06-10 15:12 ` Mirza Krak
@ 2019-06-10 15:41 ` Mirza Krak
0 siblings, 0 replies; 8+ messages in thread
From: Mirza Krak @ 2019-06-10 15:41 UTC (permalink / raw)
To: buildroot
On Mon, Jun 10, 2019 at 5:12 PM Mirza Krak <mirza.krak@northern.tech> wrote:
>
< snip >
> > >
> > > Will compare defconfigs but I suspect it is related to,
> > >
> > > BR2_STATIC_LIBS=y
> > >
> > > being set in the erroneous build.
> >
> > It may be related, but it shouldn't be: the build of host packages should not
> > depend on the setting of BR2_STATIC_LIBS on the target.
> >
> > > This not something that I use
> > > locally.
> >
> > You can try to reproduce locally using the config from the autobuilder.
>
> Thanks for the pointers, I will investigate further.
I believe that I found the cause of this, patch sent
https://patchwork.ozlabs.org/patch/1113150/
--
Mirza Krak | Embedded Solutions Architect | https://mender.io
Northern.tech AS | @northerntechHQ
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/1] package/pkg-golang: add cflags/ldflags to GO_HOST_ENV
2019-06-03 9:21 [Buildroot] [PATCH 1/1] package/pkg-golang: add cflags/ldflags to GO_HOST_ENV Mirza Krak
2019-06-08 19:36 ` Adam Duskett
2019-06-10 11:53 ` Arnout Vandecappelle
@ 2019-06-23 19:20 ` Peter Korsgaard
2 siblings, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2019-06-23 19:20 UTC (permalink / raw)
To: buildroot
>>>>> "Mirza" == Mirza Krak <mirza.krak@northern.tech> writes:
> If a go host package is built using cgo, it needs access
> to HOST_CFLAGS/HOST_LDFLAGS to utilize host packages it
> might depend on.
> Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
> ---
> This fixes current build errors of mender-artifact-3.0.0:
> http://autobuild.buildroot.net/results/dd1a6dac03dd3b68ee63761c33dbb01c328d4f14/build-end.log
Committed to 2019.05.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-06-23 19:20 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-03 9:21 [Buildroot] [PATCH 1/1] package/pkg-golang: add cflags/ldflags to GO_HOST_ENV Mirza Krak
2019-06-08 19:36 ` Adam Duskett
2019-06-10 11:53 ` Arnout Vandecappelle
2019-06-10 12:10 ` Mirza Krak
2019-06-10 14:55 ` Arnout Vandecappelle
2019-06-10 15:12 ` Mirza Krak
2019-06-10 15:41 ` Mirza Krak
2019-06-23 19:20 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.