Issue: sci-libs/lapack-3.11: fails in configuration stage with clang-16 Discovered on: ~amd64 Reproducible: Always Steps to Reproduce: 1. Get any profile with clang:16 as the main compiler (I've tested on no-multilib and musl-llvm) 2. emerge -a \=sci-libs/lapack-3.11 Actual Results: Emerge fails with: ... CMake Error at /usr/share/cmake/Modules/CMakeTestFortranCompiler.cmake:59 (message): The Fortran compiler "/usr/bin/x86_64-pc-linux-gnu-gfortran" is not able to compile a simple test program. It fails with the following output: Change Dir: /var/tmp/portage/sci-libs/lapack-3.11/work/lapack-3.11_build/CMakeFiles/CMakeScratch/TryCompile-kuUwzx ...
Created attachment 864157 [details] build log
Created attachment 864158 [details] emerge --info
Also reproducible on clang-15 with the exact same failure.
note: removing -rtlib=compiler-rt makes it work with clang-15
note: removing -rtlib=compiler-rt also works for clang-16
Same problem (and workaround) on clang-16.0.6[default-libcxx] with - sci-libs/arpack-3.8.0, - sci-libs/lapack-3.11, - sci-libs/qrupdate-1.1.2-r2, - sci-mathematics/octave-8.1.0. I needed to filter out the "-rtlib=compiler-rt" flag to prevent it from being passed to gfortran.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e5c9d5c524871f5af260557dbd2962b8eec5087 commit 5e5c9d5c524871f5af260557dbd2962b8eec5087 Author: Sam James <sam@gentoo.org> AuthorDate: 2023-08-24 23:13:08 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-08-24 23:13:08 +0000 profiles/features/llvm: drop problematic LDFLAGS clang-common already handles setting these for us, and if we set it in profiles, then it gets passed down to gcc via clang for things like Fortran where clang is just acting as the driver. Closes: https://bugs.gentoo.org/908798 Signed-off-by: Sam James <sam@gentoo.org> profiles/features/llvm/make.defaults | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3ab8231602c8af892facac582b5770f3834c21f commit a3ab8231602c8af892facac582b5770f3834c21f Author: Sam James <sam@gentoo.org> AuthorDate: 2023-08-24 23:14:13 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-08-24 23:14:13 +0000 sci-libs/lapack: use fortran-2.eclass Not strictly related to bug #908798 but noticed while looking at it. Bug: https://bugs.gentoo.org/908798 Signed-off-by: Sam James <sam@gentoo.org> sci-libs/lapack/lapack-3.10.1.ebuild | 2 +- sci-libs/lapack/lapack-3.11.ebuild | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)