Bug 281512 - math/z3: fix build with clang 19
Summary: math/z3: 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: Gleb Popov
URL:
Keywords:
Depends on:
Blocks: 280562
  Show dependency treegraph
 
Reported: 2024-09-15 07:15 UTC by Dimitry Andric
Modified: 2024-09-15 12:09 UTC (History)
0 users

See Also:
arrowd: maintainer-feedback+


Attachments
math/z3: fix build with clang 19 (6.16 KB, patch)
2024-09-15 07:16 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-15 07:15:22 UTC
Clang 19 has become more strict about errors in member functions, which
results in:

  /wrkdirs/usr/ports/math/z3/work/z3-z3-4.13.0/src/math/lp/static_matrix.h:82:72: error: no member named 'get' in 'static_matrix<T, X>'; did you mean 'set'?
     82 |         ref operator=(ref & v) { m_matrix.set(m_row, m_col, v.m_matrix.get(v.m_row, v.m_col)); return *this; }
        |                                                                        ^~~
        |                                                                        set
  /wrkdirs/usr/ports/math/z3/work/z3-z3-4.13.0/src/math/lp/static_matrix.h:164:10: note: 'set' declared here
    164 |     void set(unsigned row, unsigned col, T const & val);
        |          ^

Upstream fixed this as part of a few other changes for gcc 15 in
<https://github.com/Z3Prover/z3/commit/2ce89e5f4>, but it does not apply
cleanly to this version, so add a backported patch.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2024-09-15 07:16:30 UTC
Created attachment 253578 [details]
math/z3: fix build with clang 19
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-09-15 12:04:42 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=88af7aa2d01a15a3d77380bf590921e04996ef45

commit 88af7aa2d01a15a3d77380bf590921e04996ef45
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-09-15 11:53:50 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2024-09-15 12:03:37 +0000

    math/z3: fix build with clang 19

    Clang 19 has become more strict about errors in member functions, which
    results in:

    /wrkdirs/usr/ports/math/z3/work/z3-z3-4.13.0/src/math/lp/static_matrix.h:82:72: error: no member named 'get' in 'static_matrix<T, X>'; did you mean 'set'?
     82 |         ref operator=(ref & v) { m_matrix.set(m_row, m_col, v.m_matrix.get(v.m_row, v.m_col)); return *this; }
        |                                                                        ^~~
        |                                                                        set
    /wrkdirs/usr/ports/math/z3/work/z3-z3-4.13.0/src/math/lp/static_matrix.h:164:10: note: 'set' declared here
    164 |     void set(unsigned row, unsigned col, T const & val);
        |          ^

    Upstream fixed this as part of a few other changes for gcc 15 in
    <https://github.com/Z3Prover/z3/commit/2ce89e5f4>, but it does not apply
    cleanly to this version, so add a backported patch.

    PR:             281512
    MFH:            2024Q3

 math/z3/files/patch-backport-2ce89e5f4 (new) | 125 +++++++++++++++++++++++++++
 1 file changed, 125 insertions(+)
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-09-15 12:08:43 UTC
A commit in branch 2024Q3 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1168d8b84975a1fde55bd7f25a97970268542a73

commit 1168d8b84975a1fde55bd7f25a97970268542a73
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-09-15 11:53:50 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2024-09-15 12:08:13 +0000

    math/z3: fix build with clang 19

    Clang 19 has become more strict about errors in member functions, which
    results in:

    /wrkdirs/usr/ports/math/z3/work/z3-z3-4.13.0/src/math/lp/static_matrix.h:82:72: error: no member named 'get' in 'static_matrix<T, X>'; did you mean 'set'?
     82 |         ref operator=(ref & v) { m_matrix.set(m_row, m_col, v.m_matrix.get(v.m_row, v.m_col)); return *this; }
        |                                                                        ^~~
        |                                                                        set
    /wrkdirs/usr/ports/math/z3/work/z3-z3-4.13.0/src/math/lp/static_matrix.h:164:10: note: 'set' declared here
    164 |     void set(unsigned row, unsigned col, T const & val);
        |          ^

    Upstream fixed this as part of a few other changes for gcc 15 in
    <https://github.com/Z3Prover/z3/commit/2ce89e5f4>, but it does not apply
    cleanly to this version, so add a backported patch.

    PR:             281512
    MFH:            2024Q3
    (cherry picked from commit 88af7aa2d01a15a3d77380bf590921e04996ef45)

 math/z3/files/patch-backport-2ce89e5f4 (new) | 125 +++++++++++++++++++++++++++
 1 file changed, 125 insertions(+)
Comment 4 Gleb Popov freebsd_committer freebsd_triage 2024-09-15 12:09:14 UTC
Pushed, thank you.