-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about rpath patching #21
Comments
In the comment above, I misunderstood patchelf's behaviour. |
Further:
Are these libraries that conda-forge packages but defaults doesn't? |
For detailed background on the addition of As to the changes themselves, please take a look at PR: #15 Would add that we needed to disable |
Ok, thanks for the info. I read through the issue and there's something I don't understand: why does setting the rpath to This is basically for my understanding, I get the general idea and trust that you've all done this properly anyway. |
nope, the provided .sos don't have an rpath set. The point is that without the rpath, the linker would look in the normal system locations and the location of the binary ( |
This looks to be an oversight on our part. When writing up conda-forge/cuda-feedstock#10, we had intended to set the RPATH and not the RUNPATH on all of our binaries, and we correctly did that in the feedstock that originally triggered this inspection (see the use of
Yes, this is coming from conda build. This error only shows up when certain flags are set for conda build. Whether or not those flags are set by default may depend on your environment, so you may be seeing an error that we are not.
No, I think this is a mistake by us. There's a lot of debate in general about RPATH vs. RUNPATH and in what contexts to use what, but within the conda community at least there is a preference for RPATH since the types of library modification that RUNPATH would support are less appropriate when you are in a self-contained environment that in principle affords the user complete control over all libraries (i.e. there's no need to point away from system-installed libraries via
I would read through the "Problem Statement" section in conda-forge/cuda-feedstock#10 and see if that answers your question. If not, feel free to follow up. I suspect, though, that you are confusing the statement about which libraries are loaded at runtime (the ones in $PREFIX/lib vs the ones in $PREFIX/targets/...) and the statement about the RPATH (which we want to be $ORIGIN precisely because of how the symlink is resolved by the runtime loader). The RPATH is never $PREFIX/lib. The idea is that we want different things to be found by the linker (i.e. during the compilation process) and by the runtime loader (when users have the libraries in their environment). |
… locations See conda-forge#21 (comment) for detailed explanation
ok, thanks. I'm going to include Re the question about how the loading works: what I was missing was that the loader considers |
Vyas put together the PRs linked above, which should fix this issue in CUDA 12.3 Please let us know if those work for you and if you spot any other issues |
Closing as resolved, but feel free to reopen if there are follow-up questions. |
Thanks, looking good, will let you know if we see any further issues |
Comment:
Building this feedstock on Anaconda's CI, we get the following error:
I'm not sure whether this comes from conda-build or some other process. I'm guessing conda-build, but I'm wondering why you don't get the same error?
Also, runpath is used instead of rpath AFAIU if they're both present, and they have different behaviours with respect to precedence of their entries over default system lib locations and LD_LIBRARY_PATH. With runpath, system library locations have precedence over runpath location, so if the user has installed their own libraries they'll take precedence? So you may want to erase the runpath entries as well?
The text was updated successfully, but these errors were encountered: