Could you try to run
open ~/.zshrc in your terminal and in that file add
Once you've done that open a new terminal and try to run
cabal build all. If the llvm error disappears and show another error related to
brew install openssl. Then go to
cabal.project in the cardano-node directory and add this:
NOTE: recent versions of homebrew have changed the path from /opt/homebrew/opt to /usr/local/opt. Please do a manual check to see where your brew installs are getting placed.
Here's a comprehensive document that shows the installation process for Mac (M1 as well)!
Looks like you might have installed llvm but it isn't in the path. Just to be on the safe side, try the steps in the guide below.
This is adapted from the standard installation documentation, but with some steps added as required based upon various suggestions etc.
This worked for me just a day or two ago on MacOS with M1 chip for 1.35.3, and today I reset based upon IOG's recommendation to 1.35.2 with the same steps, so it is vetted twice over!
UPDATE: Extensively updated the document with various checks that worked for quite a few of my learners with various issues that they faced. Updated for Preview, Preprod networks (and legacy network as well to some extent)