[Differential] [Commented On] D772: Turn all clang related static libs into a single shared library.

arrowdodger (Gleb Popov) noreply at phabricator.kde.org
Wed Jan 13 16:52:23 UTC 2016


arrowdodger added a comment.

In https://phabricator.kde.org/D772#15394, @mwolff wrote:

> It's not only the build dir, it could also happen when you have ABI incompatible installs in different prefixes and mess up your environment by misconfiguring LD_LIBRARY_PATH e.g.


Pretty complex scenario to think about it, IMO.

> is it OK for you to keep this change local to your setup for now until we find a good solution?


Sure. I, personally, don't even need it, because right now only test suite on Windows is affected by ODR violations. If you don't care about running tests on Windows, we can abandon this diff right now.

> Also: If anyone wants to speed up the process: Please check how RPATH is set/used in KF5/KDevelop5. Maybe my above pain points are not valid anymore, at which point this patch would become much more acceptable to me.


`kdevplatform_add_plugin()` doesn't do anything with RPATH and just calls `add_library()` internally. This means that CMake uses default RPATH settings, which, according to the documentation, are:

> By default if you don't change any RPATH related settings, CMake will link the executables and shared libraries with full RPATH to all used libraries in the build tree. When installing, it will clear the RPATH of these targets so they are installed with an empty RPATH


If i understand this right, running stuff from build tree will always be OK. Now, to be OK when running installed apps, we can set `INSTALL_RPATH_USE_LINK_PATH` property for plugin target. I guess, this should eliminate problems you are talking about.

Useful links:
https://cmake.org/Wiki/CMake_RPATH_handling
https://cmake.org/cmake/help/v3.4/variable/CMAKE_INSTALL_RPATH_USE_LINK_PATH.html
https://cmake.org/cmake/help/v3.4/prop_tgt/INSTALL_RPATH_USE_LINK_PATH.html


REPOSITORY
  rKDEVELOP KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D772

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: arrowdodger, KDevelop
Cc: kfunk, mwolff, kdevelop-devel


More information about the KDevelop-devel mailing list