[Buildroot] [PATCH 1/1] package/pkg-golang: add cflags/ldflags to GO_HOST_ENV

Arnout Vandecappelle arnout at mind.be
Mon Jun 10 14:55:16 UTC 2019



On 10/06/2019 14:10, Mirza Krak wrote:
> On Mon, Jun 10, 2019 at 1:53 PM Arnout Vandecappelle <arnout at 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 at 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? 



More information about the buildroot mailing list