| Summary: | kwin_* binaries when setcap'ed lose $LD_LIBRARY_PATH | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | bluescreenavenger |
| Component: | core | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | RESOLVED NOT A BUG | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | git master | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
bluescreenavenger
2017-10-19 00:45:17 UTC
This is expected. All LD_* variables are ignored when an executable with capabilities is launched. Could the RPATH attribute be set on the kwin_* binaries so they can run without the LD_LIBRARY_PATH having to be set? I have KWin compiled into a non standard path. Everything works fine. So it is possible. I'll have to look at my configuration maybe... My Kwin cmake line is cmake -Wno-dev .. -DCMAKE_INSTALL_PREFIX=$INSTALLDIR -DCMAKE_PREFIX_PATH=$INSTALLDIR -DCMAKE_BUILD_TYPE=Release ...and the libraries are installed in /opt/lib/(i386-linux-gnu|x86_64-linux-gnu) I do specify some things to be installed there, mostly Frameworks, but I'm not sure how that was automatically inherited... I also don't have anything /opt in /etc/environment or my ld.conf I guess it's some RPATH setting. I know that I haven't used LD_LIBRARY_PATH for years and rpath was just being used by default. Maybe I need a cmake argument, objdump and readelf seen to imply there's not RPATH set OK... I made some tweaks, and set kwin's RPATH... ...it looks like RPATHs are not handled recursively though, so for every kf5 library, I might need to add -DCMAKE_INSTALL_RPATH=/opt/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH) I have tried again, to no avail... I wonder if I am doing something wrong. I have no Qt5 under /usr, only the one and Frameworks I built in /opt This is what I tried to change for Kwin's cmake options (where $INSTALLDIR=/opt) cmake -Wno-dev .. -DCMAKE_INSTALL_PREFIX=$INSTALLDIR -DCMAKE_PREFIX_PATH=$INSTALLDIR -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_RPATH=$INSTALLDIR/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH) -DCMAKE_SKIP_BUILD_RPATH=FALSE -DLIB_INSTALL_DIR=$INSTALLDIR/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH) |