build instructions for M2 mac #923
samuelpmishLLNL
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was trying to install serac's dependencies on a new M2 MacBook Pro and this is just a record of the issues I ran into, and what eventually worked (for me).
The machine is running Ventura, and using
homebrew
as a package manager (rather than MacPorts). Our installation instructions are given in terms of using MacPorts as a package manager, but I didn't want to install both and risk having them step on each other's toes.There is no
spack.yaml
for ventura, so I have to create one. Since I didn't want to describe where all the existing libraries are installed, I opted to use a minimal file (and let spack build practically everything). I couldn't figure out how to get spack to use the default apple-clang compiler, so I didto install llvm + clang-15, and made a spack.yaml file:
When invoking
two of the packages failed to build:
Problem with raja
I thought the RAJA problem was related to not having openmp headers / libs installed, since Apple is notoriously anti-OpenMP. I tried
brew install libomp
, but that didn't fix the problem. Instead, I ended up appending~openmp
to the spec to turn this feature off.Problem with hdf5
Without patching the sources, I don't know how to avoid this compilation error, so I ended up doing
brew install [email protected]
and adding an entry in thespack.yaml
file so that it now looks like:Note: homebrew actually installed [email protected], but if I put that version in the spack.yaml, spack produced errors about mismatched versions, so I lied in the spack.yaml and said it was actually 1.8.21.
Now, when running
everything eventually built successfully (albeit with openmp disabled)
Beta Was this translation helpful? Give feedback.
All reactions