-
-
Notifications
You must be signed in to change notification settings - Fork 12.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
crystal: install wrapper script to set LD_RUN_PATH
pointing to homebrew lib
#165986
crystal: install wrapper script to set LD_RUN_PATH
pointing to homebrew lib
#165986
Conversation
CRYSTAL_CONFIG_CC
to bake reference to homebrew's gcc
CRYSTAL_CONFIG_CC
to bake reference to homebrew's gcc
Do we need this on macOS? Original issue sounds like we only need to add this dependency Also feels slightly weird installing both LLVM and GCC here, but maybe it's necessary. |
I'm not sure and I'm not familiar with the specifics of macOS. However, I would expect the same problem could apply there as well. If
It used to work on Linux as well, but now it doesn't. And it's not entirely clear what has changed. We should probably be suprised that it worked before 🤷
LLVM is only a lib dependency of the compiler. We could trim the dependency down to just |
On macOS, it links correctly with the default system compiler:
this is because on macOS it links with the absolute paths linked in:
so it doesn't use an rpath system like Linux does.
It's worth noting that if the future direction is linker-level support then our GCC hack won't kick in and you'll need to implement an rpath system for that. |
I'm happy to opt-out on macOS. IIUC gcc itself is also only modified on linux. Not sure if it makes sense to keep the Even with |
It might make sense to add the dependency in the formula without restrictions (and be sure to use it, also in macOS). In any case, we can first try this for the Linux version and then see if we really want to bother the macOS version with it. |
Putting the
@Bo98 Any advice on what I should do? I could revert to f44c79f47dd388f3be5205c082fc1ac53f6897d9 which seemed fine. That adds |
GCC is the default on Linux so no need to specify a dependency unless you need a specific version |
@SMillerDev I tried to remove the gcc dependency entirely, but then |
I'm temporarily closing this PR to let autobump update the formula. |
Audit seems to be unhappy with having |
3dba06a
to
dff0e1e
Compare
dff0e1e
to
023c5d4
Compare
I'm temporarily closing this PR to let autobump update the formula. (again) |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
023c5d4
to
c9376e3
Compare
CRYSTAL_CONFIG_CC
to bake reference to homebrew's gcc
LD_RUN_PATH
pointing to homebrew lib
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
LD_RUN_PATH
pointing to homebrew libLD_RUN_PATH
pointing to homebrew lib
c9376e3
to
3de686f
Compare
bcc7a93
to
10d5d94
Compare
91a736c
to
66d428b
Compare
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.
Thanks!
66d428b
to
f73973d
Compare
f73973d
to
846572c
Compare
Blocked by #181351. |
…brew lib - revision bump (use llvm@18) Closes Homebrew#165986. Co-authored-by: Luke Shingles <luke.shingles@gmail.com>
Merged in 085c886. Thanks @straight-shoota! |
The Crystal compiler requires a linker and by default it just picks up whatever
gcc
it finds inPATH
.This causes issues with discovering libraries installed via homebrew. We previously tried to solve this with #162182, but that doesn't work.
Now the Crystal compiler has gained support for a configuration value
CRYSTAL_CONFIG_CC
which allows changing the baked-in default linker path (crystal-lang/crystal#14318). So we can point it directly to thegcc
from homebrew. And this resolves all issues with dependency discovery.The compiler change is not yet released, so it only works with
--HEAD
.It's still possible to specify a non-default linker via the environment variable
CC
at runtime, of course.This effectively reverts #162182 and replaces it with an alternative which actually works.