easybuilders / easybuild-easyblocks

Collection of easyblocks that implement support for building and installing software with EasyBuild.
https://easybuild.io
GNU General Public License v2.0
104 stars 284 forks source link

GCC fails post-install step when build without fortran #3316

Open bertwesarg opened 5 months ago

bertwesarg commented 5 months ago

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++
boegel commented 4 months ago

@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?

bertwesarg commented 4 months ago

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.