Bug 293447 - cad/ngspice_rework: fix build with libc++ 21
Summary: cad/ngspice_rework: 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: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks: 292067
  Show dependency treegraph
 
Reported: 2026-02-25 20:08 UTC by Dimitry Andric
Modified: 2026-02-25 21:24 UTC (History)
1 user (show)

See Also:
kevinz5000: maintainer-feedback+


Attachments
cad/ngspice_rework: fix build with libc++ 21 (2.01 KB, patch)
2026-02-25 20: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-02-25 20:08:47 UTC
With libc++ 21 cad/ngspice_rework fails to build, with errors similar to:

    In file included from hicumL2temp.cpp:11:
    ../../../../src/include/cppduals/duals/dual:444:8: error: 'is_compound' cannot be specialized: Users are not allowed to specialize this standard library entity [-Winvalid-specialization]
      444 | struct is_compound<duals::dual<T>> : true_type {};
          |        ^
    /usr/include/c++/v1/__type_traits/is_compound.h:25:8: note: marked '_Clang::no_specializations' here
       25 | struct _LIBCPP_NO_SPECIALIZATIONS is_compound : _BoolConstant<__is_compound(_Tp)> {};
          |        ^
    /usr/include/c++/v1/__config:1167:9: note: expanded from macro '_LIBCPP_NO_SPECIALIZATIONS'
     1167 |       [[_Clang::__no_specializations__("Users are not allowed to specialize this standard library entity")]]
          |         ^

This is because libc++ 21 no longer allows specializing a number of
standard library entities. Comment out the specialization to make the
build complete.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2026-02-25 20:09:44 UTC
Created attachment 268356 [details]
cad/ngspice_rework: fix build with libc++ 21
Comment 2 Kevin Zheng 2026-02-25 20:37:05 UTC
Thanks for the fixed, approved.

I checked that upstream went with the same patch: https://sourceforge.net/p/ngspice/bugs/826/
Comment 3 Dimitry Andric freebsd_committer freebsd_triage 2026-02-25 21:07:35 UTC
Oh, I see that they completely deleted the block instead. I'll do the same. If you import a new version later on, you can simply drop the patch.
Comment 4 Kevin Zheng 2026-02-25 21:09:11 UTC
Thanks, same difference so your choice, in both cases the patch will be dropped in the new version. Consider this pre-approval if you decide to revise the patch to drop the whole thing.
Comment 5 commit-hook freebsd_committer freebsd_triage 2026-02-25 21:19:22 UTC
A commit in branch main references this bug:

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

commit c6266b20c47f5cd2194b16d7f63781fb394caa0b
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-02-25 20:09:06 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-02-25 21:18:53 +0000

    cad/ngspice_rework: fix build with libc++ 21

    With libc++ 21 cad/ngspice_rework fails to build, with errors similar to:

        In file included from hicumL2temp.cpp:11:
        ../../../../src/include/cppduals/duals/dual:444:8: error: 'is_compound' cannot be specialized: Users are not allowed to specialize this standard library entity [-Winvalid-specialization]
          444 | struct is_compound<duals::dual<T>> : true_type {};
              |        ^
        /usr/include/c++/v1/__type_traits/is_compound.h:25:8: note: marked '_Clang::no_specializations' here
           25 | struct _LIBCPP_NO_SPECIALIZATIONS is_compound : _BoolConstant<__is_compound(_Tp)> {};
              |        ^
        /usr/include/c++/v1/__config:1167:9: note: expanded from macro '_LIBCPP_NO_SPECIALIZATIONS'
         1167 |       [[_Clang::__no_specializations__("Users are not allowed to specialize this standard library entity")]]
              |         ^

    This is because libc++ 21 no longer allows specializing a number of
    standard library entities. Delete out the specialization to make the
    build complete.

    PR:             293447
    Approved by:    kevinz5000@gmail.com (maintainer)
    MFH:            2026Q1

 .../files/patch-src_include_cppduals_duals_dual (new)       | 13 +++++++++++++
 1 file changed, 13 insertions(+)
Comment 6 commit-hook freebsd_committer freebsd_triage 2026-02-25 21:20:23 UTC
A commit in branch 2026Q1 references this bug:

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

commit 3a9d2abbdd0940dd15e7f3df89b26c033dbd7e4d
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-02-25 20:09:06 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-02-25 21:19:20 +0000

    cad/ngspice_rework: fix build with libc++ 21

    With libc++ 21 cad/ngspice_rework fails to build, with errors similar to:

        In file included from hicumL2temp.cpp:11:
        ../../../../src/include/cppduals/duals/dual:444:8: error: 'is_compound' cannot be specialized: Users are not allowed to specialize this standard library entity [-Winvalid-specialization]
          444 | struct is_compound<duals::dual<T>> : true_type {};
              |        ^
        /usr/include/c++/v1/__type_traits/is_compound.h:25:8: note: marked '_Clang::no_specializations' here
           25 | struct _LIBCPP_NO_SPECIALIZATIONS is_compound : _BoolConstant<__is_compound(_Tp)> {};
              |        ^
        /usr/include/c++/v1/__config:1167:9: note: expanded from macro '_LIBCPP_NO_SPECIALIZATIONS'
         1167 |       [[_Clang::__no_specializations__("Users are not allowed to specialize this standard library entity")]]
              |         ^

    This is because libc++ 21 no longer allows specializing a number of
    standard library entities. Delete out the specialization to make the
    build complete.

    PR:             293447
    Approved by:    kevinz5000@gmail.com (maintainer)
    MFH:            2026Q1

    (cherry picked from commit c6266b20c47f5cd2194b16d7f63781fb394caa0b)

 .../files/patch-src_include_cppduals_duals_dual (new)       | 13 +++++++++++++
 1 file changed, 13 insertions(+)