https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118796
--- Comment #2 from Sam James <sjames at gcc dot gnu.org> --- ``` mkdir /tmp/fortran && cd /tmp/fortran # Unfortunately, we have to install at least one library, so we do it in /tmp/fortran/prefix to keep it off the real system. mkdir /tmp/fortran/prefix git clone https://github.com/ecmwf/ecbuild export PATH="/tmp/fortran/ecbuild:${PATH}" git clone https://github.com/ecmwf/eckit cmake -B build -S . -DCMAKE_INSTALL_PREFIX=/tmp/fortran/prefix make -C build -j$(nproc) -l$(nproc) make -C build -j$(nproc) -l$(nproc) install cd /tmp/fortran git clone https://github.com/ecmwf/fckit # This will fail because of PR118789. Workaround is to use gfortran-14, like: # FC=gfortran-14 CC=gcc-14 CXX=g++-14 FFLAGS="-O2" CFLAGS="-O2" CXXFLAGS="-O2" cmake -B build -S . -DCMAKE_INSTALL_PREFIX=/tmp/fortran/prefix FFLAGS="-O2" CFLAGS="-O2" CXXFLAGS="-O2" cmake -B build -S . -DCMAKE_INSTALL_PREFIX=/tmp/fortran/prefix make -C build -j$(nproc) -l$(nproc) make -C build -j$(nproc) -l$(nproc) install cd /tmp/fortran git clone https://github.com/ecmwf/atlas cd atlas # If this fails, you can try disable more arguments. The critical part is Fortran but I didn't try disable more. cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DBUILD_SITE=debian -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON "-GUnix Makefiles" -DECBUILD_LOG_LEVEL=DEBUG -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu -DENABLE_DOCS=On -DENABLE_CXX17=On -DENABLE_CLANG_TIDY=Off -DENABLE_GRIDTOOLS_STORAGE=Off -DENABLE_TESSELATION=On -DENABLE_CGAL=On -DENABLE_ECTRANS=On -DENABLE_OMP=On -DENABLE_FORTRAN=On -Datlas_FULL_INSTALL_CMAKE_DIR=/usr/lib/x86_64-linux-gnu/cmake/atlas_ecmwf -DENABLE_INIT_SNAN=On -DENABLE_PROJ=On -DENABLE_ACC=On -DENABLE_ECKIT_CODEC=On -DCMAKE_HIP_ARCHITECTURES=gfx803\;gfx900\;gfx906\;gfx908\;gfx90a\;gfx1010\;gfx1030\;gfx1100\;gfx1101\;gfx1102 -B build -Deckit_ROOT=/tmp/fortran/prefix -Dfckit_ROOT=/tmp/fortran/prefix -DENABLE_ECTRANS=OFF -DENABLE_TESSELATION=OFF -DENABLE_CGAL=OFF -DENABLE_PROJ=OFF # The CMake-generated Makefiles accept 'VERBOSE=1' to see the build commands for extraction make -C build -j$(nproc) -l$(nproc) VERBOSE=1 make -C build -j$(nproc) -l$(nproc) install ``` To get the mod files etc, I look in the build dir for .mod and then delete it and the depend files and run make again to capture the right commands, but you can just keep the full log from make instead for the full build if you want and grep that.