Summary: | sys-cluster/openmpi-4.1.4-r1: unable to compile with LTO (checking external symbol convention... configure: error: unknown naming convention: ) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Arniii <lg3dx6fd> |
Component: | Current packages | Assignee: | Gentoo Cluster Team <cluster> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | eschwartz |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 618550 | ||
Attachments: |
configuration log with the error
emerge --info openmpi emerge's build log my /etc/portage/make.conf . Add here that it's on clang profile. |
Created attachment 868756 [details]
emerge --info openmpi
Created attachment 868757 [details]
emerge's build log
Created attachment 868758 [details]
my /etc/portage/make.conf . Add here that it's on clang profile.
configure:44496: checking to see if Fortran compilers need additional linker flags configure:44617: result: none configure:44672: checking external symbol convention configure:44729: x86_64-pc-linux-gnu-gfortran -O3 -pipe -march=skylake -mabm --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=6144 -g3 -ggdb -flto=4 -c conftest.f -Wl,-O1 -Wl,--as-needed -Wl,--as-needed -lz configure:44736: $? = 0 Could not determine Fortran naming convention. Output from llvm-nm: 0000000000000001 C __gnu_lto_slim 0000000000000000 W conftest.f.100c6f4c configure:44775: result: configure:44793: error: unknown naming convention: Does it work without LTO? (In reply to Sam James from comment #4) > configure:44496: checking to see if Fortran compilers need additional linker > flags > configure:44617: result: none > configure:44672: checking external symbol convention > configure:44729: x86_64-pc-linux-gnu-gfortran -O3 -pipe -march=skylake -mabm > --param=l1-cache-line-size=64 --param=l1-cache-size=32 > --param=l2-cache-size=6144 -g3 -ggdb -flto=4 -c conftest.f -Wl,-O1 > -Wl,--as-needed -Wl,--as-needed -lz > configure:44736: $? = 0 > Could not determine Fortran naming convention. Output from llvm-nm: > 0000000000000001 C __gnu_lto_slim > 0000000000000000 W conftest.f.100c6f4c > configure:44775: result: > configure:44793: error: unknown naming convention: > > > Does it work without LTO? I've tried without LTO, yep, it steps through the point further. So yes, llvm-nm cannot understand gfortran lto symbols. It is more generally broken: configure:44049: checking if C and Fortran are link compatible configure:44097: x86_64-pc-linux-gnu-gcc -c -DNDEBUG -pipe -march=native -fstack-protector-all -O2 -fdiagnostics-color=always -frecord-gcc-switches -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wformat -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Werror=int-conversion -Werror=incompatible-pointer-types -finline-functions -fno-strict-aliasing conftest_c.c configure:44104: $? = 0 configure:44125: x86_64-pc-linux-gnu-gfortran -o conftest -pipe -march=native -fstack-protector-all -O2 -fdiagnostics-color=always -frecord-gcc-switches -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wl,--defsym=__gentoo_check_ldflags__=0 conftest.f90 conftest_c.o -lz >&5 conftest.f90:4:23: error: type of 'testfunc' does not match original declaration [-Werror=lto-type-mismatch] 4 | call testfunc(1) | ^ conftest_c.c:2:5: note: return value type mismatch 2 | int testfunc_(int a) { return a; } | ^ conftest_c.c:2:5: note: type 'int' should match type 'void' conftest_c.c:2:5: note: 'testfunc_' was previously declared here lto1: some warnings being treated as errors lto-wrapper: fatal error: x86_64-pc-linux-gnu-gfortran returned 1 exit status compilation terminated. /usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../x86_64-pc-linux-gnu/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status configure:44125: $? = 1 configure: failed program was: | program main | | external testfunc | call testfunc(1) | | end configure:44151: result: no configure:44176: error: C and Fortran compilers are not link compatible. Can not continue. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c0b7168dd3315736ebe69575a88a8176bd3bec0 commit 0c0b7168dd3315736ebe69575a88a8176bd3bec0 Author: Eli Schwartz <eschwartz93@gmail.com> AuthorDate: 2024-05-31 19:32:49 +0000 Commit: Eli Schwartz <eschwartz@gentoo.org> CommitDate: 2024-07-12 05:01:50 +0000 sys-cluster/openmpi: mark as LTO-unsafe, strict-aliasing unsafe Closes: https://bugs.gentoo.org/913040 Signed-off-by: Eli Schwartz <eschwartz@gentoo.org> sys-cluster/openmpi/openmpi-4.1.6.ebuild | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) |
Created attachment 868755 [details] configuration log with the error Firstly, was problem that gfortran don't understand -rtlib=compiler-rt . That's solved by sam_ . Thanks to you. And then I got to another problem: it uses at configuring demangler. IDK why. So, it tries to use llvm-nm at gfortran's lto files and it gets error.