Bug 271054 - devel/kyua: fix build with clang 16
Summary: devel/kyua: fix build with clang 16
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: Julio Merino,+1 347 694 0576,New York City
URL:
Keywords:
Depends on:
Blocks: 271047
  Show dependency treegraph
 
Reported: 2023-04-24 20:29 UTC by Dimitry Andric
Modified: 2023-05-07 18:41 UTC (History)
1 user (show)

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


Attachments
devel/kyua: fix build with clang 16 (1.79 KB, patch)
2023-04-24 20:29 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 2023-04-24 20:29:29 UTC
Since clang 16 (and gcc 11) the default C++ standard is now gnu++17.
Because devel/kyua's Makefile does not explicitly set its C++ standard,
this leads to several errors:

  In file included from cli/cmd_about.cpp:29:
  In file included from ./cli/cmd_about.hpp:35:
  ./cli/common.hpp:71:14: error: no template named 'auto_ptr' in namespace 'std'
  typedef std::auto_ptr< cli_command > cli_command_ptr;
          ~~~~~^
  In file included from cli/cmd_db_exec.cpp:29:
  In file included from ./cli/cmd_db_exec.hpp:37:
  ./cli/common.hpp:71:14: error: no template named 'auto_ptr' in namespace 'std'
  typedef std::auto_ptr< cli_command > cli_command_ptr;
          ~~~~~^
  In file included from cli/cmd_db_migrate.cpp:29:
  In file included from ./cli/cmd_db_migrate.hpp:35:
  ./cli/common.hpp:71:14: error: no template named 'auto_ptr' in namespace 'std'
  typedef std::auto_ptr< cli_command > cli_command_ptr;
          ~~~~~^
  In file included from cli/cmd_config.cpp:29:
  In file included from ./cli/cmd_config.hpp:35:
  ./cli/common.hpp:71:14: error: no template named 'auto_ptr' in namespace 'std'
  typedef std::auto_ptr< cli_command > cli_command_ptr;
          ~~~~~^

Add USE_CXXSTD=gnu++98 to avoid these errors.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2023-04-24 20:29:47 UTC
Created attachment 241713 [details]
devel/kyua: fix build with clang 16
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-05-07 18:40:10 UTC
A commit in branch main references this bug:

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

commit 7ecd176f65a556e852635b33bd30843c1ce31bb4
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-04-24 20:27:12 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-05-07 18:38:48 +0000

    devel/kyua: fix build with clang 16

    Since clang 16 (and gcc 11) the default C++ standard is now gnu++17.
    Because devel/kyua's Makefile does not explicitly set its C++ standard,
    this leads to several errors:

      In file included from cli/cmd_about.cpp:29:
      In file included from ./cli/cmd_about.hpp:35:
      ./cli/common.hpp:71:14: error: no template named 'auto_ptr' in namespace 'std'
      typedef std::auto_ptr< cli_command > cli_command_ptr;
              ~~~~~^
      In file included from cli/cmd_db_exec.cpp:29:
      In file included from ./cli/cmd_db_exec.hpp:37:
      ./cli/common.hpp:71:14: error: no template named 'auto_ptr' in namespace 'std'
      typedef std::auto_ptr< cli_command > cli_command_ptr;
              ~~~~~^
      In file included from cli/cmd_db_migrate.cpp:29:
      In file included from ./cli/cmd_db_migrate.hpp:35:
      ./cli/common.hpp:71:14: error: no template named 'auto_ptr' in namespace 'std'
      typedef std::auto_ptr< cli_command > cli_command_ptr;
              ~~~~~^
      In file included from cli/cmd_config.cpp:29:
      In file included from ./cli/cmd_config.hpp:35:
      ./cli/common.hpp:71:14: error: no template named 'auto_ptr' in namespace 'std'
      typedef std::auto_ptr< cli_command > cli_command_ptr;
              ~~~~~^

    Add USE_CXXSTD=gnu++98 to avoid these errors.

    PR:             271054
    Approved by:    maintainer timeout (2 weeks)
    MFH:            2023Q2

 devel/kyua/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)