Bug 271710 - devel/p8-platform: fix build with clang 16
Summary: devel/p8-platform: 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: Dimitry Andric
URL:
Keywords:
Depends on:
Blocks: 271047
  Show dependency treegraph
 
Reported: 2023-05-29 17:11 UTC by Dimitry Andric
Modified: 2023-06-04 16:25 UTC (History)
2 users (show)

See Also:
mickael.maillot: maintainer-feedback+


Attachments
devel/p8-platform: fix build with clang 16 (2.86 KB, patch)
2023-05-29 17:12 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-05-29 17:11:53 UTC
Since clang 16 (and gcc 11) the default C++ standard is now gnu++17.
Because devel/p8-platform's Makefile does not explicitly set its C++
standard, this leads to an error:

  /wrkdirs/usr/ports/devel/p8-platform/work/platform-p8-platform-2.1.0.1/src/util/StringUtils.cpp:456:69: error: no member named 'ptr_fun' in the global namespace
    str.erase(str.begin(), ::find_if(str.begin(), str.end(), ::not1(::ptr_fun(isspace_c))));
                                                                    ~~^
  /wrkdirs/usr/ports/devel/p8-platform/work/platform-p8-platform-2.1.0.1/src/util/StringUtils.cpp:469:58: error: no member named 'ptr_fun' in the global namespace
    str.erase(::find_if(str.rbegin(), str.rend(), ::not1(::ptr_fun(isspace_c))).base(), str.end());
                                                         ~~^

Upstream already fixed this in
<https://github.com/Pulse-Eight/platform/commit/a7cd0d5>, via
<https://github.com/Pulse-Eight/platform/pull/45>, so apply it.

While here, pet portlint.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2023-05-29 17:12:14 UTC
Created attachment 242481 [details]
devel/p8-platform: fix build with clang 16
Comment 2 Fernando Apesteguía freebsd_committer freebsd_triage 2023-05-30 06:30:52 UTC
^Triage: reporter is committer, assign accordingly
Comment 3 mickael.maillot 2023-05-31 12:22:03 UTC
looks good to me
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-06-04 16:22:48 UTC
A commit in branch main references this bug:

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

commit 90b5b1e859bd89d629adc15ef72898a8e786e2ce
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-05-29 17:11:00 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-06-04 16:21:24 +0000

    devel/p8-platform: fix build with clang 16

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

      /wrkdirs/usr/ports/devel/p8-platform/work/platform-p8-platform-2.1.0.1/src/util/StringUtils.cpp:456:69: error: no member named 'ptr_fun' in the global namespace
        str.erase(str.begin(), ::find_if(str.begin(), str.end(), ::not1(::ptr_fun(isspace_c))));
                                                                        ~~^
      /wrkdirs/usr/ports/devel/p8-platform/work/platform-p8-platform-2.1.0.1/src/util/StringUtils.cpp:469:58: error: no member named 'ptr_fun' in the global namespace
        str.erase(::find_if(str.rbegin(), str.rend(), ::not1(::ptr_fun(isspace_c))).base(), str.end());
                                                             ~~^

    Upstream already fixed this in
    <https://github.com/Pulse-Eight/platform/commit/a7cd0d5>, via
    <https://github.com/Pulse-Eight/platform/pull/45>, so apply it.

    While here, pet portlint.

    PR:             271710
    Approved by:    mickael.maillot@gmail.com (maintainer)
    MFH:            2023Q2

 devel/p8-platform/Makefile  | 5 ++++-
 devel/p8-platform/distinfo  | 4 +++-
 devel/p8-platform/pkg-descr | 3 ++-
 3 files changed, 9 insertions(+), 3 deletions(-)