Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 908798 - sci-libs/lapack-3.11: fails in configuration stage with clang-16
Summary: sci-libs/lapack-3.11: fails in configuration stage with clang-16
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-18 18:19 UTC by Brahmajit Das
Modified: 2024-06-27 23:50 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (build.log,6.86 KB, text/plain)
2023-06-18 18:21 UTC, Brahmajit Das
Details
emerge --info (emerge.txt,7.25 KB, text/plain)
2023-06-18 18:22 UTC, Brahmajit Das
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brahmajit Das 2023-06-18 18:19:03 UTC
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
...
Comment 1 Brahmajit Das 2023-06-18 18:21:19 UTC
Created attachment 864157 [details]
build log
Comment 2 Brahmajit Das 2023-06-18 18:22:52 UTC
Created attachment 864158 [details]
emerge --info
Comment 3 Brahmajit Das 2023-07-11 15:09:00 UTC
Also reproducible on clang-15 with the exact same failure.
Comment 4 Brahmajit Das 2023-07-11 15:27:16 UTC
note: removing -rtlib=compiler-rt makes it work with clang-15
Comment 5 Brahmajit Das 2023-07-11 15:35:19 UTC
note: removing -rtlib=compiler-rt also works for clang-16
Comment 6 ppw0 2023-07-17 04:04:25 UTC
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.
Comment 7 Larry the Git Cow gentoo-dev 2023-08-24 23:15:16 UTC
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(-)