Fix zarith compilation on arm64 homebrew#18265
Conversation
Homebrew installs in /opt/homebrew by default on arm64. This logic would ideally be baked into a configure script somewhere, but for now it unblocks Zarith installation using opam on Mac M1s.
|
It might be interesting to use |
|
@kit-ty-kate do you know what is going on in the CI? It shows failure messages even if it succeeds. For example |
|
That's a feature added in ocurrent/opam-repo-ci#66. The reasoning is that opam 2.1 is able to go past most solver timeouts and using it when encountering a timeout with opam 2.0 allows us to see if we're missing an actual failure, however we still want to fail if it times-out with opam 2.0 as it is currently the version of opam most people use. |
|
Oh, I see. Awesome, thanks! |
|
@kit-ty-kate a fine suggestion, but not one to solve in opam-repository -- I'd prefer upstream Zarith do that as part of their configuration strategy since pkg-config would complicate cross-compilation (e.g. for Mirage). @xavierleroy @antoinemine, is the current PR with you? @TheLortex is also looking at adapting the recent Zarith changes to the Mirage cross-compilation friendly version, so perhaps he can look at Kate's suggestion about pkg-config and contribute any findings back to the Zarith repository. |
|
I suggested it in the PR porting zarith to dune a few weeks ago: ocaml/Zarith#73 (comment) |
|
Looks ok in the meantime. Thanks! |
|
I was summoned in this discussion. I have no problems with the proposed change. But I was expecting something better: Instead, the way things are done today, some logic is duplicated between the Re: whether ZArith itself should try to use |
Homebrew installs in /opt/homebrew by default on arm64.
This logic would ideally be baked into a configure script somewhere,
but for now it unblocks Zarith installation using opam on Mac M1s.