<p>This looks to be an issue with LLVM version 15, as per <a href="https://gitlab.haskell.org/ghc/ghc/-/issues/21936" rel="nofollow noreferrer">https://gitlab.haskell.org/ghc/ghc/-/issues/21936</a></p>
<p>Looks like reverting to LLVM 14 should work for you.</p>

CC BY-SA 4.0
2022-09-26T06:18:17.753Z
Reverted to LLVM 13 and it worked! (I was getting some other errors on LLVM 14)
Ivan Lara
CC BY-SA 4.0
2022-09-26T08:31:23.567Z
Nice one, glad it worked ok.
MC_Brisbane - JUST Pool
CC BY-SA 4.0
2022-09-25T10:05:51.370Z
2022-09-25T10:05:51.370Z
MC_Brisbane - JUST Pool
<p>I've followed the installing-cardano-node#macos guide on the developer portal and about 10 things fail to build and all of them are giving me the same error.</p>
<pre><code>Cannot specify -O# and --passes=/--foo-pass, use -passes='default&lt;O#&gt;,other-pass'
`opt' failed in phase `LLVM Optimiser'. (Exit code: 1)
</code></pre>
<p>I also followed the steps on this link and I'm still getting the same errors.</p>
<p><a href="https://github.com/mallapurbharat/cardano-tx-sample/blob/main/0_installation/preview_preprod_network/1_macos_m1_process.md" rel="nofollow noreferrer">https://github.com/mallapurbharat/cardano-tx-sample/blob/main/0_installation/preview_preprod_network/1_macos_m1_process.md</a></p>
<p>Thank you for your help.</p>

<cardano-cli><cardano-node>
Failed cardano-node build on mac m1
# Failed cardano-node build on mac m1

(Asked by: username_0 on 2022-09-25)

I've followed the installing-cardano-node#macos guide on the developer portal and about 10 things fail to build and all of them are giving me the same error.
Cannot specify -O# and --passes=/--foo-pass, use -passes='default,other-pass'
`opt' failed in phase `LLVM Optimiser'. (Exit code: 1)

I also followed the steps on this link and I'm still getting the same errors.
https://github.com/mallapurbharat/cardano-tx-sample/blob/main/0_installation/preview_preprod_network/1_macos_m1_process.md
Thank you for your help.

**Tags:** cardano-cli, cardano-node

---

## 1 answers

### Answer by username_1 on 2022-09-25. Score: 1 | Accepted answer

This looks to be an issue with LLVM version 15, as per <https://gitlab.haskell.org/ghc/ghc/-/issues/21936>

Looks like reverting to LLVM 14 should work for you.

> **Comments:**
> **username_0**: Reverted to LLVM 13 and it worked! (I was getting some other errors on LLVM 14)  
> **username_1**: Nice one, glad it worked ok.  

---

