Bug 293269 - math/givaro: fix build with libc++ 21
Summary: math/givaro: 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: Kurt Jaeger
URL:
Keywords:
Depends on:
Blocks: 292067
  Show dependency treegraph
 
Reported: 2026-02-18 20:29 UTC by Dimitry Andric
Modified: 2026-02-24 19:34 UTC (History)
0 users

See Also:
pi: maintainer-feedback+


Attachments
math/givaro: fix build with libc++ 21 (2.57 KB, patch)
2026-02-18 20:30 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-18 20:29:24 UTC
With libc++ 21 math/givaro fails to build, with errors similar to:

    In file included from gmp++_int_lib.C:18:
    In file included from ./gmp++/gmp++.h:57:
    In file included from ./gmp++/gmp++/gmp++_int.h:27:
    In file included from ../../../src/kernel/recint/recint/rconvert.h:45:
    ../../../src/kernel/recint/recint/rrint.h:122:32: error: 'make_signed' cannot be specialized: Users are not allowed to specialize this standard library entity [-Winvalid-specialization]
      122 |     template <size_t K> struct make_signed<RecInt::rint<K>> {
          |                                ^
    /usr/include/c++/v1/__type_traits/make_signed.h:73:8: note: marked '_Clang::no_specializations' here
       73 | struct _LIBCPP_NO_SPECIALIZATIONS make_signed {
          |        ^
    /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 std::make_signed to be
overridden. Upstream fixed this as part of
<https://github.com/linbox-team/givaro/commit/ed91ee0>, so pull it in as
a patch.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2026-02-18 20:30:21 UTC
Created attachment 268172 [details]
math/givaro: fix build with libc++ 21
Comment 2 Kurt Jaeger freebsd_committer freebsd_triage 2026-02-18 20:33:06 UTC
Thanks for the patch - would it be easier to just update to 4.2.1 or does 4.2.1 not yet contain the patch ?
Comment 3 Kurt Jaeger freebsd_committer freebsd_triage 2026-02-18 20:35:53 UTC
(In reply to Kurt Jaeger from comment #2)
the fix is from oct. 2025, 4.2.1 is from one week ago, so the fix is probably already in 4.2.1 ?
Comment 4 Dimitry Andric freebsd_committer freebsd_triage 2026-02-18 20:53:52 UTC
(In reply to Kurt Jaeger from comment #3)
Sure, if it is no problem to do a version bump, then that should fix it too. I'll check if it builds on the llvm-21-update branch.
Comment 5 Dimitry Andric freebsd_committer freebsd_triage 2026-02-19 12:53:41 UTC
(In reply to Dimitry Andric from comment #4)
Ah unfortunately not, v4.2.1 was tagged on Feb 10, 2025, while https://github.com/linbox-team/givaro/commit/ed91ee0 was done on Oct 22, 2025. For some reason they haven't made a newer release.
Comment 6 Kurt Jaeger freebsd_committer freebsd_triage 2026-02-19 13:35:43 UTC
(In reply to Dimitry Andric from comment #5)
ouch, you're right 8-}
Comment 7 Dimitry Andric freebsd_committer freebsd_triage 2026-02-22 19:46:01 UTC
So, are you OK with applying the patch then? :)
Comment 8 Kurt Jaeger freebsd_committer freebsd_triage 2026-02-24 19:34:15 UTC
update to 4.2.1 plus fix committed, thanks!
Comment 9 commit-hook freebsd_committer freebsd_triage 2026-02-24 19:34:47 UTC
A commit in branch main references this bug:

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

commit 18987275345e86158b0cd97a7e640d13f45e65f2
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-02-24 19:32:12 +0000
Commit:     Kurt Jaeger <pi@FreeBSD.org>
CommitDate: 2026-02-24 19:32:12 +0000

    math/givaro: update 4.2.0 -> 4.2.1, fix build with libc++ 21

    - libc++ 21 no longer allows std::make_signed to be overridden.
      Upstream fixed this as part of
      https://github.com/linbox-team/givaro/commit/ed91ee0

    PR:             293269
    Changes:        https://github.com/linbox-team/givaro/releases/tag/v4.2.1

 math/givaro/Makefile                               | 13 ++++++++----
 math/givaro/distinfo                               |  8 +++++---
 ...atch-src_kernel_integer_random-integer.h (gone) | 23 ----------------------
 .../patch-src_kernel_recint_rfiddling.h (gone)     | 11 -----------
 math/givaro/pkg-plist                              |  3 ++-
 5 files changed, 16 insertions(+), 42 deletions(-)