-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Always setup rpath #27426
Always setup rpath #27426
Conversation
This was discussed in the original PR. #23035 (comment) |
hmm @autoantwort does vcpkg need a similar elf patch on osx? Seems like the current approach of @Osyotr doesn't work there? |
I have no idea. I don't use |
This is not about https://stackoverflow.com/questions/12521802/print-rpath-of-an-executable-on-macos |
osx needs another way to fix loader paths
# TODO: Read out current rpath | ||
# - nuke out any vcpkg related paths | ||
# - remove just $ORIGIN paths (because we add them any way) | ||
# - prepend our paths |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Osyotr What is your opinion on this TODO?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you expect something other than $ORIGIN
and /path/to/vcpkg_installed
to be in the path?
If it's an absolute path, I don't think we should keep it. On the other hand, $ORIGIN
stuff can theoretically point to something other than lib/
, so we could try to keep it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you expect something other than $ORIGIN and /path/to/vcpkg_installed to be in the path?
Yes if the user set it up in the toolchain itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we will be able to tell whether a path was set in toolchain or in library itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in #36056 I came to the conclusion that it is enough to support rpaths which point to the installed tree itself.
Pinging @Neumann-A for response. Is work still being done for this PR? |
@Adela0814. Ideally the TODO needs to be taken care of. |
superseded by #36056 |
Reasoning:
a) vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) -> builds .so
b) static libs links the above
c) a code generator links the above (e.g. qsb in #27279 complaining about not finding libGLX.so.0 while building qtdeclarative)
as such vcpkg needs to always fix the rpath because otherwise required build tools might be looking for shared libraries.
cc @Osyotr