[plasmashell] [Bug 479679] when built with clang/libc++, plasmashell exits with -1 on right mouse click with layershellqt: Cannot attach popup of unknown type
https://bugs.kde.org/show_bug.cgi?id=479679 nekone...@protonmail.ch changed: What|Removed |Added CC||nekone...@protonmail.ch -- You are receiving this mail because: You are watching all bug changes.
[plasmashell] [Bug 479679] when built with clang/libc++, plasmashell exits with -1 on right mouse click with layershellqt: Cannot attach popup of unknown type
https://bugs.kde.org/show_bug.cgi?id=479679 Nicolas Fella changed: What|Removed |Added CC||hugegamear...@gmail.com --- Comment #24 from Nicolas Fella --- *** Bug 482856 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
[plasmashell] [Bug 479679] when built with clang/libc++, plasmashell exits with -1 on right mouse click with layershellqt: Cannot attach popup of unknown type
https://bugs.kde.org/show_bug.cgi?id=479679 Alfred Wingate changed: What|Removed |Added CC||par...@protonmail.com -- You are receiving this mail because: You are watching all bug changes.
[plasmashell] [Bug 479679] when built with clang/libc++, plasmashell exits with -1 on right mouse click with layershellqt: Cannot attach popup of unknown type
https://bugs.kde.org/show_bug.cgi?id=479679 Fabian Vogt changed: What|Removed |Added CC||fab...@ritter-vogt.de Status|REOPENED|RESOLVED Resolution|--- |UPSTREAM --- Comment #23 from Fabian Vogt --- (In reply to David Redondo from comment #22) > The issue seems related to a mismatch in type_info across objects making the > any_cast in layershell-qt fail libc++ uses pointer equivalence for typeinfo comparison by default. (1.) struct xdg_popup is an incomplete type in layer-shell-qt. This triggers an LLVM bug: https://github.com/llvm/llvm-project/issues/36746. The result of that bug is that the typeinfo symbols (typeinfo + name) are local to the .so file and won't bind to other objects. Thus pointer equivalence checks fail. If this gets fixed it'd probably work already. I don't see that being worked on though, so I suggest to build libc++ with -DLIBCXX_TYPEINFO_COMPARISON_IMPLEMENTATION=2, which mirrors libstdc++ behavior. (More details for interested readers below) There are also other ways this can fail, but don't happen here (yet): 2. layer-shell-qt is loaded with RTLD_LOCAL. That means typeinfo can't be shared between separately loaded plugins, just within (not runtime) linked libaries (i.e. what ldd shows). (ref. https://lists.llvm.org/pipermail/llvm-dev/2014-June/073469.html) 3. struct xdg_popup is also used by the executable itself. Unless the typeinfo is global by either building it with -rdynamic or linking it against a library which also exports the typeinfo, this can't be shared either. (ref. https://lists.llvm.org/pipermail/llvm-dev/2014-June/073487.html) For those reasons, libstdc++ switched to using string comparison for typeinfo equality checks: https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libstdc%2B%2B-v3/libsupc%2B%2B/typeinfo;h=fcc3077d06091339175c7af5d3acd92fd5416acd;hb=HEAD#l51 1 is clearly a bug in clang. https://refspecs.linuxbase.org/cxxabi-1.83.html#rtti explains how typeinfo for pointers to incomplete types are supposed to work. 2 is technically intended behavior, just totally non obvious. 3 is similar, technically every executable which might call dlopen has to be built with -rdynamic. -- You are receiving this mail because: You are watching all bug changes.
[plasmashell] [Bug 479679] when built with clang/libc++, plasmashell exits with -1 on right mouse click with layershellqt: Cannot attach popup of unknown type
https://bugs.kde.org/show_bug.cgi?id=479679 David Redondo changed: What|Removed |Added CC||k...@david-redondo.de --- Comment #22 from David Redondo --- The issue seems related to a mismatch in type_info across objects making the any_cast in layershell-qt fail -- You are receiving this mail because: You are watching all bug changes.
[plasmashell] [Bug 479679] when built with clang/libc++, plasmashell exits with -1 on right mouse click with layershellqt: Cannot attach popup of unknown type
https://bugs.kde.org/show_bug.cgi?id=479679 Andreas Sturmlechner changed: What|Removed |Added Summary|plasmashell exits with -1 |when built with |on right mouse click with |clang/libc++, plasmashell |layershellqt: Cannot attach |exits with -1 on right |popup of unknown type |mouse click with ||layershellqt: Cannot attach ||popup of unknown type Resolution|DOWNSTREAM |--- Status|RESOLVED|REOPENED Ever confirmed|0 |1 --- Comment #21 from Andreas Sturmlechner --- This just came up again in #plasma with clang/libc++, I think we have gathered enough cases to establish this is somehow caused or made visible by use of that particular toolchain, not downstream packaging. -- You are receiving this mail because: You are watching all bug changes.