easybuild-easyblocks icon indicating copy to clipboard operation
easybuild-easyblocks copied to clipboard

GCC fails post-install step when build without fortran

Open bertwesarg opened this issue 1 year ago • 2 comments

Building (any) GCC EB without fortran (--try-amend=languages=c,c++) fails the post-install step because it unconditionally try to create an f77 symlink to gfortran, which does not exist.

== 2024-05-02 14:56:48,215 build_log.py:171 ERROR EasyBuild crashed with an error (at easybuild/software/EasyBuild/4.9.1/lib/python3.11/site-packages/easybuild/tools/build_log.py:111 in caller_info): Build of /tmp/eb-w9i60165/tweaked_easyconfigs/GCCcore-13.2.0.eb failed (err: "build failed (first 300 chars): Can't link '/home/build/.local/easybuild/software/GCCcore/13.2.0/bin/f77' to non-existing location /home/build/.local/easybuild/software/GCCcore/13.2.0/bin/gfortran") (at easybuild/software/EasyBuild/4.9.1/lib/python3.11/site-packages/easybuild/main.py:176 in build_and_install_software)
ERROR: Build of /tmp/eb-w9i60165/tweaked_easyconfigs/GCCcore-13.2.0.eb failed (err: "build failed (first 300 chars): Can't link '/home/build/.local/easybuild/software/GCCcore/13.2.0/bin/f77' to non-existing location /home/build/.local/easybuild/software/GCCcore/13.2.0/bin/gfortran")
$ eb GCCcore-13.2.0.eb -l --robot --try-amend=languages=c,c++

bertwesarg avatar May 02 '24 13:05 bertwesarg

@bertwesarg Thanks for the bug report!

This doesn't surprise me, since I think it's rare that GCC is being built without Fortran in the EasyBuild community, but it should be easy enough to allow for that by making the symlinking conditional.

Are you willing to look into a creating a pull request to fix this yourself?

Also, out of curiosity, what's your use case for a GCC without gfortran?

boegel avatar May 22 '24 07:05 boegel

Also, out of curiosity, what's your use case for a GCC without gfortran?

We are using EB to build our CI env in Docker, bare metal, and QEMU/KVM on different architectures for a C/C++ project, and because of the latter reducing what is build saves a bunch of time.

bertwesarg avatar May 22 '24 09:05 bertwesarg