GCC 16 / libstdc++ implements the C++20 deletion of std::operator<<(std::ostream&, wchar_t). NCtext.cc and NCRichText.cc stream a wchar_t directly into a narrow std::ostream for debug output:
NCtext.cc:348:34: error: use of deleted function 'std::basic_ostream<char, _Traits>& std::operator<<(...wchar_t)' Add a patch casting both sites to char (the values are ASCII). Signed-off-by: Khem Raj <[email protected]> --- ...ar_t-before-streaming-to-narrow-ostr.patch | 46 +++++++++++++++++++ .../libyui/libyui-ncurses_4.6.2.bb | 1 + 2 files changed, 47 insertions(+) create mode 100644 meta-oe/recipes-graphics/libyui/files/0001-NCurses-cast-wchar_t-before-streaming-to-narrow-ostr.patch diff --git a/meta-oe/recipes-graphics/libyui/files/0001-NCurses-cast-wchar_t-before-streaming-to-narrow-ostr.patch b/meta-oe/recipes-graphics/libyui/files/0001-NCurses-cast-wchar_t-before-streaming-to-narrow-ostr.patch new file mode 100644 index 0000000000..3193147b4b --- /dev/null +++ b/meta-oe/recipes-graphics/libyui/files/0001-NCurses-cast-wchar_t-before-streaming-to-narrow-ostr.patch @@ -0,0 +1,46 @@ +From: Khem Raj <[email protected]> +Date: Wed, 25 Jun 2026 00:00:00 +0000 +Subject: [PATCH] NCurses: cast wchar_t before streaming to narrow ostream + +GCC 16 / libstdc++ implements the C++20 deletion of +std::operator<<(std::ostream&, wchar_t). Two debug-output sites stream a +wchar_t directly into a narrow std::ostream, which is now ill-formed: + + NCtext.cc:348:34: error: use of deleted function + 'std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, + _Traits>&, wchar_t)' + NCRichText.cc:521:59: error: use of deleted function ... wchar_t ... + +Both values are ASCII characters used purely for debug output, so cast +them to char to keep the previous behaviour. + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <[email protected]> +--- + src/NCRichText.cc | 2 +- + src/NCtext.cc | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/src/NCtext.cc ++++ b/src/NCtext.cc +@@ -345,7 +345,7 @@ + str << "[label" << obj.size() << ':' << obj[0].str(); + + if ( obj.hasHotkey() ) +- str << ':' << obj.hotkey() << " at " << obj.hotpos(); ++ str << ':' << static_cast<char>( obj.hotkey() ) << " at " << obj.hotpos(); + + return str << ']'; + } +--- a/src/NCRichText.cc ++++ b/src/NCRichText.cc +@@ -518,7 +518,7 @@ + break; + + default: +- yuiDebug() << "Ignoring " << *wch << std::endl; ++ yuiDebug() << "Ignoring " << static_cast<char>( *wch ) << std::endl; + } + ++wch; + } diff --git a/meta-oe/recipes-graphics/libyui/libyui-ncurses_4.6.2.bb b/meta-oe/recipes-graphics/libyui/libyui-ncurses_4.6.2.bb index d7c96492b2..43a79e26ff 100644 --- a/meta-oe/recipes-graphics/libyui/libyui-ncurses_4.6.2.bb +++ b/meta-oe/recipes-graphics/libyui/libyui-ncurses_4.6.2.bb @@ -5,6 +5,7 @@ LIC_FILES_CHKSUM = "file://../COPYING.lgpl-3;md5=e6a600fd5e1d9cbde2d983680233ad0 " SRC_URI = "git://github.com/libyui/libyui.git;branch=master;protocol=https \ + file://0001-NCurses-cast-wchar_t-before-streaming-to-narrow-ostr.patch \ " SRC_URI:append:class-target = " file://0001-Fix-the-error-of-can-t-find-header-file.patch"
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#127934): https://lists.openembedded.org/g/openembedded-devel/message/127934 Mute This Topic: https://lists.openembedded.org/mt/120018159/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
