Bug 292867 - devel/build2: fix build with libc++ >= 20
Summary: devel/build2: fix build with libc++ >= 20
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: Robert Clausecker
URL:
Keywords:
Depends on:
Blocks: 292067
  Show dependency treegraph
 
Reported: 2026-02-01 19:16 UTC by Dimitry Andric
Modified: 2026-02-01 20:26 UTC (History)
0 users

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


Attachments
devel/build2: fix build with libc++ >= 20 (2.16 KB, patch)
2026-02-01 19:18 UTC, Dimitry Andric
fuz: maintainer-approval+
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-02-01 19:16:46 UTC
With libc++ 20 or higher devel/build2 fails to build, with errors
similar to:

    In file included from libbuild2/utility.cxx:27:
    ./libbuild2/script/regex.hxx:620:10: error: 'make_unsigned' cannot be specialized: Users are not allowed to specialize this standard library entity [-Winvalid-specialization]
      620 |   struct make_unsigned<build2::script::regex::line_char>
          |          ^
    /usr/include/c++/v1/__type_traits/make_unsigned.h:75:8: note: marked '_Clang::no_specializations' here
       75 | struct _LIBCPP_NO_SPECIALIZATIONS make_unsigned {
          |        ^
    /usr/include/c++/v1/__config:1167:9: note: expanded from macro '_LIBCPP_NO_SPECIALIZATIONS'

Upstream committed a fix for this in
https://github.com/build2/build2/commit/7cf9cec, so add that as a patch
file.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2026-02-01 19:18:25 UTC
Created attachment 267675 [details]
devel/build2: fix build with libc++ >= 20
Comment 2 Robert Clausecker freebsd_committer freebsd_triage 2026-02-01 19:35:42 UTC
Comment on attachment 267675 [details]
devel/build2: fix build with libc++ >= 20

LGTM
Comment 3 commit-hook freebsd_committer freebsd_triage 2026-02-01 19:55:53 UTC
A commit in branch main references this bug:

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

commit ca0ca0a01359fe5acccf5a21c4acd2ceceefbd7a
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-02-01 19:17:16 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-02-01 19:54:59 +0000

    devel/build2: fix build with libc++ >= 20

    With libc++ 20 or higher devel/build2 fails to build, with errors
    similar to:

        In file included from libbuild2/utility.cxx:27:
        ./libbuild2/script/regex.hxx:620:10: error: 'make_unsigned' cannot be specialized: Users are not allowed to specialize this standard library entity [-Winvalid-specialization]
          620 |   struct make_unsigned<build2::script::regex::line_char>
              |          ^
        /usr/include/c++/v1/__type_traits/make_unsigned.h:75:8: note: marked '_Clang::no_specializations' here
           75 | struct _LIBCPP_NO_SPECIALIZATIONS make_unsigned {
              |        ^
        /usr/include/c++/v1/__config:1167:9: note: expanded from macro '_LIBCPP_NO_SPECIALIZATIONS'

    Upstream committed a fix for this in
    https://github.com/build2/build2/commit/7cf9cec, so add that as a patch
    file.

    PR:             292867
    Approved by:    fuz (maintainer)
    MFH:            2026Q1

 .../patch-build2_libbuild2_script_regex.hxx (new)     | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
Comment 4 commit-hook freebsd_committer freebsd_triage 2026-02-01 19:55:53 UTC
A commit in branch 2026Q1 references this bug:

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

commit acd82d584b929967041fd7d5588b7ff1816aaa8c
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-02-01 19:17:16 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-02-01 19:55:35 +0000

    devel/build2: fix build with libc++ >= 20

    With libc++ 20 or higher devel/build2 fails to build, with errors
    similar to:

        In file included from libbuild2/utility.cxx:27:
        ./libbuild2/script/regex.hxx:620:10: error: 'make_unsigned' cannot be specialized: Users are not allowed to specialize this standard library entity [-Winvalid-specialization]
          620 |   struct make_unsigned<build2::script::regex::line_char>
              |          ^
        /usr/include/c++/v1/__type_traits/make_unsigned.h:75:8: note: marked '_Clang::no_specializations' here
           75 | struct _LIBCPP_NO_SPECIALIZATIONS make_unsigned {
              |        ^
        /usr/include/c++/v1/__config:1167:9: note: expanded from macro '_LIBCPP_NO_SPECIALIZATIONS'

    Upstream committed a fix for this in
    https://github.com/build2/build2/commit/7cf9cec, so add that as a patch
    file.

    PR:             292867
    Approved by:    fuz (maintainer)
    MFH:            2026Q1

    (cherry picked from commit ca0ca0a01359fe5acccf5a21c4acd2ceceefbd7a)

 .../patch-build2_libbuild2_script_regex.hxx (new)     | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)