GHC 8.10.7 on Mac, but LLVM12 is disabled?

Hi! Recently the CI (GitHub Actions) for my library has started failing for GHC 8.10.7 on macOS.

GHC 8.10.7 depends on LLVM versions strictly less than 13.

Until now, I had explicitly installed an older version of LLVM (llvm@12) through homebrew, but Homebrew have disabled the package on 2025-07-01. Thus, all 8.10.7+macOS CI has been failing for me since that date.

Would anybody have quick solutions to this? Ideally, I want to keep supporting 8.10.7 in my package and CI since there’s nothing in code that explicitly breaks support. If I have to build LLVM from scratch etc, that’d be quite a pain.

The CI log is available here: Update discord-haskell upper bound to include 1.18.0 · yutotakano/discord-haskell-voice@68b3521 · GitHub

2 Likes

Solution: you can forcefully override the disabled status by retrieving the llvm@12 formula locally, modifying the formula file to remove the ‘disable’ line, and installing from that file.

- brew install llvm@12
+ # Download the llvm@12 formula and patch it to remove the disabled reason
+ brew update
+ brew fetch --formula llvm@12
+ FORMULA_PATH="$(brew --repo homebrew/core)/Formula/l/llvm@12.rb"
+ # Remove the 'disable!' line
+ sed -i.bak '/^  disable!/d' "$FORMULA_PATH"
+ # Install ignoring the disabled status
+ HOMEBREW_NO_INSTALL_FROM_API=1 brew install llvm@12
1 Like