Skip to content

Enforce ld.gold is installed and show its version #53

Merged
bthomee merged 2 commits intomainfrom
print_gold_version
Sep 29, 2025
Merged

Enforce ld.gold is installed and show its version #53
bthomee merged 2 commits intomainfrom
print_gold_version

Conversation

@Bronek
Copy link
Collaborator

@Bronek Bronek commented Sep 26, 2025

This does not actually add ld.gold to our docker images (since binutils is a required dependency and contains gold in all the distros we currently support), however it does make it explicit and shows its version. Might be also useful for the future, if ld.gold is no longer installed by default (e.g. Debian Trixie)

@Bronek Bronek requested review from bthomee and legleux September 26, 2025 09:43
@bthomee
Copy link
Contributor

bthomee commented Sep 26, 2025

Since we currently don't use gold, and knowing that it's already deprecated and slated to be removed at some point, what's the benefit of adding it now and then having the pipeline fail when it's gone?

@Bronek
Copy link
Collaborator Author

Bronek commented Sep 26, 2025

Turns out, we do use gold. It is installed by default by the binutils package, and used by default for gcc builds, if installed.

As for the latter question, the binutils versions in all of the distros we use (Debian, Ubuntu, RHEL) are old enough not to be affected by the announcement from GNU, e.g. RHEL 9.6 is on version 2.35 ; Ubuntu Noble version 2.42 ; Debian Bookworm version 2.40. We would only need to explicitly install binutils-gold for Debian Trixie and that would be version 2.44

The addition of binutils-gold package is basically future-proofing until we switch to another linker, and that decision belongs to XRPLF projects such as rippled, not to CI.

@bthomee
Copy link
Contributor

bthomee commented Sep 26, 2025

Is your PR description still accurate?

This does not actually add ld.gold to our docker images

@Bronek
Copy link
Collaborator Author

Bronek commented Sep 26, 2025

Is your PR description still accurate?

This does not actually add ld.gold to our docker images

Yes. ld.gold is added by binutils which we implicitly have installed (because it is required dependency when you want to use any compiler).

With the addition of binutils-gold we make it explicit that we want this linker - rather than rely on what the current distro release is serving.

$ dpkg -S `which ld.gold`
binutils: /usr/bin/ld.gold

@Bronek Bronek changed the title Verify ld.gold is installed and show its version Enforce ld.gold is installed and show its version Sep 26, 2025
@bthomee bthomee merged commit 52d2ae6 into main Sep 29, 2025
36 checks passed
@bthomee bthomee deleted the print_gold_version branch September 29, 2025 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants