-
Notifications
You must be signed in to change notification settings - Fork 912
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
make: Add macos M1 support #4988
Conversation
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.
LGTM, but have no possibility to test.
ack b76c377
I'll likely be adding a few more fixes to this PR before undrafting it, but it should be ready for the next release. |
cef0fcc
to
1fcd284
Compare
FYI, this is what ended up working for me to build on the M1:
cc @dongcarl |
@valentinewallace have you tried the |
Right, that solves all the specific
Overall, I think a good solution might be to have |
Ok, while it didn't address the failing tests yet, this should be merged so we can at least compile for M1s. |
LGTM but I don't have an M1 to test on either. ACK 5c3e07e |
The M1 Macs support both x86_64 and arm64 architectures, which forced homebrew to use a different path for its storage (`/opt/homebrew/` instead of `/usr/local`). If we don't adjust the path we'd mix x86_64 and arm64 libraries which can lead to weird compiler and linker errors. This patch just introduces `CPATH` and `LIBRARY_PATH` as suggested by the homebrew team, and detects the current architecture automatically. Changelog-Added: macos: Added m1 architecture support for macos
It's been a while and this has been working ok on my M1, so let's merge it. |
This worked on my m1 a month or so ago, btw. |
What linker flags are being passed to the compiler? You can make compilation verbose via |
On Tue, Jul 12, 2022 at 04:56:58AM -0700, Christian Decker wrote:
> @cdecker I am getting
>
> `make distclean` `./configure` `...` `*** We need a database, but neither sqlite3 nor postgres found`
>
> on my linux machine
>
> and I bisected it to:
>
> [e3f53e0](e3f53e0)
What linker flags are being passed to the compiler? You can make compilation verbose via `make V=1` iirc. Seems the linker path and/or include paths may be wrongly identified.
looks like I was just missing pkg-config from my local dev dependencies.
|
The M1 Macs support both x86_64 and arm64 architectures, which forced
homebrew to use a different path for its storage (
/opt/homebrew/
instead of
/usr/local
). If we don't adjust the path we'd mix x86_64and arm64 libraries which can lead to weird compiler and linker
errors.
This patch just introduces
CPATH
andLIBRARY_PATH
as suggested bythe homebrew team, and detects the current architecture automatically.
Changelog-Added: macos: Added m1 architecture support for macos