Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Fiona Klute via buildroot <buildroot@buildroot.org>
To: Arnout Vandecappelle <arnout@mind.be>, buildroot@buildroot.org
Cc: Thomas Perale <thomas.perale@mind.be>,
	Christian Stewart <christian@aperture.us>
Subject: Re: [Buildroot] [PATCH 1/1] package/go/go-src: stop forcing binutils-gold dependency on aarch64
Date: Mon, 3 Feb 2025 16:17:52 +0100	[thread overview]
Message-ID: <bf504c35-cbe4-40dd-b56d-bfa3b62e552c@gmx.de> (raw)
In-Reply-To: <087a8c52-81f6-4031-b0ce-712fc8857034@mind.be>

Hi Arnout!

Am 03.02.25 um 15:13 schrieb Arnout Vandecappelle:
>
>
> On 03/02/2025 14:04, Fiona Klute wrote:
>> Hi Arnout!
>>
>> Am 03.02.25 um 13:48 schrieb Arnout Vandecappelle:
>>>   Hi Fiona,
>>>
>>> On 03/02/2025 13:01, Fiona Klute wrote:
>>>> From: "Fiona Klute (WIWA)" <fiona.klute@gmx.de>
>>>>
>>>> Go forces the GOLD linker when dynamically linking Go code, because
>>>> old versions of BFD caused errors. The issue has been fixed in
>>>> Binutils since at least 2.41 according to the upstream description of
>>>> the patch added with this commit [1], and now forcing GOLD causes
>>>> linking failure if ld.gold is not available. The associated Golang
>>>> issue [2] is still open.
>>>>
>>>> Import the patch to stop forcing GOLD.
>>>
>>>   This fixes the issue for go-src, but not for go-bin unfortunately...
>>> And go-bin is the default...
>>
>> I'm afraid I can't patch the Go binaries, at least not with reasonable
>> effort.
>
>   Oh come on, how hard can it be :-)
>
>
>>>   On the other hand, we don't have any autobuilder failures yet, so
>>> maybe it's a corner case problem and we can live with it until go-bin
>>> gets bumped to 1.23.6 (assuming upstream applies the fix to their stable
>>> branch of course).
>>
>> As I understand the code, the forced option is only applied when
>> building a dynamically linked library, which is probably not very common
>> with Go. I haven't looked more deeply into it, but my current assumption
>> is that containerd started doing that with the 2.0 release, because
>> there haven't been any recent changes to package/binutils (and
>> definitely none disabling Gold). Otherwise the error should've shown up
>> earlier.
>
>   Great! In that case, we can either patch containerd to not do that, or
> (temporarily) make containerd depend on host-go-src (with a big comment
> explaining why).
>
>   However, I think it's best to apply this patch and leave containerd +
> go-bin as broken for a while. If there will be a Go 1.23.6 that fixes
> the issue, then just bumping Go (both bin and src) is a much easier path
> forward.

I mostly agree, though there's one catch: I have no idea if the patch
will be merged upstream soon. The patch is almost 3 years old by now,
and the issue discussion doesn't indicate a plan.

If we need a workaround enabling Gold in the Binutils build for the
cross toolchain might also be an option, but has two disadvantages:

a) It's not going to help people using a pre-built toolchain.
b) The Binutils developers seem to be planning to deprecate Gold:
https://sourceware.org/pipermail/binutils/2024-October/137319.html (The
Debian package changelog is a lot more direct about that.)

I hope that point b) hurries things along on the Go side, so I mentioned
it in the issue [1].

Best regards,
Fiona


[1] https://github.com/golang/go/issues/22040#issuecomment-2630848777

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2025-02-03 15:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-03 12:01 [Buildroot] [PATCH 1/1] package/go/go-src: stop forcing binutils-gold dependency on aarch64 Fiona Klute via buildroot
2025-02-03 12:48 ` Arnout Vandecappelle via buildroot
2025-02-03 13:04   ` Fiona Klute via buildroot
2025-02-03 14:13     ` Arnout Vandecappelle via buildroot
2025-02-03 15:17       ` Fiona Klute via buildroot [this message]
2025-02-03 20:08         ` Christian Stewart via buildroot
2025-02-04  3:41           ` Christian Stewart via buildroot
2025-02-04  6:27             ` yann.morin
2025-02-04 14:50             ` Fiona Klute via buildroot
2025-02-04  6:26 ` yann.morin
2025-02-04 10:52   ` Fiona Klute via buildroot
2025-02-04 11:13     ` yann.morin
2025-02-04 11:37       ` Fiona Klute via buildroot
2025-02-04 12:13         ` yann.morin
2025-02-04 14:37           ` Fiona Klute via buildroot
2025-02-04 11:27     ` Arnout Vandecappelle via buildroot
2025-02-04 14:46       ` Fiona Klute via buildroot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bf504c35-cbe4-40dd-b56d-bfa3b62e552c@gmx.de \
    --to=buildroot@buildroot.org \
    --cc=arnout@mind.be \
    --cc=christian@aperture.us \
    --cc=fiona.klute@gmx.de \
    --cc=thomas.perale@mind.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox