Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 939897 - media-libs/zxing-cpp-2.2.1: Fails to build with >=libcxx-19 and -std=c++17: error: implicit instantiation of undefined template 'std::char_traits<unsigned char>'
Summary: media-libs/zxing-cpp-2.2.1: Fails to build with >=libcxx-19 and -std=c++17: e...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo KDE team
URL: https://github.com/zxing-cpp/zxing-cp...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-20 12:29 UTC by nvinson234
Modified: 2024-10-04 14:33 UTC (History)
1 user (show)

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


Attachments
libcxx-19.patch (libcxx-19.patch,587 bytes, patch)
2024-09-23 01:39 UTC, nvinson234
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description nvinson234 2024-09-20 12:29:31 UTC
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
Comment 1 nvinson234 2024-09-23 01:39:56 UTC
Created attachment 903599 [details, diff]
libcxx-19.patch

Patch based on upstream commit d98739ceaac1c477879b9c4fba89ea76dba2d539
Comment 2 Larry the Git Cow gentoo-dev 2024-10-04 13:01:50 UTC
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(+)