Bug 293811 - accessibility/hyprsunset: fix build with libc++ 21
Summary: accessibility/hyprsunset: fix build with libc++ 21
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: Hiroki Tagato
URL:
Keywords:
Depends on:
Blocks: 292067
  Show dependency treegraph
 
Reported: 2026-03-14 19:08 UTC by Dimitry Andric
Modified: 2026-03-20 12:15 UTC (History)
0 users

See Also:
tagattie: maintainer-feedback+


Attachments
accessibility/hyprsunset: fix build with libc++ 21 (2.38 KB, patch)
2026-03-14 19:09 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 2026-03-14 19:08:16 UTC
With libc++ 21 science/py-tensorflow fails to build, with errors similar
to:

    /wrkdirs/usr/ports/accessibility/hyprsunset/work/hyprsunset-0.3.3/src/Hyprsunset.cpp:300:10: error: no member named 'sort' in namespace 'std'
      300 |     std::sort(profiles.begin(), profiles.end(), [](const auto& a, const auto& b) {
          |          ^~~~

and:

    /wrkdirs/usr/ports/accessibility/hyprsunset/work/hyprsunset-0.3.3/src/Hyprsunset.cpp:329:29: error: no member named 'zoned_time' in namespace 'std::chrono'
      329 |     auto now = std::chrono::zoned_time(std::chrono::current_zone(), std::chrono::system_clock::now()).get_local_time();
          |                             ^~~~~~~~~~

The former is because the header <algorithm> isn't included.

The latter is because libc++ in FreeBSD doesn't have
std::chrono::zoned_time support yet, but the program checks for the
libc++ specific macro _LIBCPP_HAS_NO_TIME_ZONE_DATABASE. In libc++ 21,
most of the "_LIBCPP_HAS_NO_xxx" macros have been replaced by 'positive'
variants. In this case _LIBCPP_HAS_TIME_ZONE_DATABASE is now applicable.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2026-03-14 19:09:14 UTC
Created attachment 268809 [details]
accessibility/hyprsunset: fix build with libc++ 21
Comment 2 Hiroki Tagato freebsd_committer freebsd_triage 2026-03-16 12:17:12 UTC
The patch looks good to me. Please feel free to commit it.

Thanks!
Comment 3 commit-hook freebsd_committer freebsd_triage 2026-03-20 12:13:20 UTC
A commit in branch main references this bug:

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

commit ac11f2876dec2da906e05524f679f8a15acffa8e
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-03-14 19:08:36 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-03-20 12:12:12 +0000

    accessibility/hyprsunset: fix build with libc++ 21

    With libc++ 21 science/py-tensorflow fails to build, with errors similar
    to:

        /wrkdirs/usr/ports/accessibility/hyprsunset/work/hyprsunset-0.3.3/src/Hyprsunset.cpp:300:10: error: no member named 'sort' in namespace 'std'
          300 |     std::sort(profiles.begin(), profiles.end(), [](const auto& a, const auto& b) {
              |          ^~~~

    and:

        /wrkdirs/usr/ports/accessibility/hyprsunset/work/hyprsunset-0.3.3/src/Hyprsunset.cpp:329:29: error: no member named 'zoned_time' in namespace 'std::chrono'
          329 |     auto now = std::chrono::zoned_time(std::chrono::current_zone(), std::chrono::system_clock::now()).get_local_time();
              |                             ^~~~~~~~~~

    The former is because the header <algorithm> isn't included.

    The latter is because libc++ in FreeBSD doesn't have
    std::chrono::zoned_time support yet, but the program checks for the
    libc++ specific macro _LIBCPP_HAS_NO_TIME_ZONE_DATABASE. In libc++ 21,
    most of the "_LIBCPP_HAS_NO_xxx" macros have been replaced by 'positive'
    variants. In this case _LIBCPP_HAS_TIME_ZONE_DATABASE is now applicable.

    PR:             293811
    Approved by:    tagattie (maintainer)
    MFH:            2026Q1

 accessibility/hyprsunset/files/patch-src_Hyprsunset.cpp | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2026-03-20 12:13:21 UTC
A commit in branch 2026Q1 references this bug:

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

commit 45bbcf40c872c9aa7f725dac96925f13a7b2184b
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-03-14 19:08:36 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-03-20 12:13:00 +0000

    accessibility/hyprsunset: fix build with libc++ 21

    With libc++ 21 science/py-tensorflow fails to build, with errors similar
    to:

        /wrkdirs/usr/ports/accessibility/hyprsunset/work/hyprsunset-0.3.3/src/Hyprsunset.cpp:300:10: error: no member named 'sort' in namespace 'std'
          300 |     std::sort(profiles.begin(), profiles.end(), [](const auto& a, const auto& b) {
              |          ^~~~

    and:

        /wrkdirs/usr/ports/accessibility/hyprsunset/work/hyprsunset-0.3.3/src/Hyprsunset.cpp:329:29: error: no member named 'zoned_time' in namespace 'std::chrono'
          329 |     auto now = std::chrono::zoned_time(std::chrono::current_zone(), std::chrono::system_clock::now()).get_local_time();
              |                             ^~~~~~~~~~

    The former is because the header <algorithm> isn't included.

    The latter is because libc++ in FreeBSD doesn't have
    std::chrono::zoned_time support yet, but the program checks for the
    libc++ specific macro _LIBCPP_HAS_NO_TIME_ZONE_DATABASE. In libc++ 21,
    most of the "_LIBCPP_HAS_NO_xxx" macros have been replaced by 'positive'
    variants. In this case _LIBCPP_HAS_TIME_ZONE_DATABASE is now applicable.

    PR:             293811
    Approved by:    tagattie (maintainer)
    MFH:            2026Q1

    (cherry picked from commit ac11f2876dec2da906e05524f679f8a15acffa8e)

 accessibility/hyprsunset/files/patch-src_Hyprsunset.cpp | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)