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<O#>,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.


Thank you for your help.

1 Answer 1


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.

  • Reverted to LLVM 13 and it worked! (I was getting some other errors on LLVM 14)
    – Ivan Lara
    Sep 26, 2022 at 6:18
  • Nice one, glad it worked ok. Sep 26, 2022 at 8:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.