Summary: | kio does not compile with libc++ due to the use of the (obsolete and removed) std::mem_fun | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kio | Reporter: | Manuel Nickschas <sputnick> |
Component: | general | Assignee: | KIO Bugs <kio-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | a.samirh78, kdelibs-bugs |
Priority: | NOR | ||
Version: | 5.84.0 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/frameworks/kio/commit/36f1814b184f4d5ac628fca5db5f6cc1440b4db7 | Version Fixed In: | |
Sentry Crash Report: |
Description
Manuel Nickschas
2021-07-12 10:22:27 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/496 Git commit 36f1814b184f4d5ac628fca5db5f6cc1440b4db7 by Jan Paul Batrina. Committed on 12/07/2021 at 14:06. Pushed by ahmadsamir into branch 'master'. Use std::mem_fn instead of the deprecated/removed std::mem_fun std::mem_fun was deprecated in C++11 and removed from the standard in C++17. NO_CHANGELOG M +1 -1 src/widgets/kpropertiesdialog.cpp https://invent.kde.org/frameworks/kio/commit/36f1814b184f4d5ac628fca5db5f6cc1440b4db7 Thanks, this fixes the issue for me! I wasn't completely sure if it can just be replaced, thus I didn't offer a patch myself. Kudos for the quick reaction! Thanks for the report :) I tested building with clang and it built without this patch, also IIUC FreeBSD uses clang and libc++ by default and those builds passed on the KDE Jenkins CI instance without this patch. So I don't know why it failed to build for you. Could be extra compiler flags? Anyway, it's good to port to std::mem_fn. It seems I need to add -stdlib=libc++ to the compiler flags for clang to use libc++, I'll test that next :) (In reply to Ahmad Samir from comment #5) > It seems I need to add -stdlib=libc++ to the compiler flags for clang to use > libc++, I'll test that next :) Yes, you either need to configure Clang to use libc++ by default, or you need to explicitly specify that compiler flag. Note that mixing libc++ and libstdc++ in your system C++ libraries may cause problems (due to ABI incompatibilities), so if you want to have a CI system set up for testing the Clang/libc++ combination, it probably should be based on a system fully built with libc++. Yeah, I found that out myself, the build failed with very weird errors indeed :) I'd have to build the whole stack, which isn't simple. Good thing the fix is obvious enough it didn't require that (or we could have asked our FreeBSD devs to test, since they use clang/libc++ by default IIUC). |