Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 923950

Summary: app-office/libreoffice-24.2.0.3: fails to compile (MUSL-CLANG19): implicit instantiation of undefined template 'std::char_traits<unsigned short>'
Product: Gentoo Linux Reporter: hugegameartgd
Component: Current packagesAssignee: Gentoo Office Team <office>
Status: UNCONFIRMED ---    
Severity: normal CC: asturm, hugegameartgd
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/tsyrogit/zxcvbn-c/pull/31
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info
build.log
ebuild.patch

Description hugegameartgd 2024-02-06 16:37:35 UTC
Created attachment 884425 [details]
emerge --info

app-office/libreoffice-24.2.0.3 fails to compile with libc++-19 (musl/clang/merged-usr)

Steps to Reproduce:
- Compile with `emerge =app-office/libreoffice-24.2.0.3::gentoo`

[C  ] soltools/mkdepend/cppsetup.c
In file included from /var/tmp/portage/app-office/libreoffice-24.2.0.3/work/libreoffice-24.2.0.3/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx:20:
In file included from /var/tmp/portage/app-office/libreoffice-24.2.0.3/work/libreoffice-24.2.0.3/sdext/source/pdfimport/xpdfwrapper/pnghelper.hxx:24:
In file included from /var/tmp/portage/app-office/libreoffice-24.2.0.3/work/libreoffice-24.2.0.3/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx:36:
In file included from /usr/include/poppler/GfxState.h:41:
In file included from /usr/include/poppler/Object.h:39:
In file included from /usr/include/c++/v1/set:1499:
In file included from /usr/include/c++/v1/functional:526:
In file included from /usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /usr/include/c++/v1/vector:325:
In file included from /usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /usr/include/c++/v1/__format/formatter_integral.h:21:
In file included from /usr/include/c++/v1/__format/formatter_output.h:22:
In file included from /usr/include/c++/v1/__format/parser_std_format_spec.h:39:
/usr/include/c++/v1/string:730:43: error: implicit instantiation of undefined template 'std::char_traits<unsigned short>'
  730 |   static_assert((is_same<_CharT, typename traits_type::char_type>::value),
      |                                           ^
/usr/include/poppler/cpp/poppler-global.h:101:43: note: in instantiation of template class 'std::basic_string<unsigned short>' requested here
  101 | class POPPLER_CPP_EXPORT ustring : public std::basic_string<unsigned short>
      |                                           ^
/usr/include/c++/v1/__fwd/string.h:23:29: note: template is declared here
   23 | struct _LIBCPP_TEMPLATE_VIS char_traits;
      |                             ^
Comment 1 hugegameartgd 2024-02-06 16:39:34 UTC
Created attachment 884426 [details]
build.log
Comment 2 Andreas Sturmlechner gentoo-dev 2024-02-06 18:24:14 UTC
Can you come up with a fix and send that upstream?
Comment 3 hugegameartgd 2024-04-02 21:51:14 UTC
Created attachment 889290 [details, diff]
ebuild.patch

The build errors appear when compiling third-party code, patching the bundled zxcvbn-c addon (and poppler system library) should work