https://reviews.llvm.org/D138307 deprecated support for std::char_traits<unisgned char> in libcxx-18 and https://reviews.llvm.org/D157058 removed support starting with libcxx-19. Therefore, when zxing-cpp tries to build with libcxx-19 and against the C++ 2017 standard (or older) it fails to build with the message "error: implicit instantiation of undefined template 'std::char_traits<unsigned char>'". zxing-cpp builds properly with libcxx-19 if the C++ standard is 2020, and will likely build against C++ standards newer than 2020. Reproducible: Always Steps to Reproduce: 1. emerge clang-19 and configure it to build with libcxx-19 2. emerge xzing-cpp 3. Observe error Actual Results: build fails with error "error: implicit instantiation of undefined template 'std::char_traits<unsigned char>'" Expected Results: zxing-cpp builds successfully
Created attachment 903599 [details, diff] libcxx-19.patch Patch based on upstream commit d98739ceaac1c477879b9c4fba89ea76dba2d539
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6405d399294fba767ee6047ab2267286f423a84 commit b6405d399294fba767ee6047ab2267286f423a84 Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2024-10-04 12:35:21 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2024-10-04 13:01:24 +0000 media-libs/zxing-cpp: Fix build with >=libcxx-19 Closes: https://bugs.gentoo.org/939897 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> .../zxing-cpp/files/zxing-cpp-2.2.1-cmake.patch | 27 ++++++++++++++++++++ .../zxing-cpp/files/zxing-cpp-2.2.1-cxx20.patch | 29 ++++++++++++++++++++++ media-libs/zxing-cpp/zxing-cpp-2.2.1.ebuild | 5 ++++ 3 files changed, 61 insertions(+)