Bug 282796 - audio/sfizz: fix build with clang 19
Summary: audio/sfizz: 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 Only Me
Assignee: Dimitry Andric
URL:
Keywords:
Depends on:
Blocks: 280562
  Show dependency treegraph
 
Reported: 2024-11-16 13:30 UTC by Dimitry Andric
Modified: 2024-11-17 18:44 UTC (History)
0 users

See Also:
yuri: maintainer-feedback+


Attachments
audio/sfizz: fix build with clang 19 (2.95 KB, patch)
2024-11-16 13: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-11-16 13:30:05 UTC
Clang 19 now implements CWG 96 [1], which requires a template argument
list after a 'template' keyword, resulting in errors similar to:

  /wrkdirs/usr/ports/audio/sfizz/work/sfizz-1.2.3/external/atomic_queue/include/atomic_queue/atomic_queue.h:394:31: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
    394 |         return Base::template do_pop_any(states_[index], elements_[index]);
        |                               ^
  /wrkdirs/usr/ports/audio/sfizz/work/sfizz-1.2.3/external/atomic_queue/include/atomic_queue/atomic_queue.h:400:24: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
    400 |         Base::template do_push_any(std::forward<U>(element), states_[index], elements_[index]);
        |                        ^
  /wrkdirs/usr/ports/audio/sfizz/work/sfizz-1.2.3/external/atomic_queue/include/atomic_queue/atomic_queue.h:522:31: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
    522 |         return Base::template do_pop_any(states_[index], elements_[index]);
        |                               ^
  /wrkdirs/usr/ports/audio/sfizz/work/sfizz-1.2.3/external/atomic_queue/include/atomic_queue/atomic_queue.h:528:24: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
    528 |         Base::template do_push_any(std::forward<U>(element), states_[index], elements_[index]);
        |                        ^

In all these cases, appending "<>" is enough to satisfy the constraint.
This can be done with a REINPLACE_CMD in the post-patch phase.

[1] https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#96
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2024-11-16 13:31:44 UTC
Created attachment 255216 [details]
audio/sfizz: fix build with clang 19
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2024-11-16 17:17:25 UTC
Approved. Please commit it.
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-11-17 18:14:20 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=96997562fb8b572c0da300f0c676fb89f8f3aabe

commit 96997562fb8b572c0da300f0c676fb89f8f3aabe
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-11-16 13:28:18 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-11-17 18:13:20 +0000

    audio/sfizz: fix build with clang 19

    Clang 19 now implements CWG 96 [1], which requires a template argument
    list after a 'template' keyword, resulting in errors similar to:

      /wrkdirs/usr/ports/audio/sfizz/work/sfizz-1.2.3/external/atomic_queue/include/atomic_queue/atomic_queue.h:394:31: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
        394 |         return Base::template do_pop_any(states_[index], elements_[index]);
            |                               ^
      /wrkdirs/usr/ports/audio/sfizz/work/sfizz-1.2.3/external/atomic_queue/include/atomic_queue/atomic_queue.h:400:24: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
        400 |         Base::template do_push_any(std::forward<U>(element), states_[index], elements_[index]);
            |                        ^
      /wrkdirs/usr/ports/audio/sfizz/work/sfizz-1.2.3/external/atomic_queue/include/atomic_queue/atomic_queue.h:522:31: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
        522 |         return Base::template do_pop_any(states_[index], elements_[index]);
            |                               ^
      /wrkdirs/usr/ports/audio/sfizz/work/sfizz-1.2.3/external/atomic_queue/include/atomic_queue/atomic_queue.h:528:24: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
        528 |         Base::template do_push_any(std::forward<U>(element), states_[index], elements_[index]);
            |                        ^

    In all these cases, appending "<>" is enough to satisfy the constraint.
    This can be done with a REINPLACE_CMD in the post-patch phase.

    [1] https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#96

    PR:             282796
    Approved by:    yuri (maintainer)
    MFH:            2024Q4

 audio/sfizz/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-11-17 18:43:25 UTC
A commit in branch 2024Q4 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=033e20bf95a5b274589d0a15def3a60629a2a618

commit 033e20bf95a5b274589d0a15def3a60629a2a618
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-11-16 13:28:18 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-11-17 18:42:09 +0000

    audio/sfizz: fix build with clang 19

    Clang 19 now implements CWG 96 [1], which requires a template argument
    list after a 'template' keyword, resulting in errors similar to:

      /wrkdirs/usr/ports/audio/sfizz/work/sfizz-1.2.3/external/atomic_queue/include/atomic_queue/atomic_queue.h:394:31: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
        394 |         return Base::template do_pop_any(states_[index], elements_[index]);
            |                               ^
      /wrkdirs/usr/ports/audio/sfizz/work/sfizz-1.2.3/external/atomic_queue/include/atomic_queue/atomic_queue.h:400:24: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
        400 |         Base::template do_push_any(std::forward<U>(element), states_[index], elements_[index]);
            |                        ^
      /wrkdirs/usr/ports/audio/sfizz/work/sfizz-1.2.3/external/atomic_queue/include/atomic_queue/atomic_queue.h:522:31: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
        522 |         return Base::template do_pop_any(states_[index], elements_[index]);
            |                               ^
      /wrkdirs/usr/ports/audio/sfizz/work/sfizz-1.2.3/external/atomic_queue/include/atomic_queue/atomic_queue.h:528:24: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
        528 |         Base::template do_push_any(std::forward<U>(element), states_[index], elements_[index]);
            |                        ^

    In all these cases, appending "<>" is enough to satisfy the constraint.
    This can be done with a REINPLACE_CMD in the post-patch phase.

    [1] https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#96

    PR:             282796
    Approved by:    yuri (maintainer)
    MFH:            2024Q4

    (cherry picked from commit 96997562fb8b572c0da300f0c676fb89f8f3aabe)

 audio/sfizz/Makefile | 5 +++++
 1 file changed, 5 insertions(+)