Bug 282827 - math/libdivide: fix build with clang 19
Summary: math/libdivide: fix build with clang 19
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: Dimitry Andric
URL:
Keywords:
Depends on:
Blocks: 280562
  Show dependency treegraph
 
Reported: 2024-11-18 08:56 UTC by Dimitry Andric
Modified: 2024-11-18 22:53 UTC (History)
0 users

See Also:
thierry: maintainer-feedback+


Attachments
math/libdivide: fix build with clang 19 (2.27 KB, patch)
2024-11-18 09:01 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-11-18 08:56:13 UTC
Clang 19 has become more strict about errors in member functions, which
results in errors building math/libdivide:

  /wrkdirs/usr/ports/math/libdivide/work/libdivide-5.0/libdivide.h:3020:41: error: no member named 'denom' in 'divider<T, ALGO>'
   3020 |         return div.denom.magic == other.denom.magic && div.denom.more == other.denom.more;
        |                                   ~~~~~ ^
  /wrkdirs/usr/ports/math/libdivide/work/libdivide-5.0/libdivide.h:3020:80: error: no member named 'denom' in 'divider<T, ALGO>'
   3020 |         return div.denom.magic == other.denom.magic && div.denom.more == other.denom.more;
        |                                                                          ~~~~~ ^

The member function `operator==()` should refer to `other.div.denom`
instead. Upstream fixed this in
https://github.com/ridiculousfish/libdivide/commit/fa020f3, so import it
as a patch.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2024-11-18 09:01:08 UTC
Created attachment 255254 [details]
math/libdivide: fix build with clang 19
Comment 2 Thierry Thomas freebsd_committer freebsd_triage 2024-11-18 11:13:59 UTC
Approved, thanks!
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-11-18 22:52:49 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=822b0e7aebed327a924dc812b43c7cce2b19f7ea

commit 822b0e7aebed327a924dc812b43c7cce2b19f7ea
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-11-18 08:57:47 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-11-18 22:51:34 +0000

    math/libdivide: fix build with clang 19

    Clang 19 has become more strict about errors in member functions, which
    results in errors building math/libdivide:

      /wrkdirs/usr/ports/math/libdivide/work/libdivide-5.0/libdivide.h:3020:41: error: no member named 'denom' in 'divider<T, ALGO>'
       3020 |         return div.denom.magic == other.denom.magic && div.denom.more == other.denom.more;
            |                                   ~~~~~ ^
      /wrkdirs/usr/ports/math/libdivide/work/libdivide-5.0/libdivide.h:3020:80: error: no member named 'denom' in 'divider<T, ALGO>'
       3020 |         return div.denom.magic == other.denom.magic && div.denom.more == other.denom.more;
            |                                                                          ~~~~~ ^

    The member function `operator==()` should refer to `other.div.denom`
    instead. Upstream fixed this in
    https://github.com/ridiculousfish/libdivide/commit/fa020f3, so import it
    as a patch.

    PR:             282827
    Approved by:    thierry (maintainer)
    MFH:            2024Q4

 math/libdivide/Makefile | 3 +++
 math/libdivide/distinfo | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-11-18 22:52:49 UTC
A commit in branch 2024Q4 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2216ea39e937ac6066e2ca788bd477193e05ab47

commit 2216ea39e937ac6066e2ca788bd477193e05ab47
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-11-18 08:57:47 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-11-18 22:52:33 +0000

    math/libdivide: fix build with clang 19

    Clang 19 has become more strict about errors in member functions, which
    results in errors building math/libdivide:

      /wrkdirs/usr/ports/math/libdivide/work/libdivide-5.0/libdivide.h:3020:41: error: no member named 'denom' in 'divider<T, ALGO>'
       3020 |         return div.denom.magic == other.denom.magic && div.denom.more == other.denom.more;
            |                                   ~~~~~ ^
      /wrkdirs/usr/ports/math/libdivide/work/libdivide-5.0/libdivide.h:3020:80: error: no member named 'denom' in 'divider<T, ALGO>'
       3020 |         return div.denom.magic == other.denom.magic && div.denom.more == other.denom.more;
            |                                                                          ~~~~~ ^

    The member function `operator==()` should refer to `other.div.denom`
    instead. Upstream fixed this in
    https://github.com/ridiculousfish/libdivide/commit/fa020f3, so import it
    as a patch.

    PR:             282827
    Approved by:    thierry (maintainer)
    MFH:            2024Q4

    (cherry picked from commit 822b0e7aebed327a924dc812b43c7cce2b19f7ea)

 math/libdivide/Makefile | 3 +++
 math/libdivide/distinfo | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)