In bug 276035 this was already handled once, but with clang 19 on i386 we get similar link errors: ld: error: undefined reference: __addtf3 >>> referenced by lib/.libs/libmpi.so (disallowed by --no-allow-shlib-undefined) ld: error: undefined reference: __gttf2 >>> referenced by lib/.libs/libmpi.so (disallowed by --no-allow-shlib-undefined) ld: error: undefined reference: __lttf2 >>> referenced by lib/.libs/libmpi.so (disallowed by --no-allow-shlib-undefined) ld: error: undefined reference: __multf3 >>> referenced by lib/.libs/libmpi.so (disallowed by --no-allow-shlib-undefined) ld: error: undefined reference: __extendxftf2 >>> referenced by lib/.libs/libmpi.so (disallowed by --no-allow-shlib-undefined) ld: error: undefined reference: __trunctfxf2 >>> referenced by lib/.libs/libmpi.so (disallowed by --no-allow-shlib-undefined) Again the cause is that the mpich configure script detects partial float128 support on i386 (i.e. the compile doesn't immediately choke on defining variables of that type). It then enables HAVE_FLOAT128, which leads to the above errors, because compiler-rt does not support float128 on i386.
Created attachment 253631 [details] net/mpich: fix build with clang 19 on i386
Good patch. I had initially hesitated between ${COMPILER_VERSION} == 181 and ${COMPILER_VERSION} >= 181 and decided to go with == in order to remove this condition once the compiler supports float128 on i386. But I prefer to have one >= test rather than add a new == test every time there is a new version of clang that doesn't add the support for float128 on i386. I'll test manually when I package new mpich upgrades.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=9d5e42894b39c428c6241efb1a053f7e571a6fee commit 9d5e42894b39c428c6241efb1a053f7e571a6fee Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2024-09-17 20:30:17 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2024-09-18 07:24:55 +0000 net/mpich: fix build with clang 19 on i386 In bug 276035 this was already handled once, but with clang 19 on i386 we get similar link errors: ld: error: undefined reference: __addtf3 >>> referenced by lib/.libs/libmpi.so (disallowed by --no-allow-shlib-undefined) ld: error: undefined reference: __gttf2 >>> referenced by lib/.libs/libmpi.so (disallowed by --no-allow-shlib-undefined) ld: error: undefined reference: __lttf2 >>> referenced by lib/.libs/libmpi.so (disallowed by --no-allow-shlib-undefined) ld: error: undefined reference: __multf3 >>> referenced by lib/.libs/libmpi.so (disallowed by --no-allow-shlib-undefined) ld: error: undefined reference: __extendxftf2 >>> referenced by lib/.libs/libmpi.so (disallowed by --no-allow-shlib-undefined) ld: error: undefined reference: __trunctfxf2 >>> referenced by lib/.libs/libmpi.so (disallowed by --no-allow-shlib-undefined) Again the cause is that the mpich configure script detects partial float128 support on i386 (i.e. the compile doesn't immediately choke on defining variables of that type). It then enables HAVE_FLOAT128, which leads to the above errors, because compiler-rt does not support float128 on i386. PR: 281557 Approved by: laurent.chardon@gmail.com (maintainer) MFH: 2024Q3 net/mpich/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
A commit in branch 2024Q3 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=9c4f1fcbf3fe4f6642b19a250a1cf4d47aa754da commit 9c4f1fcbf3fe4f6642b19a250a1cf4d47aa754da Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2024-09-17 20:30:17 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2024-09-18 07:28:09 +0000 net/mpich: fix build with clang 19 on i386 In bug 276035 this was already handled once, but with clang 19 on i386 we get similar link errors: ld: error: undefined reference: __addtf3 >>> referenced by lib/.libs/libmpi.so (disallowed by --no-allow-shlib-undefined) ld: error: undefined reference: __gttf2 >>> referenced by lib/.libs/libmpi.so (disallowed by --no-allow-shlib-undefined) ld: error: undefined reference: __lttf2 >>> referenced by lib/.libs/libmpi.so (disallowed by --no-allow-shlib-undefined) ld: error: undefined reference: __multf3 >>> referenced by lib/.libs/libmpi.so (disallowed by --no-allow-shlib-undefined) ld: error: undefined reference: __extendxftf2 >>> referenced by lib/.libs/libmpi.so (disallowed by --no-allow-shlib-undefined) ld: error: undefined reference: __trunctfxf2 >>> referenced by lib/.libs/libmpi.so (disallowed by --no-allow-shlib-undefined) Again the cause is that the mpich configure script detects partial float128 support on i386 (i.e. the compile doesn't immediately choke on defining variables of that type). It then enables HAVE_FLOAT128, which leads to the above errors, because compiler-rt does not support float128 on i386. PR: 281557 Approved by: laurent.chardon@gmail.com (maintainer) MFH: 2024Q3 (cherry picked from commit 9d5e42894b39c428c6241efb1a053f7e571a6fee) net/mpich/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Maybe at some point, compiler-rt might grow support for float128 on i386, but I would not hold my breath. :)