Incorrect library load paths due to rpath patcher run on symlinks #5179
Labels
in-progress
issue is actively being worked on
locked
[bot] locked due to inactivity
severity::1
blocker; broken functionality with no workaround
source::contributor
created by a frequent contributor
type::bug
describes erroneous operation, use severity::* to classify the type
What happened?
In
conda-build>=3.28.0
, 1dc2470 replaced.os_utils.pyldd.is_codefile
/.os_utils.*.codefile_type
by direct calls to.os_utils.*.codefile_class
which those functions wrapped.For
is_codefile
/codefile_type
theskip_symlinks
parameter defaults toTrue
whereas it isFalse
forcodefile_class
which induced some unintended changes.Notably,
.post.post_process_shared_lib
runs the rpath patcher on symlinks inconda-build>=3.28
, which leads to invalid entries being set for the symlink targets in case the symlinks are located in different directories.Case analysis at conda-forge/openmpi-feedstock#142 (comment) ff.
In that specific case, we have a
lib/<target>
andlib/<subfolder>/<symlink> -> lib/<target>
for whichlib/<target>
gets rpath set to$ORIGIN/..:$ORIGIN/.
instead of$ORIGIN/..:$ORIGIN/.
if the symlink is processed after the actual target.The issue was noticed because we ran into an bug with in
patchelf
which I could pinpoint to being introduced in NixOS/patchelf@42394e8 (i.e., affectingpatchelf>=0.17.0
.(Others have run into issues introduced with that change; see NixOS/patchelf#446 ).
Test and patch incoming.
The text was updated successfully, but these errors were encountered: