Bug 281557 - net/mpich: fix build with clang 19 on i386
Summary: net/mpich: fix build with clang 19 on i386
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks: 280562
  Show dependency treegraph
 
Reported: 2024-09-17 20:29 UTC by Dimitry Andric
Modified: 2024-09-18 07:38 UTC (History)
1 user (show)

See Also:
laurent.chardon: maintainer-feedback+


Attachments
net/mpich: fix build with clang 19 on i386 (2.11 KB, patch)
2024-09-17 20:31 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2024-09-17 20:29:49 UTC
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.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2024-09-17 20:31:16 UTC
Created attachment 253631 [details]
net/mpich: fix build with clang 19 on i386
Comment 2 Laurent Chardon 2024-09-18 06:47:03 UTC
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.
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-09-18 07:26:43 UTC
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(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-09-18 07:29:45 UTC
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(-)
Comment 5 Dimitry Andric freebsd_committer freebsd_triage 2024-09-18 07:38:00 UTC
Maybe at some point, compiler-rt might grow support for float128 on i386, but I would not hold my breath. :)