Skip to content
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

Cleanup RPATH settings #42919

Merged
merged 1 commit into from
Nov 3, 2021
Merged

Cleanup RPATH settings #42919

merged 1 commit into from
Nov 3, 2021

Conversation

staticfloat
Copy link
Member

Previously, we needed to provide both usr/lib and usr/lib/julia as
elements on the RPATH, because libjulia lived in usr/lib, and
needed to be able to find dependent libraries both within a build tree
(when most libraries live in usr/lib) and within an install tree (when
most libraries live in usr/lib/julia).

Nowadays, everything is either in usr/lib or in usr/lib/julia with
the exception of libjulia, but since it's really libjulia-internal
that does all the dlopen()'ing, we can simply use $$ORIGIN (or the
equivalent @loader_path/ on macOS) and completely ignore the rest of
the RPATH shenanigans we do.

Previously, we needed to provide both `usr/lib` and `usr/lib/julia` as
elements on the `RPATH`, because `libjulia` lived in `usr/lib`, and
needed to be able to find dependent libraries both within a build tree
(when most libraries live in `usr/lib`) and within an install tree (when
most libraries live in `usr/lib/julia`).

Nowadays, everything is either in `usr/lib` or in `usr/lib/julia` with
the exception of `libjulia`, but since it's really `libjulia-internal`
that does all the `dlopen()`'ing, we can simply use `$$ORIGIN` (or the
equivalent `@loader_path/` on macOS) and completely ignore the rest of
the RPATH shenanigans we do.
@staticfloat staticfloat requested a review from vtjnash November 3, 2021 03:51
@staticfloat staticfloat merged commit 236523f into master Nov 3, 2021
@staticfloat staticfloat deleted the sf/cleanup_rpath branch November 3, 2021 17:16
@ararslan
Copy link
Member

ararslan commented Nov 4, 2021

This broke FreeBSD (more so than it already was): https://build.julialang.org/#/builders/78/builds/4690/steps/5/logs/stdio. Seems one or more of those removed rpath specifications is required.

@DilumAluthge
Copy link
Member

It also broke musl: #42940

@DilumAluthge
Copy link
Member

@staticfloat @vtjnash Could we revert this to fix #42944 and #42940, and then reland a fixed version later?

@DilumAluthge
Copy link
Member

Oh, hmmm. Would reverting this PR break Julia on macOS Monterey?

@ararslan
Copy link
Member

ararslan commented Nov 5, 2021

We can probably keep the change that affects macOS and revert the part that doesn't. (The changes reflected in the diff are in two different ifeq branches.)

ararslan added a commit that referenced this pull request Nov 6, 2021
The change to RPATH setting for macOS seems to have improved the
situation for users on Monterey, but the other changes in #42919 that
affect other platforms seem to have caused regressions on musl Linux
(#42940) and FreeBSD (#42944). The easiest thing to do here is to keep
the changes from #42919 as they apply to macOS but revert the others.
staticfloat pushed a commit that referenced this pull request Nov 6, 2021
* Partially revert #42919

The change to RPATH setting for macOS seems to have improved the
situation for users on Monterey, but the other changes in #42919 that
affect other platforms seem to have caused regressions on musl Linux
(#42940) and FreeBSD (#42944). The easiest thing to do here is to keep
the changes from #42919 as they apply to macOS but revert the others.

* Un-revert the `RPATH_LIB` definition
@ararslan
Copy link
Member

ararslan commented Nov 6, 2021

Should the macOS specific part of this be backported to 1.6/1.7 for Monterey support or should this one not affect it?

KristofferC pushed a commit that referenced this pull request Nov 7, 2021
Previously, we needed to provide both `usr/lib` and `usr/lib/julia` as
elements on the `RPATH`, because `libjulia` lived in `usr/lib`, and
needed to be able to find dependent libraries both within a build tree
(when most libraries live in `usr/lib`) and within an install tree (when
most libraries live in `usr/lib/julia`).

Nowadays, everything is either in `usr/lib` or in `usr/lib/julia` with
the exception of `libjulia`, but since it's really `libjulia-internal`
that does all the `dlopen()`'ing, we can simply use `$$ORIGIN` (or the
equivalent `@loader_path/` on macOS) and completely ignore the rest of
the RPATH shenanigans we do.

(cherry picked from commit 236523f)
KristofferC pushed a commit that referenced this pull request Nov 7, 2021
* Partially revert #42919

The change to RPATH setting for macOS seems to have improved the
situation for users on Monterey, but the other changes in #42919 that
affect other platforms seem to have caused regressions on musl Linux
(#42940) and FreeBSD (#42944). The easiest thing to do here is to keep
the changes from #42919 as they apply to macOS but revert the others.

* Un-revert the `RPATH_LIB` definition

(cherry picked from commit 653cad3)
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Feb 22, 2022
Previously, we needed to provide both `usr/lib` and `usr/lib/julia` as
elements on the `RPATH`, because `libjulia` lived in `usr/lib`, and
needed to be able to find dependent libraries both within a build tree
(when most libraries live in `usr/lib`) and within an install tree (when
most libraries live in `usr/lib/julia`).

Nowadays, everything is either in `usr/lib` or in `usr/lib/julia` with
the exception of `libjulia`, but since it's really `libjulia-internal`
that does all the `dlopen()`'ing, we can simply use `$$ORIGIN` (or the
equivalent `@loader_path/` on macOS) and completely ignore the rest of
the RPATH shenanigans we do.
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Feb 22, 2022
* Partially revert JuliaLang#42919

The change to RPATH setting for macOS seems to have improved the
situation for users on Monterey, but the other changes in JuliaLang#42919 that
affect other platforms seem to have caused regressions on musl Linux
(JuliaLang#42940) and FreeBSD (JuliaLang#42944). The easiest thing to do here is to keep
the changes from JuliaLang#42919 as they apply to macOS but revert the others.

* Un-revert the `RPATH_LIB` definition
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Mar 8, 2022
Previously, we needed to provide both `usr/lib` and `usr/lib/julia` as
elements on the `RPATH`, because `libjulia` lived in `usr/lib`, and
needed to be able to find dependent libraries both within a build tree
(when most libraries live in `usr/lib`) and within an install tree (when
most libraries live in `usr/lib/julia`).

Nowadays, everything is either in `usr/lib` or in `usr/lib/julia` with
the exception of `libjulia`, but since it's really `libjulia-internal`
that does all the `dlopen()`'ing, we can simply use `$$ORIGIN` (or the
equivalent `@loader_path/` on macOS) and completely ignore the rest of
the RPATH shenanigans we do.
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Mar 8, 2022
* Partially revert JuliaLang#42919

The change to RPATH setting for macOS seems to have improved the
situation for users on Monterey, but the other changes in JuliaLang#42919 that
affect other platforms seem to have caused regressions on musl Linux
(JuliaLang#42940) and FreeBSD (JuliaLang#42944). The easiest thing to do here is to keep
the changes from JuliaLang#42919 as they apply to macOS but revert the others.

* Un-revert the `RPATH_LIB` definition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants