The Wayback Machine - https://web.archive.org/web/20210928143607/https://github.com/Homebrew/homebrew-core/issues/75458
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

Relocatable bottles for formulae that use CMAKE_INSTALL_RPATH #75458

Open
29 of 39 tasks
carlocab opened this issue Apr 19, 2021 · 6 comments
Open
29 of 39 tasks

Relocatable bottles for formulae that use CMAKE_INSTALL_RPATH #75458

carlocab opened this issue Apr 19, 2021 · 6 comments
Assignees

Comments

@carlocab
Copy link
Member

@carlocab carlocab commented Apr 19, 2021

We currently have a number of formulae that use CMAKE_INSTALL_RPATH set to lib or opt_lib. This breaks relocatability on macOS. For example, see 52203dd, and its parent, 068fcb9.

Instead, CMAKE_INSTALL_RPATH should be set to @loader_path/../lib, but only on macOS, as @loader_path is macOS-specific.

Example PRs: #75450, #75449, #75457.

Formulae that use CMAKE_INSTALL_RPATH:

I imagine I'll get through this list eventually, but help would be appreciated.


Bonus, for settings CMAKE_EXE_LINKER_FLAGS:

@carlocab carlocab self-assigned this Apr 19, 2021
carlocab added a commit to carlocab/brew that referenced this issue Apr 19, 2021
About 40 formulae set `CMAKE_INSTALL_RPATH` to `lib` or `opt_lib`, but
this breaks bottle relocatability.

The correct solution is to use `@loader_path/../lib`, but this is macOS
specific, so it requires some OS-specific logic. Rather than replicating
this logic over many formulae, we may as well define a helper method for
it.

See Homebrew/homebrew-core#75458.
@carlocab
Copy link
Member Author

@carlocab carlocab commented Apr 19, 2021

This will probably have to wait for Homebrew/brew#11187.

@MikeMcQuaid
Copy link
Member

@MikeMcQuaid MikeMcQuaid commented Apr 19, 2021

Good call, makes sense to me @carlocab!

@carlocab
Copy link
Member Author

@carlocab carlocab commented Apr 20, 2021

Homebrew/brew#11187 is merged, but any formula changes using it will need to wait until the next brew release tag.

@carlocab
Copy link
Member Author

@carlocab carlocab commented Apr 25, 2021

This is in the latest release tag. See Homebrew/brew@d89eda0 and Homebrew/brew#11245.

carlocab added a commit to carlocab/homebrew-core that referenced this issue Apr 25, 2021
carlocab added a commit to carlocab/homebrew-core that referenced this issue Apr 25, 2021
carlocab added a commit to carlocab/homebrew-core that referenced this issue Apr 25, 2021
carlocab added a commit to carlocab/homebrew-core that referenced this issue Apr 25, 2021
carlocab added a commit to carlocab/homebrew-core that referenced this issue Apr 25, 2021
carlocab added a commit to carlocab/homebrew-core that referenced this issue Apr 25, 2021
See Homebrew#75458.

Also, modify the `inreplace` to be portable to Linux.
BrewTestBot added a commit that referenced this issue Apr 25, 2021
See #75458.

Also, modify the `inreplace` to be portable to Linux.

Closes #75884.

Signed-off-by: Michka Popoff <[email protected]>
Signed-off-by: BrewTestBot <[email protected]>
BrewTestBot added a commit that referenced this issue Apr 25, 2021
See #75458.

Closes #75879.

Signed-off-by: Michka Popoff <[email protected]>
Signed-off-by: BrewTestBot <[email protected]>
BrewTestBot added a commit that referenced this issue Apr 25, 2021
See #75458.

Closes #75881.

Signed-off-by: Michka Popoff <[email protected]>
Signed-off-by: BrewTestBot <[email protected]>
BrewTestBot added a commit that referenced this issue Apr 25, 2021
See #75458.

Closes #75883.

Signed-off-by: Michka Popoff <[email protected]>
Signed-off-by: BrewTestBot <[email protected]>
BrewTestBot added a commit that referenced this issue Apr 25, 2021
* bullet: make bottle relocatable
  See #75458.
* bullet: set `CMAKE_INSTALL_NAME_DIR`

Closes #75882.

Signed-off-by: Michka Popoff <[email protected]>
Signed-off-by: BrewTestBot <[email protected]>
carlocab added a commit to carlocab/homebrew-core that referenced this issue Apr 25, 2021
carlocab added a commit to carlocab/homebrew-core that referenced this issue May 26, 2021
See Homebrew#75458. The same comments as in Homebrew#78095 also apply.
@carlocab carlocab mentioned this issue May 26, 2021
5 tasks
BrewTestBot added a commit that referenced this issue May 26, 2021
See #75458.

This bottle is already relocatable, but that's from having implemented
`RPATH` relocation.

Using `#rpath` makes this more consistent with other formula and speeds
up bottling/pouring (because it allows us to skip the relocation of
`RPATH`s).

Closes #78095.

Signed-off-by: Nanda H Krishna <[email protected]>
Signed-off-by: BrewTestBot <[email protected]>
BrewTestBot added a commit that referenced this issue May 26, 2021
See #75458. The same comments as in #78095 also apply.

Closes #78098.

Signed-off-by: Nanda H Krishna <[email protected]>
Signed-off-by: BrewTestBot <[email protected]>
carlocab added a commit to carlocab/homebrew-core that referenced this issue May 26, 2021
@carlocab carlocab mentioned this issue May 26, 2021
5 tasks
carlocab added a commit to carlocab/homebrew-core that referenced this issue May 26, 2021
@carlocab carlocab mentioned this issue May 26, 2021
5 tasks
BrewTestBot added a commit that referenced this issue May 26, 2021
See #75458.

Closes #78116.

Signed-off-by: Nanda H Krishna <[email protected]>
Signed-off-by: BrewTestBot <[email protected]>
BrewTestBot added a commit that referenced this issue May 27, 2021
See #75458.

Closes #78118.

Signed-off-by: Nanda H Krishna <[email protected]>
Signed-off-by: BrewTestBot <[email protected]>
@carlocab carlocab mentioned this issue May 28, 2021
5 tasks
carlocab added a commit to carlocab/homebrew-core that referenced this issue May 28, 2021
Also, add `license`. From `LICENSE.txt`:

    Copyright (c) 2001-2019 Ryan C. Gordon and others.

    This software is provided 'as-is', without any express or implied warranty.
    In no event will the authors be held liable for any damages arising from
    the use of this software.

    Permission is granted to anyone to use this software for any purpose,
    including commercial applications, and to alter it and redistribute it
    freely, subject to the following restrictions:

    1. The origin of this software must not be misrepresented; you must not
    claim that you wrote the original software. If you use this software in a
    product, an acknowledgment in the product documentation would be
    appreciated but is not required.

    2. Altered source versions must be plainly marked as such, and must not be
    misrepresented as being the original software.

    3. This notice may not be removed or altered from any source distribution.

        Ryan C. Gordon <[email protected]>

See Homebrew#75458.
BrewTestBot added a commit that referenced this issue May 28, 2021
Also, add `license`. From `LICENSE.txt`:

    Copyright (c) 2001-2019 Ryan C. Gordon and others.

    This software is provided 'as-is', without any express or implied warranty.
    In no event will the authors be held liable for any damages arising from
    the use of this software.

    Permission is granted to anyone to use this software for any purpose,
    including commercial applications, and to alter it and redistribute it
    freely, subject to the following restrictions:

    1. The origin of this software must not be misrepresented; you must not
    claim that you wrote the original software. If you use this software in a
    product, an acknowledgment in the product documentation would be
    appreciated but is not required.

    2. Altered source versions must be plainly marked as such, and must not be
    misrepresented as being the original software.

    3. This notice may not be removed or altered from any source distribution.

        Ryan C. Gordon <[email protected]>

See #75458.

Closes #78205.

Signed-off-by: Dustin Rodrigues <[email protected]>
Signed-off-by: BrewTestBot <[email protected]>
carlocab added a commit to carlocab/homebrew-core that referenced this issue May 28, 2021
@carlocab carlocab mentioned this issue May 28, 2021
5 tasks
BrewTestBot added a commit that referenced this issue May 28, 2021
See #75458.

Closes #78214.

Signed-off-by: Dustin Rodrigues <[email protected]>
Signed-off-by: BrewTestBot <[email protected]>
carlocab added a commit to carlocab/homebrew-core that referenced this issue May 28, 2021
@carlocab carlocab mentioned this issue May 28, 2021
5 tasks
carlocab added a commit to carlocab/homebrew-core that referenced this issue May 28, 2021
See Homebrew#75458.

Also, use `opt`-path instead of a cellar path for the install name
directory, and make the `inreplace` call portable to Linux.
@carlocab carlocab mentioned this issue May 28, 2021
5 tasks
carlocab added a commit to carlocab/homebrew-core that referenced this issue May 28, 2021
@carlocab carlocab mentioned this issue May 28, 2021
5 tasks
carlocab added a commit to carlocab/homebrew-core that referenced this issue May 28, 2021
@carlocab carlocab mentioned this issue May 28, 2021
5 tasks
BrewTestBot added a commit that referenced this issue May 28, 2021
See #75458.

Closes #78218.

Signed-off-by: Nanda H Krishna <[email protected]>
Signed-off-by: BrewTestBot <[email protected]>
BrewTestBot added a commit that referenced this issue May 28, 2021
See #75458.

Closes #78221.

Signed-off-by: Nanda H Krishna <[email protected]>
Signed-off-by: BrewTestBot <[email protected]>
BrewTestBot added a commit that referenced this issue May 28, 2021
See #75458.

Closes #78222.

Signed-off-by: Nanda H Krishna <[email protected]>
Signed-off-by: BrewTestBot <[email protected]>
BrewTestBot added a commit that referenced this issue May 28, 2021
See #75458.

Also, use `opt`-path instead of a cellar path for the install name
directory, and make the `inreplace` call portable to Linux.

Closes #78220.

Signed-off-by: Nanda H Krishna <[email protected]>
Signed-off-by: BrewTestBot <[email protected]>
carlocab added a commit to carlocab/homebrew-core that referenced this issue Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants