move opt/homebrew/lib ahead of /usr/local/lib #941
Closed
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.
This PR moves /opt/homebrew/lib ahead of /usr/local/lib in the library lookup directories ordering.
The reason is this:
/opt/homebrew/lib is the default path for homebrew on M1 macs
/usr/local/lib is the defualt path for homebrew on Intel Macs
For most users, this change won't do anything, because overwhelmingly only one of those folders will exist.
there is a small intersection of users who have both. the reason is often because they need both m1 and x86 versions of homebrew installed because of some dependency that is only available on x86 (i.e. openvino).
for those users, this would prefer the platform native m1 homebrew ahead of the x86 homebrew path.
so to summarize
intel macs can only have /usr/local/lib
most m1 macs will only have /opt/homebrew/lib
a small number of m1 mac users will have both. this change affects them and it prefers the platform native path to the x86 path