Bug 472868

Summary: Doesn't Compile with LLVM's libc++ and compiler-rt
Product: [Applications] PlasmaTube Reporter: nekonexus
Component: generalAssignee: Linus Jahn <lnj>
Status: RESOLVED WORKSFORME    
Severity: normal CC: espidev, josh, nicolas.fella
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description nekonexus 2023-08-01 07:01:58 UTC
SUMMARY
Using "-stdlib=libc++" and/or "--rtlib=compiler-rt" as a CXXFLAG causes lld linkage to fail.


STEPS TO REPRODUCE
1. Set "-stdlib=libc++" and/or "--rtlib=compiler-rt" as a CXXFLAG
2. Build PlasmaTube version 23.11.70 from source (git)
3. See error

OBSERVED RESULT
Compilation fails

EXPECTED RESULT
LLVM's libc++ standard library shouldn't cause compilation to fail

SOFTWARE/OS VERSIONS
Linux: Arch Linux
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10

ADDITIONAL INFORMATION
N/A
Comment 1 nekonexus 2023-08-01 07:05:52 UTC
To clarify, because I forgot to mention, this is with using Clang as the compiler and also with using "-lc++abi" as a link flag.
Comment 2 Nicolas Fella 2023-08-01 11:03:49 UTC
What's the error?
Comment 3 nekonexus 2023-08-01 19:47:29 UTC
```
[100%] Linking CXX executable ../bin/plasmatube
ld.lld: error: undefined symbol: _Unwind_Resume
>>> referenced by qmetatype.h:0 (/usr/include/qt/QtCore/qmetatype.h:0)
>>>               CMakeFiles/plasmatube.dir/plasmatube_autogen/mocs_compilation.cpp.o:(QMetaTypeIdQObject<VideoItem*, 8>::qt_metatype_id())
>>> referenced by main.cpp:0 (/usr/src/debug/plasmatube-git/plasmatube/src/main.cpp:0)
>>>               CMakeFiles/plasmatube.dir/main.cpp.o:(main)
>>> referenced by main.cpp:0 (/usr/src/debug/plasmatube-git/plasmatube/src/main.cpp:0)
>>>               CMakeFiles/plasmatube.dir/main.cpp.o:(main::$_5::__invoke(QQmlEngine*, QJSEngine*))
>>> referenced 161 more times
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/CMakeFiles/plasmatube.dir/build.make:297: bin/plasmatube] Error 1
make[1]: *** [CMakeFiles/Makefile2:336: src/CMakeFiles/plasmatube.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
```
Comment 4 Bug Janitor Service 2023-08-16 03:45:11 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Joshua Goins 2023-09-15 01:33:21 UTC
This doesn't seem like a PlasmaTube-specific thing, does this affect other KDE apps?
Comment 6 nekonexus 2023-09-15 01:45:55 UTC
I moved to Gentoo recently due to similar issue with Clang+LLVM building things on Arch; I'd check again to see if I can reproduce it on this 100% Clang+LLVM system, but Plasmatube doesn't have a Gentoo package
Comment 7 Joshua Goins 2023-09-15 01:54:36 UTC
Huzzah, you're in luck because I happen to use Gentoo and have written a plasmatube ebuild: https://git.sr.ht/~redstrate/ebuilds/tree/master/item/kde-apps/plasmatube/plasmatube-9999.ebuild
Comment 8 nekonexus 2023-09-15 02:20:04 UTC
Ooo, nice; how do I add the overlay? I'm struggling to add it because it seems sourcehut does it differently with git than github and gitlab?
Comment 9 nekonexus 2023-09-15 02:22:53 UTC
Scratch that, I got it; one minute
Comment 10 nekonexus 2023-09-15 02:30:51 UTC
I keep getting this error when I sync your overlay for some reason but it does sync, so...
```
>>> Syncing repository 'redstrate' into '/var/db/repos/redstrate'...
/usr/bin/git clone --depth 1 "https://git.sr.ht/~redstrate/ebuilds" .
Cloning into '.'...
remote: Enumerating objects: 148, done.
remote: Counting objects: 100% (148/148), done.
remote: Compressing objects: 100% (125/125), done.
remote: Total 148 (delta 8), reused 143 (delta 8), pack-reused 0
Receiving objects: 100% (148/148), 61.38 KiB | 1.20 MiB/s, done.
Resolving deltas: 100% (8/8), done.
=== Sync completed for redstrate
!!! Section 'redstrate' in repos.conf has name different from repository name 'local' set inside repository

Action: sync for repo: redstrate, returned code = 0
```
Comment 11 nekonexus 2023-09-15 02:34:23 UTC
Uh, portage can't seem to see it somehow
Comment 12 nekonexus 2023-09-15 23:13:13 UTC
Like, it can't seem to see the ebuilds in your overlay, so I think I'm doing something wrong?
Comment 13 Bug Janitor Service 2023-09-30 03:46:18 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 14 Bug Janitor Service 2023-10-15 03:45:57 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!