-
Notifications
You must be signed in to change notification settings - Fork 22
Resolve run paths relative to the loader, not the install prefix #232
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,5 +1,14 @@ | ||||||||||||||
| # minc-toolkit configuration parameters for @MINC_TOOLKIT_VERSION_FULL@ | ||||||||||||||
| export MINC_TOOLKIT=@CMAKE_INSTALL_PREFIX@ | ||||||||||||||
| # Locate the toolkit from this script's own path so a relocated install needs | ||||||||||||||
| # no editing. This file installs at the top of the prefix, so its directory is | ||||||||||||||
| # the prefix. BASH_SOURCE is bash-only; every other shell falls back to the | ||||||||||||||
| # path baked in at configure time, which is the previous behaviour. | ||||||||||||||
| if [ -n "${BASH_SOURCE:-}" ] && [ -f "${BASH_SOURCE}" ]; then | ||||||||||||||
| MINC_TOOLKIT=$(cd -- "$(dirname -- "${BASH_SOURCE}")" && pwd -P) | ||||||||||||||
|
Comment on lines
+6
to
+7
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Checked this against bash 5.3.15, and the failure mode does not occur — The concern needs
So the PATH case keeps the full path rather than the basename, and the bare-name case only happens when Happy to add a |
||||||||||||||
| else | ||||||||||||||
| MINC_TOOLKIT=@CMAKE_INSTALL_PREFIX@ | ||||||||||||||
| fi | ||||||||||||||
| export MINC_TOOLKIT | ||||||||||||||
| export MINC_TOOLKIT_VERSION="@MINC_TOOLKIT_VERSION_FULL@" | ||||||||||||||
| export PATH=${MINC_TOOLKIT}/bin:${MINC_TOOLKIT}/pipeline:${PATH} | ||||||||||||||
| export PERL5LIB=${MINC_TOOLKIT}/perl:${MINC_TOOLKIT}/pipeline${PERL5LIB:+:$PERL5LIB} | ||||||||||||||
|
|
||||||||||||||
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.
Agreed, changed in the follow-up commit — all 21 sites now use
-DCMAKE_INSTALL_RPATH:STRING=.Worth noting the
:PATHspelling predates this branch (I only changed the value, not the type) and it does work: the full build linked below produced correct run paths with it, and the generatedZLIB-cfgcmd.txtcarried$ORIGIN/../libthrough untouched. ButSTRINGis what a list of run paths actually is, and it removes any question about a PATH-typed entry normalising$ORIGIN/@loader_path.