Bug 282473 - java/openjfx14: fix build with clang 19
Summary: java/openjfx14: 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: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks: 280562
  Show dependency treegraph
 
Reported: 2024-11-01 17:26 UTC by Dimitry Andric
Modified: 2024-11-01 18:19 UTC (History)
0 users

See Also:


Attachments
java/openjfx14: fix build with clang 19 (5.60 KB, patch)
2024-11-01 17:27 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-01 17:26:40 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/java/openjfx14/work/jfx-14.0.2.1-1/modules/javafx.web/src/main/native/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h:923:65: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-
    923 |         AssemblerType::repatchCompact(dataLabelCompact.template dataLocation(), value);
        |                                                                 ^
  /wrkdirs/usr/ports/java/openjfx14/work/jfx-14.0.2.1-1/modules/javafx.web/src/main/native/Source/JavaScriptCore/runtime/JSCast.h:146:33: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
    146 |     return Dispatcher::template inherits(vm, from);                                                                                                                                                                                                                                             |                                 ^
  /wrkdirs/usr/ports/java/openjfx14/work/jfx-14.0.2.1-1/modules/javafx.web/src/main/native/Source/JavaScriptCore/runtime/JSCast.h:155:37: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
    155 |     if (LIKELY(Dispatcher::template inherits(vm, from)))
        |                                     ^
  /wrkdirs/usr/ports/java/openjfx14/work/jfx-14.0.2.1-1/modules/javafx.web/src/main/native/Source/JavaScriptCore/llint/LLIntData.h:159:75: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
    159 |     return reinterpret_cast<LLIntCode>(getCodePtr<tag>(opcodeID).template executableAddress());
        |                                                                           ^

In all these cases, appending "<>" is enough to satisfy the constraint.

[1] https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#96
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2024-11-01 17:27:47 UTC
Created attachment 254851 [details]
java/openjfx14: fix build with clang 19
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-11-01 17:51:28 UTC
A commit in branch main references this bug:

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

commit aa9dd586527b3e2a402b9699c5a7934728a27bfe
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-11-01 13:32:58 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-11-01 17:50:12 +0000

    java/openjfx14: 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/java/openjfx14/work/jfx-14.0.2.1-1/modules/javafx.web/src/main/native/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h:923:65: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
        923 |         AssemblerType::repatchCompact(dataLabelCompact.template dataLocation(), value);
            |                                                                 ^
      /wrkdirs/usr/ports/java/openjfx14/work/jfx-14.0.2.1-1/modules/javafx.web/src/main/native/Source/JavaScriptCore/runtime/JSCast.h:146:33: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
        146 |     return Dispatcher::template inherits(vm, from);
            |                                 ^
      /wrkdirs/usr/ports/java/openjfx14/work/jfx-14.0.2.1-1/modules/javafx.web/src/main/native/Source/JavaScriptCore/runtime/JSCast.h:155:37: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
        155 |     if (LIKELY(Dispatcher::template inherits(vm, from)))
            |                                     ^
      /wrkdirs/usr/ports/java/openjfx14/work/jfx-14.0.2.1-1/modules/javafx.web/src/main/native/Source/JavaScriptCore/llint/LLIntData.h:159:75: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
        159 |     return reinterpret_cast<LLIntCode>(getCodePtr<tag>(opcodeID).template executableAddress());
            |                                                                           ^

    In all these cases, appending "<>" is enough to satisfy the constraint.

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

    PR:             282473
    MFH:            2024Q4

 ...riptCore_assembler_AbstractMacroAssembler.h (new) | 11 +++++++++++
 ...ive_Source_JavaScriptCore_llint_LLIntData.h (new) | 11 +++++++++++
 ...tive_Source_JavaScriptCore_runtime_JSCast.h (new) | 20 ++++++++++++++++++++
 3 files changed, 42 insertions(+)
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-11-01 17:52:29 UTC
A commit in branch 2024Q4 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=60ab19bed1353a022c94fe581bba1c52a48ddfb3

commit 60ab19bed1353a022c94fe581bba1c52a48ddfb3
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-11-01 13:32:58 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-11-01 17:50:47 +0000

    java/openjfx14: 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/java/openjfx14/work/jfx-14.0.2.1-1/modules/javafx.web/src/main/native/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h:923:65: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
        923 |         AssemblerType::repatchCompact(dataLabelCompact.template dataLocation(), value);
            |                                                                 ^
      /wrkdirs/usr/ports/java/openjfx14/work/jfx-14.0.2.1-1/modules/javafx.web/src/main/native/Source/JavaScriptCore/runtime/JSCast.h:146:33: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
        146 |     return Dispatcher::template inherits(vm, from);
            |                                 ^
      /wrkdirs/usr/ports/java/openjfx14/work/jfx-14.0.2.1-1/modules/javafx.web/src/main/native/Source/JavaScriptCore/runtime/JSCast.h:155:37: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
        155 |     if (LIKELY(Dispatcher::template inherits(vm, from)))
            |                                     ^
      /wrkdirs/usr/ports/java/openjfx14/work/jfx-14.0.2.1-1/modules/javafx.web/src/main/native/Source/JavaScriptCore/llint/LLIntData.h:159:75: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
        159 |     return reinterpret_cast<LLIntCode>(getCodePtr<tag>(opcodeID).template executableAddress());
            |                                                                           ^

    In all these cases, appending "<>" is enough to satisfy the constraint.

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

    PR:             282473
    MFH:            2024Q4
    (cherry picked from commit aa9dd586527b3e2a402b9699c5a7934728a27bfe)

 ...riptCore_assembler_AbstractMacroAssembler.h (new) | 11 +++++++++++
 ...ive_Source_JavaScriptCore_llint_LLIntData.h (new) | 11 +++++++++++
 ...tive_Source_JavaScriptCore_runtime_JSCast.h (new) | 20 ++++++++++++++++++++
 3 files changed, 42 insertions(+)