@@This is an auto-filed bug@@ Feel free to change the summary at your convenience. Issue: sys-cluster/openmpi fails to compile. Discovered on: amd64 NOTE: This machine uses a clang/LLVM toolchain. If you think that this issue is strictly related to clang/LLVM please mention it in the summary and block bug 408963. If you need further logs, feel free to ask.
Created attachment 647272 [details] build.log build log and emerge --info
Created attachment 647274 [details] other.tar.bz2 other logs
surely gfortran is not about clang, I do not know why it was not double checked before being filled.
(In reply to Mikle Kolyada from comment #3) > surely gfortran is not about clang, I do not know why it was not double > checked before being filled. I really do not understand what you mean but this is the exact error: configure:45160: x86_64-pc-linux-gnu-gfortran -O2 -pipe -march=native -frecord-gcc-switches -fno-diagnostics-color conftestf.f90 conftest.o -o conftest -Wl,-O1 -Wl,--as-needed -fuse-ld=lld -Wl,--defsym=__gentoo_check_ldflags__=0 -lz ld.lld: error: can't create dynamic relocation R_X86_64_32 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output >>> defined in conftest.o >>> referenced by conftest.c >>> conftest.o:(size_) ld.lld: error: can't create dynamic relocation R_X86_64_32 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output >>> defined in conftest.o >>> referenced by conftest.c >>> conftest.o:(size_) ld.lld: error: can't create dynamic relocation R_X86_64_32 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output >>> defined in conftest.o >>> referenced by conftest.c >>> conftest.o:(size_) collect2: error: ld returned 1 exit status configure:45167: $? = 1 configure:45188: here is the Fortran program: program fsize external size CHARACTER :: x(2) call size(x(1),x(2)) end program
Another problem seen in build log: checking for C ident string support... /var/tmp/portage/sys-cluster/openmpi-4.0.3/work/openmpi-4.0.3/configure: line 20477: strings: command not found /var/tmp/portage/sys-cluster/openmpi-4.0.3/work/openmpi-4.0.3/configure: line 20520: strings: command not found /var/tmp/portage/sys-cluster/openmpi-4.0.3/work/openmpi-4.0.3/configure: line 20563: strings: command not found ${STRINGS} should be respected.
Error "checking size of Fortran CHARACTER... configure: WARNING: Could not determine size of CHARACTER" can be reproduced by using Clang as C compiler and GFortran as Fortran compiler: CC="x86_64-pc-linux-gnu-clang" FC="x86_64-pc-linux-gnu-gfortran" Value of CXX is not relevant here. Linker (BFD, GOLD, LLD) is not relevant here. Result with linker BFD: configure:45036: checking size of Fortran CHARACTER configure:45143: x86_64-pc-linux-gnu-clang -DNDEBUG -march=native -O2 -pipe -finline-functions -fno-strict-aliasing -I. -c conftest.c configure:45150: $? = 0 configure:45160: x86_64-pc-linux-gnu-gfortran -march=westmere -O2 -fno-ident -frecord-gcc-switches -fstack-clash-protection -fstack-protector-all -mfunction-return=thunk -mindirect-branch=thunk -mindirect-branch-register -pipe -Wall conftestf.f90 conftest.o -o conftest -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,--gc-sections -Wl,--sort-common -Wl,-z,now -lz /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: conftest.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE collect2: error: ld returned 1 exit status configure:45167: $? = 1 configure:45188: here is the Fortran program: program fsize external size CHARACTER :: x(2) call size(x(1),x(2)) end program configure:45158: WARNING: Could not determine size of CHARACTER configure:45160: WARNING: See config.log for details configure:45162: error: Cannot continue It is probably some incompatibility between GCC (GFortran) and Clang. I think that it may be acceptable for ebuild to check C compiler and Fortran compiler and call die() in case of mismatch. Version 11.0 of LLVM group of packages will include Fortran compiler called Flang. Maybe Clang as C compiler + Flang as Fortran compiler will work...
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #5) > Another problem seen in build log: > > checking for C ident string support... > /var/tmp/portage/sys-cluster/openmpi-4.0.3/work/openmpi-4.0.3/configure: > line 20477: strings: command not found > /var/tmp/portage/sys-cluster/openmpi-4.0.3/work/openmpi-4.0.3/configure: > line 20520: strings: command not found > /var/tmp/portage/sys-cluster/openmpi-4.0.3/work/openmpi-4.0.3/configure: > line 20563: strings: command not found > > ${STRINGS} should be respected. As long as there is no qa agreement about what should be repsepcted and what should not I simply refuse and ignore strings, I have already explained why before (in 99% of cases it does not affect cross compilation).
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #6) > Error "checking size of Fortran CHARACTER... configure: WARNING: Could not > determine size of CHARACTER" can be reproduced by using Clang as C compiler > and GFortran as Fortran compiler: > CC="x86_64-pc-linux-gnu-clang" > FC="x86_64-pc-linux-gnu-gfortran" > > Value of CXX is not relevant here. > Linker (BFD, GOLD, LLD) is not relevant here. > > > Result with linker BFD: > > configure:45036: checking size of Fortran CHARACTER > configure:45143: x86_64-pc-linux-gnu-clang -DNDEBUG -march=native -O2 -pipe > -finline-functions -fno-strict-aliasing -I. -c conftest.c > configure:45150: $? = 0 > configure:45160: x86_64-pc-linux-gnu-gfortran -march=westmere -O2 -fno-ident > -frecord-gcc-switches -fstack-clash-protection -fstack-protector-all > -mfunction-return=thunk -mindirect-branch=thunk -mindirect-branch-register > -pipe -Wall conftestf.f90 conftest.o -o conftest -Wl,-O1 -Wl,--as-needed > -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,--gc-sections -Wl,--sort-common > -Wl,-z,now -lz > /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ > ld: conftest.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be > used when making a PIE object; recompile with -fPIE > collect2: error: ld returned 1 exit status > configure:45167: $? = 1 > configure:45188: here is the Fortran program: > program fsize > > external size > CHARACTER :: x(2) > call size(x(1),x(2)) > end program > configure:45158: WARNING: Could not determine size of CHARACTER > configure:45160: WARNING: See config.log for details > configure:45162: error: Cannot continue > > > It is probably some incompatibility between GCC (GFortran) and Clang. > I think that it may be acceptable for ebuild to check C compiler and Fortran > compiler and call die() in case of mismatch. > > > Version 11.0 of LLVM group of packages will include Fortran compiler called > Flang. > Maybe Clang as C compiler + Flang as Fortran compiler will work... That is the point, I do not know why this bug was filed at all, I mean it was filled blindly. So far I only have 3 options: 1.) close it as invalid (as it is invalid per se) 2.) wait for flang^W llvm11 and try again 3.) simply die on tc-is-clang && firtran Also I am afraid proper flang support will never be added into old (3.x) and legacy (1.x and 2.x) openmpi mainline, so the bug is goint to be invalid at some point.