Trouble installing Tidal library - MacOS Big Sur (Failed to build... Warning: Couldn't figure out LLVM version...)

Hallo,

I've been battling for two hours now trying to get Tidal to work on my M1 Mac (Big Sur).

I've tried installing via stack, I've gone through the Troubleshooting in the docs, read through the forums... to no avail.

When installing via cabal I get the following error messages, mainly about things failing to build and not figuring out LLVM versions.

Any help would be very much appreciated!

Failed to build blaze-builder-0.4.2.1.
Build log (
/Users/cristobalfeaugas/.cabal/logs/ghc-8.10.7/blz-bldr-0.4.2.1-1bd7ec40.log
):
Configuring library for blaze-builder-0.4.2.1..
Preprocessing library for blaze-builder-0.4.2.1..
Building library for blaze-builder-0.4.2.1..

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)
[ 1 of 11] Compiling Blaze.ByteString.Builder.Internal.Write ( Blaze/ByteString/Builder/Internal/Write.hs, dist/build/Blaze/ByteString/Builder/Internal/Write.o, dist/build/Blaze/ByteString/Builder/Internal/Write.dyn_o )

Blaze/ByteString/Builder/Internal/Write.hs:57:1: warning: [-Wunused-imports]
    The import of ‘Data.Monoid’ is redundant
      except perhaps to import instances from ‘Data.Monoid’
    To import instances alone, use: import Data.Monoid()
   |
57 | import Data.Monoid (Monoid(..))
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)
ghc: could not execute: opt

Failed to build base-orphans-0.8.5.
Build log (
/Users/cristobalfeaugas/.cabal/logs/ghc-8.10.7/bs-rphns-0.8.5-9350ba43.log ):
Configuring library for base-orphans-0.8.5..
Preprocessing library for base-orphans-0.8.5..
Building library for base-orphans-0.8.5..

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)
[1 of 2] Compiling Data.Orphans.Prelude ( src/Data/Orphans/Prelude.hs, dist/build/Data/Orphans/Prelude.o, dist/build/Data/Orphans/Prelude.dyn_o )

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)
ghc: could not execute: opt

Failed to build clock-0.8.2.
Build log (
/Users/cristobalfeaugas/.cabal/logs/ghc-8.10.7/clck-0.8.2-5700beeb.log ):
Configuring library for clock-0.8.2..
Preprocessing library for clock-0.8.2..
Building library for clock-0.8.2..
[1 of 1] Compiling System.Clock     ( dist/build/System/Clock.hs, dist/build/System/Clock.o, dist/build/System/Clock.dyn_o )

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)
ghc: could not execute: opt

Failed to build colour-2.3.6.
Build log (
/Users/cristobalfeaugas/.cabal/logs/ghc-8.10.7/clr-2.3.6-eb6910a5.log ):
Configuring library for colour-2.3.6..
Preprocessing library for colour-2.3.6..
Building library for colour-2.3.6..
[ 1 of 14] Compiling Data.Colour.CIE.Chromaticity ( Data/Colour/CIE/Chromaticity.hs, dist/build/Data/Colour/CIE/Chromaticity.o, dist/build/Data/Colour/CIE/Chromaticity.dyn_o )

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)
ghc: could not execute: opt

Failed to build data-binary-ieee754-0.4.4.
Build log (
/Users/cristobalfeaugas/.cabal/logs/ghc-8.10.7/dt-bnry-754-0.4.4-29c0f572.log
):
Warning: data-binary-ieee754.cabal:36:21: version operators used. To use
version operators the package needs to specify at least 'cabal-version: >=
1.8'.
Configuring data-binary-ieee754-0.4.4...
Preprocessing library for data-binary-ieee754-0.4.4..
Building library for data-binary-ieee754-0.4.4..
[1 of 1] Compiling Data.Binary.IEEE754 ( lib/Data/Binary/IEEE754.hs, dist/build/Data/Binary/IEEE754.o, dist/build/Data/Binary/IEEE754.dyn_o )

lib/Data/Binary/IEEE754.hs:12:1: warning: [-Wtabs]
    Tab character found here, and in 70 further locations.
    Please use spaces instead.
   |
12 |         -- * Parsing
   | ^^^^^^^^

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)
ghc: could not execute: opt

Failed to build exe:hsc2hs from hsc2hs-0.68.7.
Build log (
/Users/cristobalfeaugas/.cabal/logs/ghc-8.10.7/hsc2hs-0.68.7-3fdf4607.log ):
Configuring executable 'hsc2hs' for hsc2hs-0.68.7..
Preprocessing executable 'hsc2hs' for hsc2hs-0.68.7..
Building executable 'hsc2hs' for hsc2hs-0.68.7..

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)
[ 1 of 12] Compiling ATTParser        ( ATTParser.hs, dist/build/hsc2hs/hsc2hs-tmp/ATTParser.o )

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)
ghc: could not execute: opt

Failed to build indexed-traversable-0.1.1.
Build log (
/Users/cristobalfeaugas/.cabal/logs/ghc-8.10.7/ndxd-trvrsbl-0.1.1-dc1c18e0.log
):
Configuring library for indexed-traversable-0.1.1..
Preprocessing library for indexed-traversable-0.1.1..
Building library for indexed-traversable-0.1.1..

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)
[1 of 5] Compiling GhcExts          ( src/GhcExts.hs, dist/build/GhcExts.o, dist/build/GhcExts.dyn_o )

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)
ghc: could not execute: opt

Failed to build primitive-0.7.2.0.
Build log (
/Users/cristobalfeaugas/.cabal/logs/ghc-8.10.7/prmtv-0.7.2.0-ce5a353e.log ):
Configuring library for primitive-0.7.2.0..
Preprocessing library for primitive-0.7.2.0..
Building library for primitive-0.7.2.0..

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)
[ 1 of 13] Compiling Control.Monad.Primitive ( Control/Monad/Primitive.hs, dist/build/Control/Monad/Primitive.o, dist/build/Control/Monad/Primitive.dyn_o )

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)
ghc: could not execute: opt

Failed to build splitmix-0.1.0.3.
Build log (
/Users/cristobalfeaugas/.cabal/logs/ghc-8.10.7/spltmx-0.1.0.3-77855e0e.log ):
Configuring library for splitmix-0.1.0.3..
Preprocessing library for splitmix-0.1.0.3..
Building library for splitmix-0.1.0.3..

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)
[1 of 4] Compiling Data.Bits.Compat ( src-compat/Data/Bits/Compat.hs, dist/build/Data/Bits/Compat.o, dist/build/Data/Bits/Compat.dyn_o )

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)
ghc: could not execute: opt
cabal: Failed to build blaze-builder-0.4.2.1 (which is required by
tidal-1.7.8). See the build log above for details.
Failed to build base-orphans-0.8.5 (which is required by tidal-1.7.8). See the
build log above for details.
Failed to build clock-0.8.2 (which is required by tidal-1.7.8). See the build
log above for details.
Failed to build colour-2.3.6 (which is required by tidal-1.7.8). See the build
log above for details.
Failed to build data-binary-ieee754-0.4.4 (which is required by tidal-1.7.8).
See the build log above for details.
Failed to build exe:hsc2hs from hsc2hs-0.68.7 (which is required by
tidal-1.7.8). See the build log above for details.
Failed to build indexed-traversable-0.1.1 (which is required by tidal-1.7.8).
See the build log above for details.
Failed to build primitive-0.7.2.0 (which is required by tidal-1.7.8). See the
build log above for details.
Failed to build splitmix-0.1.0.3 (which is required by tidal-1.7.8). See the
build log above for details.

Well, got it to work it seems.

Installed it with stack again and moved some things around.