Bug 293268 - textproc/lttoolbox: fix build with libc++ 21
Summary: textproc/lttoolbox: 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: Muhammad Moinur Rahman
URL:
Keywords:
Depends on:
Blocks: 292067
  Show dependency treegraph
 
Reported: 2026-02-18 20:15 UTC by Dimitry Andric
Modified: 2026-03-13 08:43 UTC (History)
0 users

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


Attachments
textproc/lttoolbox: fix build with libc++ 21 (3.17 KB, patch)
2026-02-18 20:16 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:15:23 UTC
With libc++ 21 textproc/lttoolbox fails to build, with errors similar to:

    In file included from /wrkdirs/usr/ports/textproc/lttoolbox/work/lttoolbox-3.8.0/lttoolbox/acx.cc:17:
    In file included from /wrkdirs/usr/ports/textproc/lttoolbox/work/lttoolbox-3.8.0/lttoolbox/acx.h:20:
    In file included from /wrkdirs/usr/ports/textproc/lttoolbox/work/lttoolbox-3.8.0/lttoolbox/sorted_vector.hpp:25:
    In file included from /usr/include/c++/v1/iterator:698:
    /usr/include/c++/v1/__iterator/ostream_iterator.h:62:20: error: invalid operands to binary expression ('ostream_type' (aka 'basic_ostream<char, std::char_traits<char>>') and 'const char')
       62 |     *__out_stream_ << __value;
          |     ~~~~~~~~~~~~~~ ^  ~~~~~~~
    /usr/local/include/utf8cpp/utf8/core.h:358:25: note: in instantiation of member function 'std::ostream_iterator<char>::operator=' requested here
      358 |             *(result++) = static_cast<octet_type>(cp);
          |                         ^
    /usr/local/include/utf8cpp/utf8/core.h:398:16: note: in instantiation of function template specialization 'utf8::internal::append<std::ostream_iterator<char>, char8_t>' requested here
      398 |         return append<octet_iterator, utfchar8_t>(cp, result);
          |                ^
    /usr/local/include/utf8cpp/utf8/checked.h:79:26: note: in instantiation of function template specialization 'utf8::internal::append<std::ostream_iterator<char>>' requested here
       79 |         return internal::append(cp, result);
          |                          ^
    /usr/local/include/utf8cpp/utf8/checked.h:248:28: note: in instantiation of function template specialization 'utf8::append<std::ostream_iterator<char>>' requested here
      248 |             result = utf8::append(cp, result);
          |                            ^
    /wrkdirs/usr/ports/textproc/lttoolbox/work/lttoolbox-3.8.0/lttoolbox/ustring.h:44:9: note: in instantiation of function template specialization 'utf8::utf16to8<char16_t *, std::ostream_iterator<char>>' requested here
       44 |   utf8::utf16to8(&c, &c+1, std::ostream_iterator<char>(ostr));
          |         ^

This is because ustring.h includes <iomanip> instead of <iostream>, and
libc++ 21 has reduced the number of transitive includes.

Replace <iomanip> with <iostream> to fix this.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2026-02-18 20:16:25 UTC
Created attachment 268171 [details]
textproc/lttoolbox: fix build with libc++ 21
Comment 2 commit-hook freebsd_committer freebsd_triage 2026-03-13 08:29:35 UTC
A commit in branch main references this bug:

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

commit b8cec75ffb19bd54b5d9d490dd3b2077e7a5ad42
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-02-18 20:15:45 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-03-13 08:28:22 +0000

    textproc/lttoolbox: fix build with libc++ 21

    With libc++ 21 textproc/lttoolbox fails to build, with errors similar to:

        In file included from /wrkdirs/usr/ports/textproc/lttoolbox/work/lttoolbox-3.8.0/lttoolbox/acx.cc:17:
        In file included from /wrkdirs/usr/ports/textproc/lttoolbox/work/lttoolbox-3.8.0/lttoolbox/acx.h:20:
        In file included from /wrkdirs/usr/ports/textproc/lttoolbox/work/lttoolbox-3.8.0/lttoolbox/sorted_vector.hpp:25:
        In file included from /usr/include/c++/v1/iterator:698:
        /usr/include/c++/v1/__iterator/ostream_iterator.h:62:20: error: invalid operands to binary expression ('ostream_type' (aka 'basic_ostream<char, std::char_traits<char>>') and 'const char')
           62 |     *__out_stream_ << __value;
              |     ~~~~~~~~~~~~~~ ^  ~~~~~~~
        /usr/local/include/utf8cpp/utf8/core.h:358:25: note: in instantiation of member function 'std::ostream_iterator<char>::operator=' requested here
          358 |             *(result++) = static_cast<octet_type>(cp);
              |                         ^
        /usr/local/include/utf8cpp/utf8/core.h:398:16: note: in instantiation of function template specialization 'utf8::internal::append<std::ostream_iterator<char>, char8_t>' requested here
          398 |         return append<octet_iterator, utfchar8_t>(cp, result);
              |                ^
        /usr/local/include/utf8cpp/utf8/checked.h:79:26: note: in instantiation of function template specialization 'utf8::internal::append<std::ostream_iterator<char>>' requested here
           79 |         return internal::append(cp, result);
              |                          ^
        /usr/local/include/utf8cpp/utf8/checked.h:248:28: note: in instantiation of function template specialization 'utf8::append<std::ostream_iterator<char>>' requested here
          248 |             result = utf8::append(cp, result);
              |                            ^
        /wrkdirs/usr/ports/textproc/lttoolbox/work/lttoolbox-3.8.0/lttoolbox/ustring.h:44:9: note: in instantiation of function template specialization 'utf8::utf16to8<char16_t *, std::ostream_iterator<char>>' requested here
           44 |   utf8::utf16to8(&c, &c+1, std::ostream_iterator<char>(ostr));
              |         ^

    This is because ustring.h includes <iomanip> instead of <iostream>, and
    libc++ 21 has reduced the number of transitive includes.

    Replace <iomanip> with <iostream> to fix this.

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

 textproc/lttoolbox/files/patch-lttoolbox_ustring.h (new) | 11 +++++++++++
 1 file changed, 11 insertions(+)
Comment 3 commit-hook freebsd_committer freebsd_triage 2026-03-13 08:29:36 UTC
A commit in branch 2026Q1 references this bug:

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

commit 61304f82357f9d6c2f4105d61a83b0dfb146c9fe
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-02-18 20:15:45 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-03-13 08:28:56 +0000

    textproc/lttoolbox: fix build with libc++ 21

    With libc++ 21 textproc/lttoolbox fails to build, with errors similar to:

        In file included from /wrkdirs/usr/ports/textproc/lttoolbox/work/lttoolbox-3.8.0/lttoolbox/acx.cc:17:
        In file included from /wrkdirs/usr/ports/textproc/lttoolbox/work/lttoolbox-3.8.0/lttoolbox/acx.h:20:
        In file included from /wrkdirs/usr/ports/textproc/lttoolbox/work/lttoolbox-3.8.0/lttoolbox/sorted_vector.hpp:25:
        In file included from /usr/include/c++/v1/iterator:698:
        /usr/include/c++/v1/__iterator/ostream_iterator.h:62:20: error: invalid operands to binary expression ('ostream_type' (aka 'basic_ostream<char, std::char_traits<char>>') and 'const char')
           62 |     *__out_stream_ << __value;
              |     ~~~~~~~~~~~~~~ ^  ~~~~~~~
        /usr/local/include/utf8cpp/utf8/core.h:358:25: note: in instantiation of member function 'std::ostream_iterator<char>::operator=' requested here
          358 |             *(result++) = static_cast<octet_type>(cp);
              |                         ^
        /usr/local/include/utf8cpp/utf8/core.h:398:16: note: in instantiation of function template specialization 'utf8::internal::append<std::ostream_iterator<char>, char8_t>' requested here
          398 |         return append<octet_iterator, utfchar8_t>(cp, result);
              |                ^
        /usr/local/include/utf8cpp/utf8/checked.h:79:26: note: in instantiation of function template specialization 'utf8::internal::append<std::ostream_iterator<char>>' requested here
           79 |         return internal::append(cp, result);
              |                          ^
        /usr/local/include/utf8cpp/utf8/checked.h:248:28: note: in instantiation of function template specialization 'utf8::append<std::ostream_iterator<char>>' requested here
          248 |             result = utf8::append(cp, result);
              |                            ^
        /wrkdirs/usr/ports/textproc/lttoolbox/work/lttoolbox-3.8.0/lttoolbox/ustring.h:44:9: note: in instantiation of function template specialization 'utf8::utf16to8<char16_t *, std::ostream_iterator<char>>' requested here
           44 |   utf8::utf16to8(&c, &c+1, std::ostream_iterator<char>(ostr));
              |         ^

    This is because ustring.h includes <iomanip> instead of <iostream>, and
    libc++ 21 has reduced the number of transitive includes.

    Replace <iomanip> with <iostream> to fix this.

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

    (cherry picked from commit b8cec75ffb19bd54b5d9d490dd3b2077e7a5ad42)

 textproc/lttoolbox/files/patch-lttoolbox_ustring.h (new) | 11 +++++++++++
 1 file changed, 11 insertions(+)