Skip to content

Do not build ld.gold with binutils 2.44 or newer #3703

Merged
jfgrimm merged 4 commits intoeasybuilders:developfrom
Thyre:binutils-add-gold-option
May 6, 2025
Merged

Do not build ld.gold with binutils 2.44 or newer #3703
jfgrimm merged 4 commits intoeasybuilders:developfrom
Thyre:binutils-add-gold-option

Conversation

@Thyre
Copy link
Copy Markdown
Collaborator

@Thyre Thyre commented Apr 25, 2025

Required for binutils 2.44 and newer versions going forward, as ld.gold with be phased out. Not every release will contain ld.gold, causing the sanity checks to fail.

The alternative would be to check if the sources support ld.gold, or choose binutils-with-gold-[...].tar for now.

See https://lists.gnu.org/archive/html/info-gnu/2025-02/msg00001.html for more information.

@jfgrimm
Copy link
Copy Markdown
Member

jfgrimm commented Apr 25, 2025

if their plan is to drop ld.gold altogether, we might as well just make it a version check instead of introducing an easyconfig parameter?

if LooseVersion(self.version) >= LooseVersion('2.44') or get_cpu_family() == RISCV:
    # ld.gold linker is not supported on RISC-V, and is being phased out starting from v2.44
    self.use_gold = False
else:
    self.use_gold = True

@jfgrimm jfgrimm added this to the 5.x milestone Apr 25, 2025
@Thyre
Copy link
Copy Markdown
Collaborator Author

Thyre commented Apr 25, 2025

That's not entirely determined. In the release notes, they mention:

This is because the gold linker is now deprecated and will eventually be removed unless volunteers step forward and offer to continue development and maintenance.

At the moment, I would expect that ld.gold will be gone at some point.
I'll change to your suggestion though, this is easier to maintain, and keeps the EasyConfigs clean.

Starting with binutils 2.44, the ld.gold linker is being phased out.
Uneven releases will still contain the gold linker, but for an uncertain
amount of time.

Adopt to this change early and remove the gold linker for all releases
starting with binutils 2.44.

Signed-off-by: Jan Andre Reuter <jan@zyten.de>
@Thyre Thyre force-pushed the binutils-add-gold-option branch from f006e60 to 68a6a08 Compare April 25, 2025 14:53
@Thyre Thyre changed the title binutils: Add option to build without ld.gold binutils: Do not build ld.gold with binutils 2.44 or newer Apr 25, 2025
@jfgrimm
Copy link
Copy Markdown
Member

jfgrimm commented Apr 25, 2025

with this change, I suppose we might want to update the gcc.py easyblockas well: https://github.com/easybuilders/easybuild-easyblocks/blob/develop/easybuild/easyblocks/g/gcc.py#L685
which currently has:

L191             # Disable the Gold linker by default for GCC 11.3.0 and newer, as it suffers from bitrot
L192             if self.cfg['use_gold_linker'] is None:
L193                 self.cfg['use_gold_linker'] = version < LooseVersion('11.3.0')

[...]

L680         # use GOLD as default linker, except on RISC-V (since it's not supported there)
L681         if get_cpu_family() == RISCV:
L682             self.configopts += " --disable-gold --enable-ld=default"
L683         elif self.cfg['use_gold_linker']:
L684             self.configopts += " --enable-gold=default --enable-ld --with-plugin-ld=ld.gold"
L685         else:
L686             self.configopts += " --enable-gold --enable-ld=default"

@Thyre
Copy link
Copy Markdown
Collaborator Author

Thyre commented Apr 25, 2025

Right, probably a good idea to either abort when use_gold_linker is used with a binutils version which doesn't support the gold linker anymore, or at least raise a warning and switch to the else case.

I'll take a look.

Signed-off-by: Jan Andre Reuter <jan@zyten.de>
@Thyre Thyre force-pushed the binutils-add-gold-option branch from 566b470 to 2954cef Compare April 25, 2025 17:29
@Thyre
Copy link
Copy Markdown
Collaborator Author

Thyre commented Apr 25, 2025

@boegelbot please test @ jsc-zen3
EB_ARGS="GCCcore-10.2.0.eb GCCcore-12.3.0.eb GCCcore-14.2.0.eb --installpath /tmp/$USER/pr3703"

@boegelbot
Copy link
Copy Markdown

@Thyre: Request for testing this PR well received on jsczen3l1.int.jsc-zen3.fz-juelich.de

PR test command 'if [[ develop != 'develop' ]]; then EB_BRANCH=develop ./easybuild_develop.sh 2> /dev/null 1>&2; EB_PREFIX=/home/boegelbot/easybuild/develop source init_env_easybuild_develop.sh; fi; EB_PR=3703 EB_ARGS="GCCcore-10.2.0.eb GCCcore-12.3.0.eb GCCcore-14.2.0.eb --installpath /tmp/$USER/pr3703" EB_REPO=easybuild-easyblocks EB_BRANCH=develop /opt/software/slurm/bin/sbatch --job-name test_PR_3703 --ntasks=8 ~/boegelbot/eb_from_pr_upload_jsc-zen3.sh' executed!

  • exit code: 0
  • output:
Submitted batch job 6252

Test results coming soon (I hope)...

Details

- notification for comment with ID 2831582108 processed

Message to humans: this is just bookkeeping information for me,
it is of no use to you (unless you think I have a bug, which I don't).

@boegelbot
Copy link
Copy Markdown

Test report by @boegelbot

Overview of tested easyconfigs (in order)

  • SUCCESS GCCcore-10.2.0.eb
  • SUCCESS GCCcore-12.3.0.eb
  • SUCCESS GCCcore-14.2.0.eb

Build succeeded for 3 out of 3 (3 easyconfigs in total)
jsczen3c1.int.jsc-zen3.fz-juelich.de - Linux Rocky Linux 9.5, x86_64, AMD EPYC-Milan Processor (zen3), Python 3.9.21
See https://gist.github.com/boegelbot/333fd10c890b50f2f1aec6fb6b371d0e for a full test report.

@Thyre
Copy link
Copy Markdown
Collaborator Author

Thyre commented Apr 28, 2025

Test report by @Thyre

Overview of tested easyconfigs (in order)

  • SUCCESS GCCcore-14.2.0.eb

Build succeeded for 1 out of 1 (1 easyconfigs in total)
Linux - Linux Arch Linux UNKNOWN, x86_64, AMD Ryzen 7 7800X3D 8-Core Processor, 1 x AMD Navi 48 [RX 9070/9070 XT] (device id: 0x7550, gfx: gfx1201, driver: 6.14.3-arch1-1), 1 x AMD Raphael (device id: 0x164e, gfx: gfx1036, driver: 6.14.3-arch1-1), Python 3.13.3
See https://gist.github.com/Thyre/f0bfba24a08032c7bc4a076017fd8026 for a full test report.

@Thyre
Copy link
Copy Markdown
Collaborator Author

Thyre commented Apr 28, 2025

Test with filtered binutils


Test report by @Thyre

Overview of tested easyconfigs (in order)

  • SUCCESS GCCcore-14.2.0.eb

Build succeeded for 1 out of 1 (1 easyconfigs in total)
Framework - Linux Fedora Linux 42, x86_64, AMD Ryzen AI 7 350 w/ Radeon 860M, 1 x AMD Krackan [Radeon 840M / 860M Graphics] (device id: 0x1114, gfx: gfx1152, driver: 6.14.3-300.fc42.x86_64), Python 3.13.3
See https://gist.github.com/Thyre/aa4c2e31f87bbb43f33348c98a7d4893 for a full test report.

Signed-off-by: Jan André Reuter <j.reuter@fz-juelich.de>
@Thyre
Copy link
Copy Markdown
Collaborator Author

Thyre commented May 6, 2025

@boegelbot please test @ jsc-zen3
EB_ARGS="GCCcore-10.2.0.eb GCCcore-12.3.0.eb GCCcore-14.2.0.eb --installpath /tmp/$USER/pr3703"

@boegelbot
Copy link
Copy Markdown

@Thyre: Request for testing this PR well received on jsczen3l1.int.jsc-zen3.fz-juelich.de

PR test command 'if [[ develop != 'develop' ]]; then EB_BRANCH=develop ./easybuild_develop.sh 2> /dev/null 1>&2; EB_PREFIX=/home/boegelbot/easybuild/develop source init_env_easybuild_develop.sh; fi; EB_PR=3703 EB_ARGS="GCCcore-10.2.0.eb GCCcore-12.3.0.eb GCCcore-14.2.0.eb --installpath /tmp/$USER/pr3703" EB_REPO=easybuild-easyblocks EB_BRANCH=develop /opt/software/slurm/bin/sbatch --job-name test_PR_3703 --ntasks=8 ~/boegelbot/eb_from_pr_upload_jsc-zen3.sh' executed!

  • exit code: 0
  • output:
Submitted batch job 6291

Test results coming soon (I hope)...

Details

- notification for comment with ID 2853452187 processed

Message to humans: this is just bookkeeping information for me,
it is of no use to you (unless you think I have a bug, which I don't).

gmp configure needs to use C99 as well, or configure fails with
GCC 15.1.0.

Signed-off-by: Jan André Reuter <j.reuter@fz-juelich.de>
@boegelbot
Copy link
Copy Markdown

Test report by @boegelbot

Overview of tested easyconfigs (in order)

  • SUCCESS GCCcore-10.2.0.eb
  • SUCCESS GCCcore-12.3.0.eb
  • SUCCESS GCCcore-14.2.0.eb

Build succeeded for 3 out of 3 (3 easyconfigs in total)
jsczen3c1.int.jsc-zen3.fz-juelich.de - Linux Rocky Linux 9.5, x86_64, AMD EPYC-Milan Processor (zen3), Python 3.9.21
See https://gist.github.com/boegelbot/5732465dc64a0a8c0e31751a886709b5 for a full test report.

Copy link
Copy Markdown
Member

@jfgrimm jfgrimm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jfgrimm
Copy link
Copy Markdown
Member

jfgrimm commented May 6, 2025

Going in, thanks @Thyre!

@jfgrimm jfgrimm merged commit 10c5110 into easybuilders:develop May 6, 2025
17 checks passed
@jfgrimm jfgrimm added the change label May 6, 2025
@boegel boegel changed the title binutils: Do not build ld.gold with binutils 2.44 or newer Do not build ld.gold with binutils 2.44 or newer May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants