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

prioritize /opt/homebrew/lib (for macos on aarch64 only) for searching path #965

Closed
wants to merge 1 commit into from

Conversation

dzprofessionerd
Copy link

No description provided.

@dzprofessionerd dzprofessionerd changed the title prioritize /opt/homebrew/lib for macos on aarch64 for searching path prioritize /opt/homebrew/lib (for macos on aarch64 only) for searching path Jun 26, 2022
@eregon
Copy link
Collaborator

eregon commented Jun 27, 2022

This looks OK, but I think we should understand the problem a little bit better: #880 (comment)

@ronaldtse
Copy link

Since #941 is closed, I hope this can be merged soon.

path_candidates = if FFI::Platform::ARCH == 'aarch64' && FFI::Platform.mac?
['/opt/homebrew/lib/','/usr/lib/','/usr/local/lib/','/opt/local/lib/']
else
['/usr/lib/','/usr/local/lib/','/opt/local/lib/','/opt/homebrew/lib/']
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you remove /opt/homebrew/lib/ from this list? That seems only useful on darwin-arm64.

Also could you add a space after every comma, or even better use %w[path1 path2]?

@eregon
Copy link
Collaborator

eregon commented Jun 29, 2022

In general it's still unclear if we should prefer /opt/homebrew/lib to /usr/lib (probably not) or /usr/local/lib (maybe, but shouldn't be necessary, and no if that's non-homebrew stuff). I asked on Homebrew/brew#13481

I'm thinking the only safe solution here is to use the existing path, and try every part of it, not just the first directory.

@eregon
Copy link
Collaborator

eregon commented Jul 17, 2022

I made a PR for the general fix: #968

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.

None yet

3 participants