Bug 293181 - graphics/podofo: fix build with libc++ >= 20
Summary: graphics/podofo: 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 Only Me
Assignee: Dimitry Andric
URL:
Keywords:
Depends on:
Blocks: 292067
  Show dependency treegraph
 
Reported: 2026-02-14 21:36 UTC by Dimitry Andric
Modified: 2026-02-15 15:13 UTC (History)
0 users

See Also:
sunpoet: maintainer-feedback+


Attachments
graphics/podofo: fix build with libc++ >= 20 (2.24 KB, patch)
2026-02-14 21: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-14 21:36:48 UTC
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.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2026-02-14 21:38:20 UTC
Created attachment 268057 [details]
graphics/podofo: fix build with libc++ >= 20
Comment 2 Po-Chuan Hsieh freebsd_committer freebsd_triage 2026-02-15 07:43:41 UTC
LGTM. Could you please name the patch file as patch-libc++20 or so? Thanks.
Comment 3 commit-hook freebsd_committer freebsd_triage 2026-02-15 13:08:45 UTC
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(+)
Comment 4 commit-hook freebsd_committer freebsd_triage 2026-02-15 13:09:46 UTC
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(+)