kcrash when started from terminal
Andreas Cord-Landwehr
cordlandwehr at kde.org
Sat Nov 14 15:14:22 UTC 2015
Hey, so do I understand it right that for all applications we have to check
for two things:
1. the application must link against KF5::Crash
2. there must be a call to some (dummy) function in KCrash like
"KCrash::setCrashHandler(KCrash::defaultCrashHandler);"
to ensure that the linker actually links against KCrash when, when "--as-
needed" is passed?
Cheers,
Andreas
On Friday, September 25, 2015 5:35:52 AM CET Sune Vuorela wrote:
> On 2015-09-24, Harald Sitter <sitter at kde.org> wrote:
> > Uh, ah, but, CMake is too smart :P
> > If you add a target_link_library that isn't actually used it won't be
> > linked. So what every application would have to do is add the target
>
> It is not cmake that is too smart, but the linker when passed
> --as-needed (which many distributions does)
>
> $ cat foo.cpp
> int main(int, char**) { };
>
> $ g++ -lQt5Core foo.cpp
> $ objdump -x a.out | grep Qt5Core
> NEEDED libQt5Core.so.5
>
> $ g++ -Wl,--as-needed -lQt5Core foo.cpp
> $ objdump -x a.out | grep Qt5Core
>
>
> But bottom line, just adding some extra linkage doesn't get kept for
> many compiled versions.
More information about the Kde-frameworks-devel
mailing list