Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 923950 - app-office/libreoffice-24.2.0.3: fails to compile (CLANG19): implicit instantiation of undefined template 'std::char_traits<unsigned short>'
Summary: app-office/libreoffice-24.2.0.3: fails to compile (CLANG19): implicit instant...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Office Team
URL:
Whiteboard:
Keywords: PullRequest
: 940119 (view as bug list)
Depends on:
Blocks: systemwide-libcxx
  Show dependency tree
 
Reported: 2024-02-06 16:37 UTC by hugegameartgd
Modified: 2024-11-14 21:29 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,39.05 KB, text/plain)
2024-02-06 16:37 UTC, hugegameartgd
Details
build.log (build.log.gz,153.21 KB, application/gzip)
2024-02-06 16:39 UTC, hugegameartgd
Details
ebuild.patch (ebuild.patch,366 bytes, patch)
2024-04-02 21:51 UTC, hugegameartgd
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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
Comment 4 ernsteiswuerfel archtester 2024-10-18 20:12:55 UTC
24.2.6.2 still affected.
Comment 5 Marco Rebhan 2024-10-18 20:32:08 UTC
This should probably block bug 836220, this affects also clang/libcxx with glibc.
Comment 6 David Carlos Manuelda 2024-10-31 11:32:01 UTC
Please remove MUSL from title as this issue affects only >=libcxx-19 and not musl at all :)
Comment 7 fabolous.e05 2024-11-04 10:40:38 UTC
I'm facing the same issue and tried building with libstd, but that also fails with this error during configure script:

configure: error: Your libstdc++ headers are not visibility safe. This is no longer supported.

FYI: my libstd script doesn't redefine CXXFLAGS, but rather appends `-stdlib=libstdc++`
Is this related or even relevant?
Comment 8 felix 2024-11-06 12:48:30 UTC
https://bugs.gentoo.org/940119
Comment 9 Andreas Sturmlechner gentoo-dev 2024-11-14 21:10:45 UTC
*** Bug 940119 has been marked as a duplicate of this bug. ***
Comment 10 Larry the Git Cow gentoo-dev 2024-11-14 21:29:33 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ceca90a5c957a4ad070f881ba2b6ff2404a091e1

commit ceca90a5c957a4ad070f881ba2b6ff2404a091e1
Author:     LinuxUserGD <hugegameartgd@gmail.com>
AuthorDate: 2024-06-17 18:34:56 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2024-11-14 21:28:57 +0000

    app-office/libreoffice: Fix build with Clang 19
    
    Closes: https://bugs.gentoo.org/923950
    Upstream-PR: https://gerrit.libreoffice.org/c/core/+/163048
    Upstream-Commit: https://git.libreoffice.org/core/commit/d91ab7de467abea6c01c9dd8473f81ac1f29513c
    Signed-off-by: LinuxUserGD <hugegameartgd@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/37199
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 ...reoffice-24.2.7.2-no-std-basic_string-int.patch | 119 +++++++++++++++++++++
 app-office/libreoffice/libreoffice-24.2.7.2.ebuild |   3 +
 2 files changed, 122 insertions(+)