solus-project / ypkg

Modern, declarative, structured build format
https://solus-project.com/
GNU General Public License v3.0
56 stars 20 forks source link

Add tools to deal with RPATH stupidity #60

Open sunnyflunk opened 6 years ago

sunnyflunk commented 6 years ago

Currently many packages are building with RPATHing the libraries due to packages using libtool having an incorrect ld detection (cause proper detection was broken on other distros). The introduction of LT_SYS_LIBRARY_PATH overrides the detection to ensure it doesn't add RPATH for /usr/lib64 thinking it won't be found. The norm appears to be searching for directories in /etc/ld.so.conf which doesn't exist in Solus.

The second tool to combat RPATH issues is adding the runpath optimize key. --enable-new-dtags changes linking to use DT_RUNPATH instead of DT_RPATH, the difference being that RUNPATH dirs are searched after the default library locations. This will alleviate issues where RPATH is difficult to remove and not break expected library loading order.

Signed-off-by: Peter O'Connor peter@solus-project.com