Bug 293246 - math/symengine: fix build with libc++ 21
Summary: math/symengine: 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: Yuri Victorovich
URL:
Keywords:
Depends on:
Blocks: 292067
  Show dependency treegraph
 
Reported: 2026-02-17 19:37 UTC by Dimitry Andric
Modified: 2026-03-13 08:43 UTC (History)
0 users

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


Attachments
math/symengine: fix build with libc++ 21 (1.95 KB, patch)
2026-02-17 19:38 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-17 19:37:57 UTC
With libc++ 21 math/symengine fails to build, with errors similar to:

    In file included from
    /wrkdirs/usr/ports/math/symengine/work/symengine-0.14.0/cmake/checkcxx11.cpp:1:
    In file included from /usr/include/c++/v1/unordered_map:589:
    In file included from /usr/include/c++/v1/__algorithm/is_permutation.h:13:
    In file included from /usr/include/c++/v1/__algorithm/comp.h:14:
    In file included from /usr/include/c++/v1/__type_traits/is_integral.h:14:
    /usr/include/c++/v1/__type_traits/remove_cv.h:22:32: error: unknown type
    name '__remove_cv'; did you mean 'remove_cv'?
      using type _LIBCPP_NODEBUG = __remove_cv(_Tp);
                                   ^
    /usr/include/c++/v1/__type_traits/remove_cv.h:21:35: note: 'remove_cv'
    declared here
    struct _LIBCPP_NO_SPECIALIZATIONS remove_cv {
                                      ^

This is because libc++ 21 does not officially support clang < 19, and
even though I added quite a few patches to libc++ 21 to non-officially
support older gcc and clang versions, I never managed to make it support
clang 15 or gcc 12.

It seems that either removing the USES=llvm:min=15,max=15 fixes this
problem, as it then compiles with the default llvm 19. Alternatively,
the minimum version could be bumped to at least 16.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2026-02-17 19:38:27 UTC
Created attachment 268141 [details]
math/symengine: fix build with libc++ 21
Comment 2 commit-hook freebsd_committer freebsd_triage 2026-03-13 08:28:34 UTC
A commit in branch main references this bug:

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

commit 8adee5d2725328f88639daca828779689301bd92
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-02-17 10:28:31 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-03-13 08:27:02 +0000

    math/symengine: fix build with libc++ 21

    With libc++ 21 math/symengine fails to build, with errors similar to:

        In file included from
        /wrkdirs/usr/ports/math/symengine/work/symengine-0.14.0/cmake/checkcxx11.cpp:1:
        In file included from /usr/include/c++/v1/unordered_map:589:
        In file included from /usr/include/c++/v1/__algorithm/is_permutation.h:13:
        In file included from /usr/include/c++/v1/__algorithm/comp.h:14:
        In file included from /usr/include/c++/v1/__type_traits/is_integral.h:14:
        /usr/include/c++/v1/__type_traits/remove_cv.h:22:32: error: unknown type
        name '__remove_cv'; did you mean 'remove_cv'?
          using type _LIBCPP_NODEBUG = __remove_cv(_Tp);
                                       ^
        /usr/include/c++/v1/__type_traits/remove_cv.h:21:35: note: 'remove_cv'
        declared here
        struct _LIBCPP_NO_SPECIALIZATIONS remove_cv {
                                          ^

    This is because libc++ 21 does not officially support clang < 19, and
    even though I added quite a few patches to libc++ 21 to non-officially
    support older gcc and clang versions, I never managed to make it support
    clang 15 or gcc 12.

    It seems that either removing the USES=llvm:min=15,max=15 fixes this
    problem, as it then compiles with the default llvm 19. Alternatively,
    the minimum version could be bumped to at least 16.

    PR:             293246
    Approved by:    maintainer timeout (2 weeks)
    MFH:            2026Q1

 math/symengine/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)