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

Fix homebrew pathing related to libomp #9

Merged
merged 3 commits into from
Jan 11, 2023

Conversation

phated
Copy link

@phated phated commented Jan 10, 2023

When setting up noir, I was getting build failures with the native backend. This seems to be related to bad pathing on homebrew installations.

When I installed libomp with homebrew, I got this message:

libomp is keg-only, which means it was not symlinked into /Users/phated/brew, because it can override GCC headers and result in broken builds.

This means that libomp wasn't symlinked into the /Users/phated/brew/lib directory where the cmake files expected it. I've changed it to the result of brew --prefix libomp which is the actual installation location.

Additionally, the build.rs file has a hardcoded homebrew location, instead of using the brew prefix, so I fixed that.

Copy link

@jfecher jfecher left a comment

Choose a reason for hiding this comment

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

I can confirm this builds correctly on my M1 Pro as well

Copy link

@jfecher jfecher left a comment

Choose a reason for hiding this comment

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

This PR looks fine to me but I'd like more people to test building it before merging. So far it is compiling on my M1 Pro, and I cannot test on my linux machine as that is still failing from the lack of relevant header includes.

@phated
Copy link
Author

phated commented Jan 10, 2023

@jfecher this should only affect Mac operating systems, everything is guarded by some sort of "apple" checks

@phated phated requested a review from kobyhallx January 10, 2023 18:37
@phated
Copy link
Author

phated commented Jan 10, 2023

There's an additional argument to be made that INTEL_APPLE case should also be using brew --prefix but it'd require an intel mac + non-default homebrew setup to test it.

@vezenovm
Copy link

I am able to build locally on my intel mac from this branch. I can test changing INTEL_APPLE to use brew --prefix as well in a moment

@vezenovm
Copy link

I am able to build locally on my intel mac from this branch. I can test changing INTEL_APPLE to use brew --prefix as well in a moment

So it does build when I use find_brew_prefix for the INTEL_APPLE case. Running brew --prefix locally gives me /usr/local, so I replaced this in PR #12. I branched off of this PR, once you take a look feel free to merge it into this branch.

@phated
Copy link
Author

phated commented Jan 10, 2023

Thanks for testing and adding the intel mac patch @vezenovm 🙇 This should be ready for approvals

Copy link

@kobyhallx kobyhallx left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@kobyhallx kobyhallx merged commit e20ed8a into kw/noir-dsl Jan 11, 2023
@phated phated deleted the bb/libomp-brew-pathing branch January 11, 2023 15:55
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.

4 participants