mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-06-23 00:07:57 +02:00
build-system: don't override RPATH
The RPATH shouldn't be overriden. Packages like conda set an RPATH. If it is changed conda doesn't work any more.
This commit is contained in:
@@ -1291,12 +1291,18 @@ _build_module() {
|
||||
local -- rpath=''
|
||||
local -i depth=0
|
||||
for fname in "${bin_objects[@]}"; do
|
||||
# don't override existing RPATH
|
||||
rpath=$(patchelf --print-rpath "${fname}")
|
||||
[[ -z "${rpath}" ]] || continue
|
||||
(( depth=$(std::get_dir_depth "${fname}") + group_depth + 3 ))
|
||||
rpath='$ORIGIN/'$(printf "../%.0s" $(${seq} 1 ${depth}))lib64
|
||||
${patchelf} --force-rpath --set-rpath "${rpath}" "${fname}"
|
||||
done
|
||||
mapfile -t bin_objects < <(std::find_shared_objects '.')
|
||||
for fname in "${bin_objects[@]}"; do
|
||||
# don't override existing RPATH
|
||||
rpath=$(patchelf --print-rpath "${fname}")
|
||||
[[ -z "${rpath}" ]] || continue
|
||||
(( depth=$(std::get_dir_depth "${fname}") + group_depth + 3 ))
|
||||
rpath='$ORIGIN/'$(printf "../%.0s" $(${seq} 1 ${depth}))lib64
|
||||
${patchelf} --force-rpath --set-rpath "${rpath}" "${fname}"
|
||||
|
||||
Reference in New Issue
Block a user