crystal: Set CRYSTAL_CONFIG_LIBRARY_RPATH#162182
Merged
BrewTestBot merged 2 commits intoHomebrew:masterfrom Feb 9, 2024
Merged
crystal: Set CRYSTAL_CONFIG_LIBRARY_RPATH#162182BrewTestBot merged 2 commits intoHomebrew:masterfrom
CRYSTAL_CONFIG_LIBRARY_RPATH#162182BrewTestBot merged 2 commits intoHomebrew:masterfrom
Conversation
p-linnane
approved these changes
Feb 9, 2024
Member
p-linnane
left a comment
There was a problem hiding this comment.
That's so weird that it stopped working. Thanks for the fix though!
Contributor
|
🤖 An automated task has requested bottles to be published to this PR. |
Contributor
|
|
Programs build with a crystal compiler from homebrew fail to execute because some libraries can't be located: ```console $ docker run --rm homebrew/ubuntu22.04 # brew install crystal # crystal run 'puts %(hello world)' /home/linuxbrew/.cache/crystal/crystal-run-eval.tmp: error while loading shared libraries: libgc.so.1: cannot open shared object file: No such file or directory ``` Note this affects the program runtime, not the compiler itself. Binaries need to know where to find their binaries. The linker is told to look in homebrew's lib path via `CONFIG_LIBRARY_PATH`. But at runtime the loader doesn't have this information. It can be baked into the binary via `CONFIG_LIBRARY_RPATH`. Issue report: https://forum.crystal-lang.org/t/crystal-installation-using-linuxbrew-is-not-working/6559
Member
|
Had to rebase due to an audit change we just made. |
Contributor
|
🤖 An automated task has requested bottles to be published to this PR. |
Contributor
Author
|
Note: This change currently has no effect because the Crystal compiler does not respect There's no harm in setting the variable and I hope it will be effective in the next Crystal release, so I don't see much reason to revert this change. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Programs build with a crystal compiler from homebrew fail to execute because some libraries can't be located:
Note this affects the program runtime, not the compiler itself.
Binaries need to know where to find their binaries. The linker is told to look in homebrew's lib path via
CONFIG_LIBRARY_PATH. But at runtime the loader doesn't have this information. It can be baked into the binary viaCONFIG_LIBRARY_RPATH.Issue report: https://forum.crystal-lang.org/t/crystal-installation-using-linuxbrew-is-not-working/6559