With libc++ 20 or higher graphics/podofo fails to build, with errors similar to: /wrkdirs/usr/ports/graphics/podofo/work/podofo-0.10.4/src/podofo/main/PdfColor.cpp:686:13: error: call to 'from_chars' is ambiguous 686 | if (std::from_chars(name.data() + 1, name.data() + name.size(), grayVal, chars_format::fixed).ec != std::errc()) | ^~~~~~~~~~~~~~~ /usr/include/c++/v1/__charconv/from_chars_floating_point.h:63:1: note: candidate function 63 | from_chars(const char* __first, const char* __last, double& __value, chars_format __fmt = chars_format::general) { | ^ /wrkdirs/usr/ports/graphics/podofo/work/podofo-0.10.4/src/podofo/private/charconv_compat.h:34:30: note: candidate function 34 | inline from_chars_result from_chars(const char* first, const char* last, | ^ This is because libc++ 20 started offering std::from_chars() for floating point values, and pododo does not check for this. Correct the WANT_FROM_CHARS check to correctly check for libc++ 20 or higher.
Created attachment 268057 [details] graphics/podofo: fix build with libc++ >= 20
LGTM. Could you please name the patch file as patch-libc++20 or so? Thanks.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=6d07173babd17fc1d3ece984639f8f83d6b94d74 commit 6d07173babd17fc1d3ece984639f8f83d6b94d74 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2026-02-14 21:37:11 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2026-02-15 13:07:53 +0000 graphics/podofo: fix build with libc++ >= 20 With libc++ 20 or higher graphics/podofo fails to build, with errors similar to: /wrkdirs/usr/ports/graphics/podofo/work/podofo-0.10.4/src/podofo/main/PdfColor.cpp:686:13: error: call to 'from_chars' is ambiguous 686 | if (std::from_chars(name.data() + 1, name.data() + name.size(), grayVal, chars_format::fixed).ec != std::errc()) | ^~~~~~~~~~~~~~~ /usr/include/c++/v1/__charconv/from_chars_floating_point.h:63:1: note: candidate function 63 | from_chars(const char* __first, const char* __last, double& __value, chars_format __fmt = chars_format::general) { | ^ /wrkdirs/usr/ports/graphics/podofo/work/podofo-0.10.4/src/podofo/private/charconv_compat.h:34:30: note: candidate function 34 | inline from_chars_result from_chars(const char* first, const char* last, | ^ This is because libc++ 20 started offering std::from_chars() for floating point values, and pododo does not check for this. Correct the WANT_FROM_CHARS check to correctly check for libc++ 20 or higher. PR: 293181 Approved by: sunpoet (maintainer) MFH: 2026Q1 graphics/podofo/files/patch-libc++20 (new) | 11 +++++++++++ 1 file changed, 11 insertions(+)
A commit in branch 2026Q1 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=f71f0f3bbef360e530ab68915863b21578f0131b commit f71f0f3bbef360e530ab68915863b21578f0131b Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2026-02-14 21:37:11 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2026-02-15 13:08:53 +0000 graphics/podofo: fix build with libc++ >= 20 With libc++ 20 or higher graphics/podofo fails to build, with errors similar to: /wrkdirs/usr/ports/graphics/podofo/work/podofo-0.10.4/src/podofo/main/PdfColor.cpp:686:13: error: call to 'from_chars' is ambiguous 686 | if (std::from_chars(name.data() + 1, name.data() + name.size(), grayVal, chars_format::fixed).ec != std::errc()) | ^~~~~~~~~~~~~~~ /usr/include/c++/v1/__charconv/from_chars_floating_point.h:63:1: note: candidate function 63 | from_chars(const char* __first, const char* __last, double& __value, chars_format __fmt = chars_format::general) { | ^ /wrkdirs/usr/ports/graphics/podofo/work/podofo-0.10.4/src/podofo/private/charconv_compat.h:34:30: note: candidate function 34 | inline from_chars_result from_chars(const char* first, const char* last, | ^ This is because libc++ 20 started offering std::from_chars() for floating point values, and pododo does not check for this. Correct the WANT_FROM_CHARS check to correctly check for libc++ 20 or higher. PR: 293181 Approved by: sunpoet (maintainer) MFH: 2026Q1 (cherry picked from commit 6d07173babd17fc1d3ece984639f8f83d6b94d74) graphics/podofo/files/patch-libc++20 (new) | 11 +++++++++++ 1 file changed, 11 insertions(+)