Bug 2335638 - Header char16ptr.h breaks builds due to missing include
Summary: Header char16ptr.h breaks builds due to missing include
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: icu
Version: rawhide
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: -RETIRED-
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2340746 2340748 2340769
TreeView+ depends on / blocked
 
Reported: 2025-01-05 09:20 UTC by Vitaly
Modified: 2026-05-06 07:39 UTC (History)
6 users (show)

Fixed In Version: icu-76.1-2.fc42 icu-76.1-3.fc42
Clone Of:
Environment:
Last Closed: 2025-01-31 14:34:35 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Vitaly 2025-01-05 09:20:10 UTC
The /usr/include/unicode/char16ptr.h (line 317[1]) explicitly uses std::is_convertible_v but doesn't have the required #include <type_traits> in this public header. It breaks 4 dependent Fedora packages from being updated in Rawhide.

The regression was introduced by this commit:
https://github.com/unicode-org/icu/commit/72206495de9b76713107810f847d54e4c3ecd209

Can be trivially fixed by this patch:
--- a/icu4c/source/common/unicode/char16ptr.h
+++ b/icu4c/source/common/unicode/char16ptr.h
@@ -13,6 +13,7 @@

 #include <cstddef>
 #include <string_view>
+#include <type_traits>

 /**
  * \file 

The proper upstream fix:
https://github.com/unicode-org/icu/commit/8655718531e478428151162313f67432ed28cd9d

Please backport this fix to Rawhide.

Reproducible: Always

Steps to Reproduce:
1. Try to build dependent packages against libicu 76.1.
2.
3.
Actual Results:  
Build failure:

In file included from /usr/include/unicode/unistr.h:37,
                 from /usr/include/unicode/regex.h:52,
                 from ../src/tools/regexTools.cpp:22:
/usr/include/unicode/char16ptr.h:317:10: error: ‘is_convertible_v’ is not a member of ‘std’; did you mean ‘is_convertible’?
  317 |     std::is_convertible_v<T, std::u16string_view>
      |          ^~~~~~~~~~~~~~~~
      |          is_convertible
/usr/include/unicode/char16ptr.h:317:28: error: expected primary-expression before ‘,’ token
  317 |     std::is_convertible_v<T, std::u16string_view>
      |                            ^
/usr/include/unicode/char16ptr.h:331:13: error: ‘u16string_view’ in namespace ‘std’ does not name a type; did you mean ‘u16string’?
  331 | inline std::u16string_view toU16StringView(std::u16string_view sv) { return sv; }
      |             ^~~~~~~~~~~~~~
      |             u16string

Expected Results:  
Successful build.

Comment 1 -RETIRED- 2025-01-06 13:14:52 UTC
I'd rather refrain from adding https://github.com/unicode-org/icu/commit/8655718531e478428151162313f67432ed28cd9d because it is invasive doing more than solving the problem, i.e. all that header-only localpointer which may as well depend on other work for their next release, and add the include <type_traits> instead.

Comment 2 Fedora Update System 2025-01-06 15:30:36 UTC
FEDORA-2025-b4cb1c003d (icu-76.1-2.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-b4cb1c003d

Comment 3 Fedora Update System 2025-01-06 18:07:55 UTC
FEDORA-2025-b4cb1c003d (icu-76.1-2.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 4 Vitaly 2025-01-07 08:42:09 UTC
Reopening the issue as libzim and libkiwix packages are still FTBFS. Looks like more headers need to be fixed:

stringpiece.h is missing #include <type_traits>.
unistr.h is missing both #include <string_view> and #include <type_traits>.

You can test icu in COPR using these packages.

Comment 6 -RETIRED- 2025-01-07 16:22:55 UTC
icu/source/common/unicode/stringpiece.h _has_ #include <type_traits>
icu/source/common/unicode/unistr.h _has_ #include <string_view> but not #include <type_traits>

May it be something else is wrong?

Comment 7 Vitaly 2025-01-08 08:34:31 UTC
> icu/source/common/unicode/stringpiece.h _has_ #include <type_traits>

In file included from /usr/include/unicode/unistr.h:40:
/usr/include/unicode/stringpiece.h:135:23: error: ‘is_same_v’ is not a member of ‘std’; did you mean ‘is_same’?
  135 |                 (std::is_same_v<decltype(T().data()), const char*>
      |                       ^~~~~~~~~
      |                       is_same

> icu/source/common/unicode/unistr.h _has_ #include <string_view> but not #include <type_traits>

In file included from /usr/include/unicode/unistr.h:40:
/usr/include/unicode/stringpiece.h:135:23: error: ‘is_same_v’ is not a member of ‘std’; did you mean ‘is_same’?
  135 |                 (std::is_same_v<decltype(T().data()), const char*>
      |                       ^~~~~~~~~
      |                       is_same
/usr/include/unicode/stringpiece.h:135:66: error: template argument 1 is invalid
  135 |                 (std::is_same_v<decltype(T().data()), const char*>
      |                                                                  ^
/usr/include/unicode/stringpiece.h:139:17: error: expected ‘>’ before ‘)’ token
  139 |                 ) &&
      |                 ^
/usr/include/unicode/stringpiece.h:139:17: error: expected unqualified-id before ‘)’ token
/usr/include/unicode/stringpiece.h:185:19: error: expected type-specifier
  185 |   inline operator std::string_view() const {
      |                   ^~~
/usr/include/unicode/unistr.h:3035:19: error: expected type-specifier
 3035 |   inline operator std::u16string_view() const {
      |                   ^~~
/usr/include/unicode/unistr.h:3755:60: error: ‘std::u16string_view’ has not been declared
 3755 |   static UnicodeString readOnlyAliasFromU16StringView(std::u16string_view text);
      |                                                            ^~~~~~~~~~~~~~
/usr/include/unicode/unistr.h:3871:64: error: ‘std::u16string_view’ has not been declared
 3871 |   UnicodeString& doReplace(int32_t start, int32_t length, std::u16string_view src);
      |                                                                ^~~~~~~~~~~~~~
/usr/include/unicode/unistr.h:3875:32: error: ‘std::u16string_view’ has not been declared
 3875 |   UnicodeString& doAppend(std::u16string_view src);
      |                                ^~~~~~~~~~~~~~
/usr/include/unicode/unistr.h: In member function ‘bool icu_76::UnicodeString::operator==(const S&) const’:
/usr/include/unicode/unistr.h:348:10: error: ‘u16string_view’ is not a member of ‘std’; did you mean ‘u16string’?
  348 |     std::u16string_view sv(internal::toU16StringView(text));
      |          ^~~~~~~~~~~~~~
      |          u16string

> May it be something else is wrong?

Maybe. You can easily reproduce this issue by building libkiwix package in mock or COPR for Rawhide.

Comment 8 Jan Grulich 2025-01-14 17:24:21 UTC
I have same problem with qt5-qtwebkit:

>In file included from /usr/include/unicode/uset.h:37,>
>                 from /usr/include/unicode/unorm2.h:35,>
>                 from /usr/include/unicode/unorm.h:25,>
>                 from /usr/include/unicode/ucol.h:17,>
>                 from /builddir/build/BUILD/qt5-qtwebkit-5.212.0-build/qtwebkit-5.212.0-alpha4/Source/WTF/wtf/unicode/icu/CollatorICU.cpp:37:>
>/usr/include/unicode/char16ptr.h:318:10: error: ‘is_convertible_v’ is not a member of ‘std’; did you mean ‘is_convertible’?>
>  318 |     std::is_convertible_v<T, std::u16string_view>>
>      |          ^~~~~~~~~~~~~~~~>
>      |          is_convertible>
>/usr/include/unicode/char16ptr.h:318:28: error: expected primary-expression before ‘,’ token>
>  318 |     std::is_convertible_v<T, std::u16string_view>>
>      |                            ^>
>/usr/include/unicode/char16ptr.h:332:13: error: ‘u16string_view’ in namespace ‘std’ does not name a type; did you mean ‘u16string’?>
>  332 | inline std::u16string_view toU16StringView(std::u16string_view sv) { return sv; }>
>      |             ^~~~~~~~~~~~~~>
>      |             u16string>
>/usr/include/unicode/char16ptr.h:340:13: error: ‘u16string_view’ in namespace ‘std’ does not name a type; did you mean ‘u16string’?>
>  340 | inline std::u16string_view toU16StringView(std::basic_string_view<uint16_t> sv) {>
>      |             ^~~~~~~~~~~~~~>
>      |             u16string>
>/usr/include/unicode/char16ptr.h:361:36: error: ‘enable_if_t’ in namespace ‘std’ does not name a template type>
>  361 |           typename = typename std::enable_if_t<!std::is_pointer_v<std::remove_reference_t<T>>>>>
>      |                                    ^~~~~~~~~~~>
>/usr/include/unicode/char16ptr.h:361:36: note: ‘std::enable_if_t’ is only available from C++14 onwards>
>/usr/include/unicode/char16ptr.h:361:47: error: expected ‘>’ before ‘<’ token>
>  361 |           typename = typename std::enable_if_t<!std::is_pointer_v<std::remove_reference_t<T>>>>>
>      |                                               ^>
>/usr/include/unicode/char16ptr.h:362:13: error: ‘u16string_view’ in namespace ‘std’ does not name a type; did you mean ‘u16string’?>
>  362 | inline std::u16string_view toU16StringViewNullable(const T& text) {>
>      |             ^~~~~~~~~~~~~~>
>      |             u16string>
>/usr/include/unicode/char16ptr.h:371:36: error: ‘enable_if_t’ in namespace ‘std’ does not name a template type>
>  371 |           typename = typename std::enable_if_t<std::is_pointer_v<std::remove_reference_t<T>>>,>
>      |                                    ^~~~~~~~~~~>
>/usr/include/unicode/char16ptr.h:371:36: note: ‘std::enable_if_t’ is only available from C++14 onwards>
>/usr/include/unicode/char16ptr.h:371:47: error: expected ‘>’ before ‘<’ token>
>  371 |           typename = typename std::enable_if_t<std::is_pointer_v<std::remove_reference_t<T>>>,>
>      |                                               ^>
>/usr/include/unicode/char16ptr.h:373:13: error: ‘u16string_view’ in namespace ‘std’ does not name a type; did you mean ‘u16string’?>
>  373 | inline std::u16string_view toU16StringViewNullable(const T& text) {>
>      |             ^~~~~~~~~~~~~~>
>      |             u16string>
>In file included from /usr/include/unicode/uset.h:38:>
>/usr/include/unicode/localpointer.h:561:26: error: parameter declared ‘auto’>
>  561 | template <typename Type, auto closeFunction>>
>      |                          ^~~~>
>/usr/include/unicode/localpointer.h:573:76: error: template argument 2 is invalid>
>  573 |     explicit LocalOpenPointer(std::unique_ptr<Type, decltype(closeFunction)> &&p)>
>      |                                                                            ^>
>/usr/include/unicode/localpointer.h:583:78: error: template argument 2 is invalid>
>  583 |     LocalOpenPointer &operator=(std::unique_ptr<Type, decltype(closeFunction)> &&p) {>
>      |                                                                              ^>
>/usr/include/unicode/localpointer.h:599:59: error: template argument 2 is invalid>
>  599 |     operator std::unique_ptr<Type, decltype(closeFunction)> () && {>
>      |                                                           ^>
>In file included from /usr/include/unicode/unistr.h:40,>
>                 from /usr/include/unicode/uset.h:39:>
>/usr/include/unicode/stringpiece.h:134:29: error: ‘enable_if_t’ in namespace ‘std’ does not name a template type>
>  134 |             typename = std::enable_if_t<>
>      |                             ^~~~~~~~~~~>
>/usr/include/unicode/stringpiece.h:134:24: note: ‘std::enable_if_t’ is only available from C++14 onwards>
>  134 |             typename = std::enable_if_t<>
>      |                        ^~~>
>/usr/include/unicode/stringpiece.h:134:40: error: expected ‘>’ before ‘<’ token>
>  134 |             typename = std::enable_if_t<>
>      |                                        ^>
>/usr/include/unicode/stringpiece.h:185:19: error: expected type-specifier>
>  185 |   inline operator std::string_view() const {>
>      |                   ^~~>
>/usr/include/unicode/unistr.h:346:40: error: ‘enable_if_t’ in namespace ‘std’ does not name a template type>
>  346 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>>
>      |                                        ^~~~~~~~~~~>
>/usr/include/unicode/unistr.h:346:35: note: ‘std::enable_if_t’ is only available from C++14 onwards>
>  346 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>>
>      |                                   ^~~>
>/usr/include/unicode/unistr.h:346:51: error: expected ‘>’ before ‘<’ token>
>  346 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>>
>      |                                                   ^>
>/usr/include/unicode/unistr.h:381:40: error: ‘enable_if_t’ in namespace ‘std’ does not name a template type>
>  381 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>>
>      |                                        ^~~~~~~~~~~>
>/usr/include/unicode/unistr.h:381:35: note: ‘std::enable_if_t’ is only available from C++14 onwards>
>  381 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>>
>      |                                   ^~~>
>/usr/include/unicode/unistr.h:381:51: error: expected ‘>’ before ‘<’ token>
>  381 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>>
>      |                                                   ^>
>/usr/include/unicode/unistr.h:1959:40: error: ‘enable_if_t’ in namespace ‘std’ does not name a template type>
> 1959 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>>
>      |                                        ^~~~~~~~~~~>
>/usr/include/unicode/unistr.h:1959:35: note: ‘std::enable_if_t’ is only available from C++14 onwards>
> 1959 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>>
>      |                                   ^~~>
>/usr/include/unicode/unistr.h:1959:51: error: expected ‘>’ before ‘<’ token>
> 1959 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>>
>      |                                                   ^>
>/usr/include/unicode/unistr.h:2226:40: error: ‘enable_if_t’ in namespace ‘std’ does not name a template type>
> 2226 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>>
>      |                                        ^~~~~~~~~~~>
>/usr/include/unicode/unistr.h:2226:35: note: ‘std::enable_if_t’ is only available from C++14 onwards>
> 2226 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>>
>      |                                   ^~~>
>/usr/include/unicode/unistr.h:2226:51: error: expected ‘>’ before ‘<’ token>
> 2226 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>>
>      |                                                   ^>
>/usr/include/unicode/unistr.h:2299:40: error: ‘enable_if_t’ in namespace ‘std’ does not name a template type>
> 2299 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>>
>      |                                        ^~~~~~~~~~~>
>/usr/include/unicode/unistr.h:2299:35: note: ‘std::enable_if_t’ is only available from C++14 onwards>
> 2299 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>>
>      |                                   ^~~>
>/usr/include/unicode/unistr.h:2299:51: error: expected ‘>’ before ‘<’ token>
> 2299 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>>
>      |                                                   ^>
>/usr/include/unicode/unistr.h:3035:19: error: expected type-specifier>
> 3035 |   inline operator std::u16string_view() const {>
>      |                   ^~~>
>/usr/include/unicode/unistr.h:3273:40: error: ‘enable_if_t’ in namespace ‘std’ does not name a template type>
> 3273 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>>
>      |                                        ^~~~~~~~~~~>
>/usr/include/unicode/unistr.h:3273:35: note: ‘std::enable_if_t’ is only available from C++14 onwards>
> 3273 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>>
>      |                                   ^~~>
>/usr/include/unicode/unistr.h:3273:51: error: expected ‘>’ before ‘<’ token>
> 3273 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>>
>      |                                                   ^>
>/usr/include/unicode/unistr.h:3599:40: error: ‘enable_if_t’ in namespace ‘std’ does not name a template type>
> 3599 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>>
>      |                                        ^~~~~~~~~~~>
>/usr/include/unicode/unistr.h:3599:35: note: ‘std::enable_if_t’ is only available from C++14 onwards>
> 3599 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>>
>      |                                   ^~~>
>/usr/include/unicode/unistr.h:3599:51: error: expected ‘>’ before ‘<’ token>
> 3599 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>>
>      |                                                   ^>
>/usr/include/unicode/unistr.h:3755:60: error: ‘std::u16string_view’ has not been declared>
> 3755 |   static UnicodeString readOnlyAliasFromU16StringView(std::u16string_view text);>
>      |                                                            ^~~~~~~~~~~~~~>
>/usr/include/unicode/unistr.h:3871:64: error: ‘std::u16string_view’ has not been declared>
> 3871 |   UnicodeString& doReplace(int32_t start, int32_t length, std::u16string_view src);>
>      |                                                                ^~~~~~~~~~~~~~>
>/usr/include/unicode/unistr.h:3875:32: error: ‘std::u16string_view’ has not been declared>
> 3875 |   UnicodeString& doAppend(std::u16string_view src);>
>      |                                ^~~~~~~~~~~~~~>
>/usr/include/unicode/unistr.h: In member function ‘bool icu_76::UnicodeString::operator==(const S&) const’:>
>/usr/include/unicode/unistr.h:348:10: error: ‘u16string_view’ is not a member of ‘std’; did you mean ‘u16string’?>
>  348 |     std::u16string_view sv(internal::toU16StringView(text));>
>      |          ^~~~~~~~~~~~~~>
>      |          u16string>
>/usr/include/unicode/unistr.h:350:46: error: ‘sv’ was not declared in this scope>
>  350 |     return !isBogus() && (len = length()) == sv.length() && doEquals(sv.data(), len);>
>      |                                              ^~>
>/usr/include/unicode/unistr.h: In member function ‘icu_76::UnicodeString& icu_76::UnicodeString::operator=(const S&)’:>
>/usr/include/unicode/unistr.h:1962:45: error: ‘toU16StringView’ is not a member of ‘icu_76::internal’>
> 1962 |     return doReplace(0, length(), internal::toU16StringView(src));>
>      |                                             ^~~~~~~~~~~~~~~>
>/usr/include/unicode/unistr.h: In member function ‘icu_76::UnicodeString& icu_76::UnicodeString::operator+=(const S&)’:>
>/usr/include/unicode/unistr.h:2228:31: error: ‘toU16StringView’ is not a member of ‘icu_76::internal’>
> 2228 |     return doAppend(internal::toU16StringView(src));>
>      |                               ^~~~~~~~~~~~~~~>
>/usr/include/unicode/unistr.h: In member function ‘icu_76::UnicodeString& icu_76::UnicodeString::append(const S&)’:>
>/usr/include/unicode/unistr.h:2301:31: error: ‘toU16StringView’ is not a member of ‘icu_76::internal’>
> 2301 |     return doAppend(internal::toU16StringView(src));>
>      |                               ^~~~~~~~~~~~~~~>
>/usr/include/unicode/unistr.h: In constructor ‘icu_76::UnicodeString::UnicodeString(const S&)’:>
>/usr/include/unicode/unistr.h:3276:24: error: ‘toU16StringViewNullable’ is not a member of ‘icu_76::internal’>
> 3276 |     doAppend(internal::toU16StringViewNullable(text));>
>      |                        ^~~~~~~~~~~~~~~~~~~~~~~>
>/usr/include/unicode/unistr.h: In static member function ‘static icu_76::UnicodeString icu_76::UnicodeString::readOnlyAlias(const S&)’:>
>/usr/include/unicode/unistr.h:3601:53: error: ‘toU16StringView’ is not a member of ‘icu_76::internal’>
> 3601 |     return readOnlyAliasFromU16StringView(internal::toU16StringView(text));>
>      |                                                     ^~~~~~~~~~~~~~~>
>/usr/include/unicode/unistr.h: At global scope:>
>/usr/include/unicode/unistr.h:4116:38: error: ‘enable_if_t’ in namespace ‘std’ does not name a template type>
> 4116 | template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>>
>      |                                      ^~~~~~~~~~~>
>/usr/include/unicode/unistr.h:4116:33: note: ‘std::enable_if_t’ is only available from C++14 onwards>
> 4116 | template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>>
>      |                                 ^~~>
>/usr/include/unicode/unistr.h:4116:49: error: expected ‘>’ before ‘<’ token>
> 4116 | template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>>
>      |                                                 ^>
>/usr/include/unicode/unistr.h: In function ‘icu_76::UnicodeString icu_76::operator+(const UnicodeString&, const S&)’:>
>/usr/include/unicode/unistr.h:4118:46: error: ‘toU16StringView’ is not a member of ‘icu_76::internal’>
> 4118 |   return unistr_internalConcat(s1, internal::toU16StringView(s2));>
>      |                                              ^~~~~~~~~~~~~~~>
>/usr/include/unicode/unistr.h: At global scope:>
>/usr/include/unicode/unistr.h:4125:53: error: ‘std::u16string_view’ has not been declared>
> 4125 | unistr_internalConcat(const UnicodeString &s1, std::u16string_view s2);>
>      |                                                     ^~~~~~~~~~~~~~>
>/usr/include/unicode/uset.h:361:1: note: invalid template non-type parameter>
>  361 | U_DEFINE_LOCAL_OPEN_POINTER(LocalUSetPointer, USet, uset_close);>
>      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~>
>/usr/include/unicode/uset.h:1655:10: error: ‘u16string_view’ in namespace ‘std’ does not name a type; did you mean ‘u16string’?>
> 1655 |     std::u16string_view operator*() const {>
>      |          ^~~~~~~~~~~~~~>
>      |          u16string>
>/usr/include/unicode/unorm2.h:284:1: note: invalid template non-type parameter>
>  284 | U_DEFINE_LOCAL_OPEN_POINTER(LocalUNormalizer2Pointer, UNormalizer2, unorm2_close);>
>      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~>
>/usr/include/unicode/uenum.h:69:1: note: invalid template non-type parameter>
>   69 | U_DEFINE_LOCAL_OPEN_POINTER(LocalUEnumerationPointer, UEnumeration, uenum_close);>
>      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~>
>/usr/include/unicode/ucol.h:553:1: note: invalid template non-type parameter>
>  553 | U_DEFINE_LOCAL_OPEN_POINTER(LocalUCollatorPointer, UCollator, ucol_close);>
>      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~>
>/usr/include/unicode/ucol.h:1553:25: error: ‘enable_if_t’ in namespace ‘std’ does not name a template type>
> 1553 |         typename = std::enable_if_t<ConvertibleToU16StringView<T> && ConvertibleToU16StringView<U>>>>
>      |                         ^~~~~~~~~~~>
>/usr/include/unicode/ucol.h:1553:20: note: ‘std::enable_if_t’ is only available from C++14 onwards>
> 1553 |         typename = std::enable_if_t<ConvertibleToU16StringView<T> && ConvertibleToU16StringView<U>>>>
>      |                    ^~~>
>/usr/include/unicode/ucol.h:1553:36: error: expected ‘>’ before ‘<’ token>
> 1553 |         typename = std::enable_if_t<ConvertibleToU16StringView<T> && ConvertibleToU16StringView<U>>>>
>      |                                    ^>
>/usr/include/unicode/ucol.h:1559:26: error: ‘std::string_view’ has not been declared>
> 1559 |     bool operator()(std::string_view lhs, std::string_view rhs) const {>
>      |                          ^~~~~~~~~~~>
>/usr/include/unicode/ucol.h:1559:48: error: ‘std::string_view’ has not been declared>
> 1559 |     bool operator()(std::string_view lhs, std::string_view rhs) const {>
>      |                                                ^~~~~~~~~~~>

Comment 9 -RETIRED- 2025-01-16 18:05:46 UTC
Ok I'll try the invasive commit patch mentioned earlier that also fiddles with namespace and symbol visibility.

Comment 10 -RETIRED- 2025-01-16 21:39:43 UTC
That resulted in a horrible series of nine (omitting two) ICU-22954 upstream patches. Please try when ready.

Comment 11 Fedora Update System 2025-01-16 21:50:57 UTC
FEDORA-2025-8686024a95 (icu-76.1-3.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-8686024a95

Comment 12 Fedora Update System 2025-01-16 23:34:56 UTC
FEDORA-2025-8686024a95 (icu-76.1-3.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Jan Grulich 2025-01-17 09:44:09 UTC
Sadly, I can still reproduce the same build issue with icu-76.1-3.fc42.

Comment 14 Jan Grulich 2025-01-17 09:53:49 UTC
For the record, I also tried a scratch build of libzim as mentioned by Vitaly and it doesn't build either, it still fails for the same reason. I expect possibly more packages to FTBS now when the mass rebuild is ongoing.

Comment 15 Artur Frenszek-Iwicki 2025-01-17 12:51:54 UTC
Yeah, I've had one of my packages fail with the same error regarding "is_same" as posted by Vitaly, plus a template instantiation error:

> In file included from /usr/include/unicode/uenum.h:25,
>                  from /usr/include/unicode/ucsdet.h:28,
>                  from /builddir/build/BUILD/liblcf-0.8-build/liblcf-0.8/src/reader_util.cpp:14:
> /usr/include/unicode/localpointer.h:561:26: error: ‘auto’ parameter not permitted in this context
>   561 | template <typename Type, auto closeFunction>
>       |                          ^~~~
> /usr/include/unicode/localpointer.h:573:76: error: template argument 2 is invalid [-Wtemplate-body]
>   573 |     explicit LocalOpenPointer(std::unique_ptr<Type, decltype(closeFunction)> &&p)
>       |                                                                            ^
> /usr/include/unicode/localpointer.h:583:78: error: template argument 2 is invalid [-Wtemplate-body]
>   583 |     LocalOpenPointer &operator=(std::unique_ptr<Type, decltype(closeFunction)> &&p) {
>       |                                                                              ^
> /usr/include/unicode/localpointer.h:599:59: error: template argument 2 is invalid [-Wtemplate-body]
>   599 |     operator std::unique_ptr<Type, decltype(closeFunction)> () && {
>       |                                                           ^
> /usr/include/unicode/uenum.h:69:1: note: invalid template non-type parameter
>    69 | U_DEFINE_LOCAL_OPEN_POINTER(LocalUEnumerationPointer, UEnumeration, uenum_close);
>       | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/include/unicode/ucsdet.h:109:1: note: invalid template non-type parameter
>   109 | U_DEFINE_LOCAL_OPEN_POINTER(LocalUCharsetDetectorPointer, UCharsetDetector, ucsdet_close);
>       | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/include/unicode/ucnv.h:597:1: note: invalid template non-type parameter
>   597 | U_DEFINE_LOCAL_OPEN_POINTER(LocalUConverterPointer, UConverter, ucnv_close);
>       | ^~~~~~~~~~~~~~~~~~~~~~~~~~~

Comment 16 Vitaly 2025-01-21 09:35:17 UTC
If anyone has an account on the icu's bug tracker, please report this issue directly to the upstream.

Comment 17 Jan Grulich 2025-01-23 11:17:23 UTC
I fixed qt5-qtwebkit build with https://src.fedoraproject.org/rpms/qt5-qtwebkit/blob/rawhide/f/qtwebkit-icu76.patch, basically following webkit upstream. Not sure a similar fix is applicable for the other packages.

Comment 18 Vitaly 2025-01-23 13:47:20 UTC
> Not sure a similar fix is applicable for the other packages.

These definitions should be exported by the icu package.

Comment 19 -RETIRED- 2025-01-23 16:04:42 UTC
Exported how?
Note that the latest series of patches I added are draft ICU 77 and make use of define U_SHOW_CPLUSPLUS_HEADER_API additionally to U_SHOW_CPLUSPLUS_API that already existed. In source/common/unicode/utypes.h (installed as /usr/include/unicode/utypes.h) line 59 ff U_SHOW_CPLUSPLUS_API is set to 1 if __cplusplus is defined and U_SHOW_CPLUSPLUS_API wasn't defined. U_SHOW_CPLUSPLUS_HEADER_API is meant to enable C++ header-only API and also set to 1 for __cplusplus and U_SHOW_CPLUSPLUS_HEADER_API wasn't defined. Both are unconditionally set to 0 for non-__cplusplus.

It may be I missed to identify and add yet another relevant patch. I'll investigate further.

Comment 20 Vitaly 2025-01-23 18:34:35 UTC
> It may be I missed to identify and add yet another relevant patch. I'll investigate further.

Please escalate this issue to upstream.

Comment 21 -RETIRED- 2025-01-23 18:53:23 UTC
I didn't find relevant differences. All occurrences of #include <type_traits> and U_SHOW_CPLUSPLUS_HEADER_API are equal upstream and patched package sources now. source/common/unicode/localpointer.h is equal, source/common/unicode/unistr.h is equal.

I guess the two defines mentioned by Jan is the current workaround.

To escalate to upstream I'll need to create an Atlassian account. Could do on or after the weekend.

Comment 22 -RETIRED- 2025-01-27 22:30:13 UTC
Found my old account again and even working..
https://unicode-org.atlassian.net/browse/ICU-23023

Comment 23 Vitaly 2025-01-31 12:54:19 UTC
> ICU 76 requires C+17.

Yes, switching the project to C++17 solves this problem, but I had another one during linkage:

```
/usr/bin/ld: /tmp/cc4SgzhV.ltrans2.ltrans.o: in function `icu_76::StringByteSink<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~StringByteSink()':
/usr/include/unicode/bytestream.h:267:(.text+0x5db): undefined reference to `icu_76::ByteSink::~ByteSink()'
/usr/bin/ld: /tmp/cc4SgzhV.ltrans2.ltrans.o: in function `zim::removeAccents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/builddir/build/BUILD/libzim-9.2.3-build/libzim-9.2.3/redhat-linux-build/../src/tools.cpp:233:(.text+0x3c83): undefined reference to `ucnv_setDefaultName_76'
/usr/bin/ld: /builddir/build/BUILD/libzim-9.2.3-build/libzim-9.2.3/redhat-linux-build/../src/tools.cpp:237:(.text+0x3cb2): undefined reference to `icu_76::UnicodeString::UnicodeString(char const*)'
/usr/bin/ld: /tmp/cc4SgzhV.ltrans2.ltrans.o: in function `zim::removeAccents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/usr/include/unicode/unistr.h:1779:(.text+0x3d71): undefined reference to `icu_76::UnicodeString::toUTF8(icu_76::ByteSink&) const'
/usr/bin/ld: /tmp/cc4SgzhV.ltrans2.ltrans.o: in function `zim::removeAccents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/usr/include/unicode/bytestream.h:267:(.text+0x3d84): undefined reference to `icu_76::ByteSink::~ByteSink()'
/usr/bin/ld: /tmp/cc4SgzhV.ltrans2.ltrans.o: in function `zim::removeAccents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/builddir/build/BUILD/libzim-9.2.3-build/libzim-9.2.3/redhat-linux-build/../src/tools.cpp:261:(.text+0x3d90): undefined reference to `icu_76::UnicodeString::~UnicodeString()'
/usr/bin/ld: /tmp/cc4SgzhV.ltrans2.ltrans.o: in function `zim::removeAccents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/usr/include/unicode/unistr.h:4182:(.text+0x3dda): undefined reference to `vtable for icu_76::UnicodeString'
/usr/bin/ld: /usr/include/unicode/unistr.h:1779:(.text+0x3e0b): undefined reference to `icu_76::UnicodeString::toUTF8(icu_76::ByteSink&) const'
/usr/bin/ld: /tmp/cc4SgzhV.ltrans2.ltrans.o: in function `zim::removeAccents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/usr/include/unicode/bytestream.h:267:(.text+0x3e25): undefined reference to `icu_76::ByteSink::~ByteSink()'
/usr/bin/ld: /tmp/cc4SgzhV.ltrans2.ltrans.o: in function `zim::removeAccents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/builddir/build/BUILD/libzim-9.2.3-build/libzim-9.2.3/redhat-linux-build/../src/tools.cpp:251:(.text+0x3e49): undefined reference to `icu_76::UnicodeString::getChar32Limit(int) const'
/usr/bin/ld: /tmp/cc4SgzhV.ltrans2.ltrans.o: in function `zim::removeAccents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/usr/include/unicode/unistr.h:4741:(.text+0x3e98): undefined reference to `icu_76::UnicodeString::doReplace(int, int, icu_76::UnicodeString const&, int, int)'
/usr/bin/ld: /tmp/cc4SgzhV.ltrans2.ltrans.o: in function `zim::removeAccents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/builddir/build/BUILD/libzim-9.2.3-build/libzim-9.2.3/redhat-linux-build/../src/tools.cpp:259:(.text+0x3f14): undefined reference to `icu_76::UnicodeString::~UnicodeString()'
/usr/bin/ld: /builddir/build/BUILD/libzim-9.2.3-build/libzim-9.2.3/redhat-linux-build/../src/tools.cpp:236:(.text+0x3f2c): undefined reference to `icu_76::UnicodeString::UnicodeString(char const*)'
/usr/bin/ld: /builddir/build/BUILD/libzim-9.2.3-build/libzim-9.2.3/redhat-linux-build/../src/tools.cpp:236:(.text+0x3f74): undefined reference to `icu_76::UnicodeString::~UnicodeString()'
/usr/bin/ld: /tmp/cc4SgzhV.ltrans2.ltrans.o: in function `icu_76::StringByteSink<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~StringByteSink()':
/usr/include/unicode/bytestream.h:267:(.text+0x5af): undefined reference to `icu_76::ByteSink::~ByteSink()'
/usr/bin/ld: /tmp/cc4SgzhV.ltrans2.ltrans.o: in function `icu_76::StringByteSink<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~StringByteSink()':
/usr/include/unicode/bytestream.h:267:(.text+0x5e5): undefined reference to `icu_76::UMemory::operator delete(void*)'
/usr/bin/ld: /tmp/cc4SgzhV.ltrans2.ltrans.o: in function `zim::setICUDataDirectory(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/builddir/build/BUILD/libzim-9.2.3-build/libzim-9.2.3/redhat-linux-build/../src/tools.cpp:294:(.text+0x4018): undefined reference to `u_setDataDirectory_76'
/usr/bin/ld: /tmp/cc4SgzhV.ltrans2.ltrans.o: in function `zim::removeAccents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) [clone .cold]':
/usr/include/unicode/bytestream.h:287:(.text.unlikely+0x5be): undefined reference to `icu_76::ByteSink::~ByteSink()'
/usr/bin/ld: /tmp/cc4SgzhV.ltrans2.ltrans.o: in function `zim::removeAccents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/builddir/build/BUILD/libzim-9.2.3-build/libzim-9.2.3/redhat-linux-build/../src/tools.cpp:261:(.text.unlikely+0x5d2): undefined reference to `icu_76::UnicodeString::~UnicodeString()'
/usr/bin/ld: /builddir/build/BUILD/libzim-9.2.3-build/libzim-9.2.3/redhat-linux-build/../src/tools.cpp:236:(.text.unlikely+0x5f2): undefined reference to `icu_76::UnicodeString::~UnicodeString()'
/usr/bin/ld: /tmp/cc4SgzhV.ltrans2.ltrans.o: in function `zim::removeAccents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) [clone .cold]':
/usr/include/unicode/bytestream.h:287:(.text.unlikely+0x626): undefined reference to `icu_76::ByteSink::~ByteSink()'
/usr/bin/ld: /tmp/cc4SgzhV.ltrans2.ltrans.o: in function `zim::removeAccents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/builddir/build/BUILD/libzim-9.2.3-build/libzim-9.2.3/redhat-linux-build/../src/tools.cpp:259:(.text.unlikely+0x62e): undefined reference to `icu_76::UnicodeString::~UnicodeString()'
/usr/bin/ld: /tmp/cc4SgzhV.ltrans2.ltrans.o: in function `zim::removeAccents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) [clone .cold]':
/usr/include/unicode/bytestream.h:267:(.text.unlikely+0x64a): undefined reference to `icu_76::ByteSink::~ByteSink()'
/usr/bin/ld: /usr/include/unicode/bytestream.h:267:(.text.unlikely+0x667): undefined reference to `icu_76::ByteSink::~ByteSink()'
/usr/bin/ld: /tmp/cc4SgzhV.ltrans2.ltrans.o:(.data.rel.ro+0x2c0): undefined reference to `typeinfo for icu_76::ByteSink'
/usr/bin/ld: /tmp/cc4SgzhV.ltrans2.ltrans.o:(.data.rel.ro+0x4c0): undefined reference to `icu_76::ByteSink::GetAppendBuffer(int, int, char*, int, int*)'
/usr/bin/ld: /tmp/cc4SgzhV.ltrans2.ltrans.o:(.data.rel.ro+0x4c8): undefined reference to `icu_76::ByteSink::Flush()'
/usr/bin/ld: /tmp/cc4SgzhV.ltrans4.ltrans.o: in function `zim::SuggestionDataBase::initXapianDb()':
/builddir/build/BUILD/libzim-9.2.3-build/libzim-9.2.3/redhat-linux-build/../src/suggestion.cpp:88:(.text+0x8238): undefined reference to `icu_76::Locale::Locale(char const*, char const*, char const*, char const*)'
/usr/bin/ld: /builddir/build/BUILD/libzim-9.2.3-build/libzim-9.2.3/redhat-linux-build/../src/suggestion.cpp:96:(.text+0x82a1): undefined reference to `icu_76::Locale::~Locale()'
/usr/bin/ld: /tmp/cc4SgzhV.ltrans4.ltrans.o: in function `zim::InternalDataBase::InternalDataBase(std::vector<zim::Archive, std::allocator<zim::Archive> > const&, bool)':
/builddir/build/BUILD/libzim-9.2.3-build/libzim-9.2.3/redhat-linux-build/../src/search.cpp:96:(.text+0x935a): undefined reference to `icu_76::Locale::Locale(char const*, char const*, char const*, char const*)'
/usr/bin/ld: /builddir/build/BUILD/libzim-9.2.3-build/libzim-9.2.3/redhat-linux-build/../src/search.cpp:105:(.text+0x93f8): undefined reference to `icu_76::Locale::~Locale()'
/usr/bin/ld: /tmp/cc4SgzhV.ltrans4.ltrans.o: in function `zim::SuggestionDataBase::initXapianDb()':
/builddir/build/BUILD/libzim-9.2.3-build/libzim-9.2.3/redhat-linux-build/../src/suggestion.cpp:96:(.text.unlikely+0x1ae3): undefined reference to `icu_76::Locale::~Locale()'
/usr/bin/ld: /tmp/cc4SgzhV.ltrans4.ltrans.o: in function `zim::InternalDataBase::InternalDataBase(std::vector<zim::Archive, std::allocator<zim::Archive> > const&, bool)':
/builddir/build/BUILD/libzim-9.2.3-build/libzim-9.2.3/redhat-linux-build/../src/search.cpp:105:(.text.unlikely+0x233e): undefined reference to `icu_76::Locale::~Locale()'
/usr/bin/ld: /tmp/cc4SgzhV.ltrans5.ltrans.o: in function `zim::writer::XapianIndexer::XapianIndexer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, zim::writer::IndexingMode, bool)':
/builddir/build/BUILD/libzim-9.2.3-build/libzim-9.2.3/redhat-linux-build/../src/writer/xapianIndexer.cpp:42:(.text+0x868f): undefined reference to `icu_76::Locale::Locale(char const*, char const*, char const*, char const*)'
/usr/bin/ld: /builddir/build/BUILD/libzim-9.2.3-build/libzim-9.2.3/redhat-linux-build/../src/writer/xapianIndexer.cpp:54:(.text+0x8a87): undefined reference to `icu_76::Locale::~Locale()'
/usr/bin/ld: /builddir/build/BUILD/libzim-9.2.3-build/libzim-9.2.3/redhat-linux-build/../src/writer/xapianIndexer.cpp:54:(.text.unlikely+0x206d): undefined reference to `icu_76::Locale::~Locale()'
collect2: error: ld returned 1 exit status
```

Build command:
```
g++  -o src/libzim.so.9.2.3 src/libzim.so.9.2.3.p/meson-generated_.._.._static_libzim-resources.cpp.o src/libzim.so.9.2.3.p/archive.cpp.o src/libzim.so.9.2.3.p/cluster.cpp.o src/libzim.so.9.2.3.p/buffer_reader.cpp.o src/libzim.so.9.2.3.p/dirent.cpp.o src/libzim.so.9.2.3.p/dirent_accessor.cpp.o src/libzim.so.9.2.3.p/entry.cpp.o src/libzim.so.9.2.3.p/envvalue.cpp.o src/libzim.so.9.2.3.p/fileheader.cpp.o src/libzim.so.9.2.3.p/fileimpl.cpp.o src/libzim.so.9.2.3.p/file_compound.cpp.o src/libzim.so.9.2.3.p/file_reader.cpp.o src/libzim.so.9.2.3.p/item.cpp.o src/libzim.so.9.2.3.p/blob.cpp.o src/libzim.so.9.2.3.p/buffer.cpp.o src/libzim.so.9.2.3.p/md5.c.o src/libzim.so.9.2.3.p/uuid.cpp.o src/libzim.so.9.2.3.p/tools.cpp.o src/libzim.so.9.2.3.p/compression.cpp.o src/libzim.so.9.2.3.p/istreamreader.cpp.o src/libzim.so.9.2.3.p/writer_contentProvider.cpp.o src/libzim.so.9.2.3.p/writer_creator.cpp.o src/libzim.so.9.2.3.p/writer_item.cpp.o src/libzim.so.9.2.3.p/writer_cluster.cpp.o src/libzim.so.9.2.3.p/writer_dirent.cpp.o src/libzim.so.9.2.3.p/writer_workers.cpp.o src/libzim.so.9.2.3.p/writer_clusterWorker.cpp.o src/libzim.so.9.2.3.p/writer_titleListingHandler.cpp.o src/libzim.so.9.2.3.p/writer_counterHandler.cpp.o src/libzim.so.9.2.3.p/suggestion.cpp.o src/libzim.so.9.2.3.p/suggestion_iterator.cpp.o src/libzim.so.9.2.3.p/version.cpp.o src/libzim.so.9.2.3.p/fs_unix.cpp.o src/libzim.so.9.2.3.p/search.cpp.o src/libzim.so.9.2.3.p/search_iterator.cpp.o src/libzim.so.9.2.3.p/xapian_htmlparse.cc.o src/libzim.so.9.2.3.p/xapian_myhtmlparse.cc.o src/libzim.so.9.2.3.p/writer_xapianIndexer.cpp.o src/libzim.so.9.2.3.p/writer_xapianWorker.cpp.o src/libzim.so.9.2.3.p/writer_xapianHandler.cpp.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,-soname,libzim.so.9 -Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -pthread -Wl,--start-group /usr/lib64/liblzma.so /usr/lib64/libzstd.so /usr/lib64/libxapian.so /usr/lib64/libicui18n.so -Wl,--end-group
```

Linker can't find symbols from /usr/lib64/libicui18n.so{,76}.

Comment 24 Vitaly 2025-01-31 13:10:01 UTC
It seems libicu has been split into two different libraries: icu-i18n and icu-uc. Added the upstream patch to solve this issue.

Comment 25 Vitaly 2025-01-31 14:34:35 UTC
Both packages now build after adding `-std=c++17` flag. This issue can be closed. Many thanks.

Comment 26 Fedora Update System 2026-05-06 07:36:03 UTC
FEDORA-2026-f0637eecc8 (libicu77-77.1-1.fc45) has been submitted as an update to Fedora 45.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-f0637eecc8

Comment 27 Fedora Update System 2026-05-06 07:39:33 UTC
FEDORA-2026-f0637eecc8 (libicu77-77.1-1.fc45) has been pushed to the Fedora 45 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.