Skip to content

add patch to Autoconf 2.72 to ignore -target-feature flags when determining Fortran libraries#24669

Merged
jfgrimm merged 1 commit intoeasybuilders:developfrom
Thyre:20251124190619_new_pr_Autoconf272
Nov 25, 2025
Merged

add patch to Autoconf 2.72 to ignore -target-feature flags when determining Fortran libraries#24669
jfgrimm merged 1 commit intoeasybuilders:developfrom
Thyre:20251124190619_new_pr_Autoconf272

Conversation

@Thyre
Copy link
Copy Markdown
Collaborator

@Thyre Thyre commented Nov 24, 2025

(created using eb --new-pr)

See also: https://savannah.gnu.org/support/?111353


When building applications with LLVM/Clang, EasyBuild by default passes the flag -march=native to configure to later on create an optimized build for his machine.
Depending on the underlying system, this can lead to the following flag showing up in a verbose compiler output:

-target-feature -lwp

The Autoconf macro _AC_FC_LIBRARY_LDFLAGS detects the -lwp as a linker flag, and uses this one for further tests. Depending on the tests being done, this can either fail during configure itself, or later during the application build.

A build failure was e.g. discovered with ELPA where this flag was being found in the linker step:

ld.lld: error: unable to find library -lwp
clang: error: linker command failed with exit code 1 (use -v to see invocation)

To fix this ignore all flags being passed via '-target-feature', as these are CPU feature flags, and do not represent actual libraries being linked.


For completeness, this is how a verbose output of LLVM 20.1.8 looks when building with -march=native:

clang version 20.1.8
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/EasyBuild/apps/software/LLVM/20.1.8-GCCcore-14.3.0/bin
Configuration file: /opt/EasyBuild/apps/software/LLVM/20.1.8-GCCcore-14.3.0/bin/clang.cfg
Selected GCC installation: /opt/EasyBuild/apps/software/GCCcore/14.3.0/lib/gcc/x86_64-pc-linux-gnu/14.3.0
Candidate multilib: .;@m64
Selected multilib: .;@m64
"/opt/EasyBuild/apps/software/LLVM/20.1.8-GCCcore-14.3.0/bin/clang-20" -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -dumpdir a- -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name test.c -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu alderlake -target-feature +prfchw -target-feature -cldemote -target-feature +avx -target-feature +aes -target-feature +sahf -target-feature +pclmul -target-feature -xop -target-feature +crc32 -target-feature -amx-fp8 -target-feature +xsaves -target-feature -avx512fp16 -target-feature -usermsr -target-feature -sm4 -target-feature -egpr -target-feature +sse4.1 -target-feature -avx512ifma -target-feature +xsave -target-feature +sse4.2 -target-feature -tsxldtrk -target-feature -sm3 -target-feature +ptwrite -target-feature -widekl -target-feature -movrs -target-feature +invpcid -target-feature +64bit -target-feature +xsavec -target-feature -avx10.1-512 -target-feature -avx512vpopcntdq -target-feature +cmov -target-feature -avx512vp2intersect -target-feature -avx512cd -target-feature +movbe -target-feature -avxvnniint8 -target-feature -ccmp -target-feature -amx-int8 -target-feature -kl -target-feature -avx10.1-256 -target-feature -sha512 -target-feature +avxvnni -target-feature -rtm -target-feature +adx -target-feature +avx2 -target-feature +hreset -target-feature +movdiri -target-feature +serialize -target-feature +vpclmulqdq -target-feature -avx512vl -target-feature -uintr -target-feature -cf -target-feature +clflushopt -target-feature -raoint -target-feature -cmpccxadd -target-feature +bmi -target-feature -amx-tile -target-feature +sse -target-feature -avx10.2-256 -target-feature +gfni -target-feature -avxvnniint16 -target-feature -amx-fp16 -target-feature -zu -target-feature -ndd -target-feature +xsaveopt -target-feature +rdrnd -target-feature -avx512f -target-feature -amx-bf16 -target-feature -avx512bf16 -target-feature -avx512vnni -target-feature -push2pop2 -target-feature +cx8 -target-feature -avx512bw -target-feature +sse3 -target-feature +pku -target-feature -nf -target-feature -amx-tf32 -target-feature -amx-avx512 -target-feature +fsgsbase -target-feature -clzero -target-feature -mwaitx -target-feature -lwp -target-feature +lzcnt -target-feature +sha -target-feature +movdir64b -target-feature -ppx -target-feature -wbnoinvd -target-feature -enqcmd -target-feature -amx-transpose -target-feature -avx10.2-512 -target-feature -avxneconvert -target-feature -tbm -target-feature -pconfig -target-feature -amx-complex -target-feature +ssse3 -target-feature +cx16 -target-feature +bmi2 -target-feature +fma -target-feature +popcnt -target-feature -avxifma -target-feature +f16c -target-feature -avx512bitalg -target-feature -rdpru -target-feature +clwb -target-feature +mmx -target-feature +sse2 -target-feature +rdseed -target-feature -avx512vbmi2 -target-feature -prefetchi -target-feature -amx-movrs -target-feature +rdpid -target-feature -fma4 -target-feature -avx512vbmi -target-feature +shstk -target-feature +vaes -target-feature +waitpkg -target-feature -sgx -target-feature +fxsr -target-feature -avx512dq -target-feature -sse4a -debugger-tuning=gdb [...] -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fcolor-diagnostics -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/test-9d970f.o -x c test.c
[...]
End of search list.
 "/opt/EasyBuild/apps/software/LLVM/20.1.8-GCCcore-14.3.0/bin/ld.lld" -z relro --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -pie -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o a.out /lib/x86_64-linux-gnu/Scrt1.o /lib/x86_64-linux-gnu/crti.o /opt/EasyBuild/apps/software/GCCcore/14.3.0/lib/gcc/x86_64-pc-linux-gnu/14.3.0/crtbeginS.o [...] -L. -L. /tmp/test-9d970f.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /opt/EasyBuild/apps/software/GCCcore/14.3.0/lib/gcc/x86_64-pc-linux-gnu/14.3.0/crtendS.o /lib/x86_64-linux-gnu/crtn.o

@Thyre
Copy link
Copy Markdown
Collaborator Author

Thyre commented Nov 24, 2025

Test report by @Thyre
SUCCESS
Build succeeded for 1 out of 1 (total: 4 secs) (1 easyconfigs in total)
Linux - Linux Arch Linux UNKNOWN, x86_64, AMD Ryzen 7 7800X3D 8-Core Processor (zen4), 1 x AMD Navi 48 [Radeon RX 9070/9070 XT/9070 GRE] (device id: 0x7550, gfx: gfx1201, driver: Linuxversion6.17.8-arch1-1(linux@archlinux)(gcc(GCC)15.2.120251112,GNUld(GNUBinutils)2.45.1)#1SMPPREEMPT_DYNAMICFri,14Nov202506:54:20+0000), 1 x AMD Raphael (device id: 0x164e, gfx: gfx1036, driver: Linuxversion6.17.8-arch1-1(linux@archlinux)(gcc(GCC)15.2.120251112,GNUld(GNUBinutils)2.45.1)#1SMPPREEMPT_DYNAMICFri,14Nov202506:54:20+0000), Python 3.13.7
See https://gist.github.com/Thyre/54e7b863b98268aaae635accdb234034 for a full test report.

@Thyre
Copy link
Copy Markdown
Collaborator Author

Thyre commented Nov 24, 2025

Test of ELPA with this change: easybuilders/easybuild-easyblocks#3759 (comment)

See #24516 (comment) for why we need this patch in the first place.

@Thyre
Copy link
Copy Markdown
Collaborator Author

Thyre commented Nov 25, 2025

@boegelbot please test @ jsc-zen3
EB_ARGS="--installpath=/tmp/$USER/ecpr-24669"

@boegelbot
Copy link
Copy Markdown
Collaborator

@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=24669 EB_ARGS="--installpath=/tmp/$USER/ecpr-24669" EB_CONTAINER= EB_REPO=easybuild-easyconfigs EB_BRANCH=develop /opt/software/slurm/bin/sbatch --job-name test_PR_24669 --ntasks=8 ~/boegelbot/eb_from_pr_upload_jsc-zen3.sh' executed!

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

Test results coming soon (I hope)...

Details

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

Test report by @boegelbot
SUCCESS
Build succeeded for 1 out of 1 (total: 32 secs) (1 easyconfigs in total)
jsczen3c1.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/6554d2ab62c41e3fa9fdd87d98945aea for a full test report.

@jfgrimm
Copy link
Copy Markdown
Member

jfgrimm commented Nov 25, 2025

Test report by @jfgrimm
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in total)
node092.viking2.yor.alces.network - Linux Rocky Linux 8.10, x86_64, AMD EPYC 7643 48-Core Processor, Python 3.6.8
See https://gist.github.com/jfgrimm/e2407c2fb2eb9be0c9a0fc1866e107bb for a full test report.

@jfgrimm jfgrimm added this to the next release (5.2.0?) milestone Nov 25, 2025
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 Nov 25, 2025

Going in, thanks @Thyre!

@jfgrimm jfgrimm merged commit 8a44b77 into easybuilders:develop Nov 25, 2025
8 checks passed
@jfgrimm
Copy link
Copy Markdown
Member

jfgrimm commented Nov 25, 2025

@boegelbot please test @ jsc-zen3

@boegelbot
Copy link
Copy Markdown
Collaborator

@jfgrimm: 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=24669 EB_ARGS= EB_CONTAINER= EB_REPO=easybuild-easyconfigs EB_BRANCH=develop /opt/software/slurm/bin/sbatch --job-name test_PR_24669 --ntasks=8 ~/boegelbot/eb_from_pr_upload_jsc-zen3.sh' executed!

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

Test results coming soon (I hope)...

Details

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

Test report by @boegelbot
SUCCESS
Build succeeded for 1 out of 1 (total: 32 secs) (1 easyconfigs in total)
jsczen3c1.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/6c30e2299eec0f04252ae10adb1b74e6 for a full test report.

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

Labels

2025b issues & PRs related to 2025b common toolchains bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants