Bug 281359 - devel/opentelemetry-cpp: fix build with clang 19
Summary: devel/opentelemetry-cpp: 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: Sergey A. Osokin
URL:
Keywords:
Depends on:
Blocks: 280562
  Show dependency treegraph
 
Reported: 2024-09-08 09:19 UTC by Dimitry Andric
Modified: 2024-09-08 17:50 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (osa)


Attachments
devel/opentelemetry-cpp: fix build with clang 19 (4.49 KB, patch)
2024-09-08 09:21 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-08 09:19:38 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/devel/opentelemetry-cpp/work/opentelemetry-cpp-1.16.1/api/include/opentelemetry/logs/logger_type_traits.h:169:69: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
      169 |     return LogRecordSetterTrait<common::KeyValueIterable>::template Set(
          |                                                                     ^
    /wrkdirs/usr/ports/devel/opentelemetry-cpp/work/opentelemetry-cpp-1.16.1/api/include/opentelemetry/logs/logger.h:76:89: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
       76 |         detail::LogRecordSetterTrait<typename std::decay<ArgumentType>::type>::template Set(
          |                                                                                         ^
    /wrkdirs/usr/ports/devel/opentelemetry-cpp/work/opentelemetry-cpp-1.16.1/api/include/opentelemetry/logs/event_logger.h:69:89: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
       69 |         detail::LogRecordSetterTrait<typename std::decay<ArgumentType>::type>::template Set(
          |                                                                                         ^

In these cases, appending "<>" is enough to satisfy the constraint.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2024-09-08 09:21:14 UTC
Created attachment 253420 [details]
devel/opentelemetry-cpp: fix build with clang 19
Comment 2 Sergey A. Osokin freebsd_committer freebsd_triage 2024-09-08 16:58:52 UTC
Thanks for the report,Dimitry.

LGTM, please feel free to commit the patch.
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-09-08 17:47:40 UTC
A commit in branch main references this bug:

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

commit 676864fd474bdd6ec1d74496d0a58d9a5a046601
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-09-08 09:20:21 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-09-08 17:45:19 +0000

    devel/opentelemetry-cpp: 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/devel/opentelemetry-cpp/work/opentelemetry-cpp-1.16.1/api/include/opentelemetry/logs/logger_type_traits.h:169:69: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
          169 |     return LogRecordSetterTrait<common::KeyValueIterable>::template Set(
              |                                                                     ^
        /wrkdirs/usr/ports/devel/opentelemetry-cpp/work/opentelemetry-cpp-1.16.1/api/include/opentelemetry/logs/logger.h:76:89: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
           76 |         detail::LogRecordSetterTrait<typename std::decay<ArgumentType>::type>::template Set(
              |                                                                                         ^
        /wrkdirs/usr/ports/devel/opentelemetry-cpp/work/opentelemetry-cpp-1.16.1/api/include/opentelemetry/logs/event_logger.h:69:89: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
           69 |         detail::LogRecordSetterTrait<typename std::decay<ArgumentType>::type>::template Set(
              |                                                                                         ^

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

    PR:             281359
    Approved by:    osa (maintainer)
    MFH:            2024Q3

 ...patch-api_include_opentelemetry_logs_event__logger.h (new) | 11 +++++++++++
 .../files/patch-api_include_opentelemetry_logs_logger.h (new) | 11 +++++++++++
 ...pi_include_opentelemetry_logs_logger__type__traits.h (new) | 11 +++++++++++
 3 files changed, 33 insertions(+)
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-09-08 17:49:42 UTC
A commit in branch 2024Q3 references this bug:

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

commit 66edcb86f65117393297fedb6a5e661f9e3db735
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-09-08 09:20:21 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-09-08 17:48:08 +0000

    devel/opentelemetry-cpp: 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/devel/opentelemetry-cpp/work/opentelemetry-cpp-1.16.1/api/include/opentelemetry/logs/logger_type_traits.h:169:69: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
          169 |     return LogRecordSetterTrait<common::KeyValueIterable>::template Set(
              |                                                                     ^
        /wrkdirs/usr/ports/devel/opentelemetry-cpp/work/opentelemetry-cpp-1.16.1/api/include/opentelemetry/logs/logger.h:76:89: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
           76 |         detail::LogRecordSetterTrait<typename std::decay<ArgumentType>::type>::template Set(
              |                                                                                         ^
        /wrkdirs/usr/ports/devel/opentelemetry-cpp/work/opentelemetry-cpp-1.16.1/api/include/opentelemetry/logs/event_logger.h:69:89: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
           69 |         detail::LogRecordSetterTrait<typename std::decay<ArgumentType>::type>::template Set(
              |                                                                                         ^

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

    PR:             281359
    Approved by:    osa (maintainer)
    MFH:            2024Q3

    (cherry picked from commit 676864fd474bdd6ec1d74496d0a58d9a5a046601)

 ...patch-api_include_opentelemetry_logs_event__logger.h (new) | 11 +++++++++++
 .../files/patch-api_include_opentelemetry_logs_logger.h (new) | 11 +++++++++++
 ...pi_include_opentelemetry_logs_logger__type__traits.h (new) | 11 +++++++++++
 3 files changed, 33 insertions(+)