Skip to content

Conversation

@Flamefire
Copy link
Contributor

When the system ld is used the sanity check step fails

g++ minimal.cpp -o minimal_cpp $(llvm-config --link-static --system-libs all) failed with exit code 1 (output: /usr/bin/ld.gold: /tmp/boegelbot/ecpr-23603/software/GCCcore/10.3.0/lib64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/bin/ld.gold)

Ensure binutils gets loaded similar to the GCC sanity check step

Fixes #3891

When the system ld is used the sanity check step fails
> g++ minimal.cpp -o minimal_cpp $(llvm-config --link-static --system-libs all) failed with exit code 1 (output: /usr/bin/ld.gold: /tmp/boegelbot/ecpr-23603/software/GCCcore/10.3.0/lib64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/bin/ld.gold)

Ensure binutils gets loaded similar to the GCC sanity check step

Fixes easybuilders#3891
Copy link
Collaborator

@Thyre Thyre left a comment

Choose a reason for hiding this comment

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

Looks straight-forward and matches what we're doing in GCC.
Tested via easybuilders/easybuild-easyconfigs#23603, which failed for boegelbot previously.

Lets do one more test for safety

@Thyre
Copy link
Collaborator

Thyre commented Aug 27, 2025

@boegelbot please test @ jsc-zen3
EB_ARGS="LLVM-14.0.6-GCCcore-12.2.0-llvmlite.eb --installpath=/tmp/$USER/ebpr-3899"
CORE_CNT=16

@boegelbot
Copy link

@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=3899 EB_ARGS="LLVM-14.0.6-GCCcore-12.2.0-llvmlite.eb --installpath=/tmp/$USER/ebpr-3899" EB_CONTAINER= EB_REPO=easybuild-easyblocks EB_BRANCH=develop /opt/software/slurm/bin/sbatch --job-name test_PR_3899 --ntasks="16" ~/boegelbot/eb_from_pr_upload_jsc-zen3.sh' executed!

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

Test results coming soon (I hope)...

Details

- notification for comment with ID 3228331908 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

Test report by @boegelbot

Overview of tested easyconfigs (in order)

  • SUCCESS LLVM-14.0.6-GCCcore-12.2.0-llvmlite.eb

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

@boegel boegel changed the title Fix sanity check step of LLVM Fix sanity check step of LLVM by loading binutils as extra module Aug 27, 2025
Copy link
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

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

lgtm

@boegel boegel added the bug fix label Aug 27, 2025
@boegel boegel added this to the next release (5.1.2) milestone Aug 27, 2025
@boegel boegel merged commit e7eeb3d into easybuilders:develop Aug 27, 2025
17 checks passed
@Flamefire Flamefire deleted the llvm-sanity-check-fix branch August 27, 2025 15:03
@Crivella
Copy link
Contributor

Crivella commented Sep 1, 2025

I guess this would've been a problem only if we are not building lld
Not sure if we would want to add the binutils dep in checking only if lld is not being build.

In general we tell clang/flang to use LLD by default so if it does not work that would be a problem in of itself

@Flamefire
Copy link
Contributor Author

I guess this would've been a problem only if we are not building lld

Possible. We are not building lld by default.

In general we tell clang/flang to use LLD by default so if it does not work that would be a problem in of itself

The failing sanity check command is not Clang but GCC:

g++ minimal.cpp -o minimal_cpp $(llvm-config --link-static --system-libs all) failed with exit code 1 (output: /usr/bin/ld.gold: /tmp/boegelbot/ecpr-23603/software/GCCcore/10.3.0/lib64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/bin/ld.gold)

**

So I guess this is expected then, isn't it?

@Crivella
Copy link
Contributor

Crivella commented Sep 1, 2025

Right missed the g++ now I am wondering what was the reason we are using GCC instead of clang in the sanity check to check for the libs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Regression]: LLVM sanity check may fail due to system ld being used

5 participants