‘Sound.Tidal.Context’ Problem on MacOS Monterey

Hello,
I'm new to Tidal Cycles and I tried several times to install it on my Mac Mini M1 (MacOS Monterey).
Whatever I do, the "Could not find module ‘Sound.Tidal.Context’" error doesn't seem to getaway.
I tried to install/reinstall cabal, Haskell, and all that but nothing is working. It's driving me crazy.

I had it, previously, installed on High Sierra and it worked. No issue at all.

Does anyone have the same issue with M1 Monterey?
Please help.

Thank you.

I have no problems on Air M1 Monterey 12.2
As far as I remember I used ghcup to install ghc and cabal, then used these instructions:

Thank you for the reply.

When I try to install it via the automated script, I get this message and don't know what to do further. Any idea?

curl https://raw.githubusercontent.com/tidalcycles/tidal-bootstrap/master/tidal-bootstrap.command -sSf | sh

Exception in Tkinter callback

Traceback (most recent call last):

File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/tkinter/init.py", line 1921, in call

return self.func(*args)

File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/tkinter/init.py", line 839, in callit

func(*args)

File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/FoxDot/lib/Workspace/LineNumbers.py", line 24, in redraw

self.delete("all")

File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/tkinter/init.py", line 2852, in delete

self.tk.call((self._w, 'delete') + args)

_tkinter.TclError: invalid command name ".!linenumbers"

socez@KKRs-Mac-mini ~ % curl https://raw.githubusercontent.com/tidalcycles/tidal-bootstrap/master/tidal-bootstrap.command -sSf | sh

Detected system information:

sh: line 169: die: command not found

Architecture:

sh: line 64: command_exists: command not found

Distribution: Darwin

sh: line 64: command_exists: command not found

Distro alias: darwin

sh: line 104: command_exists: command not found

Distro version: 21.2.0

sh: line 64: command_exists: command not found

/opt/homebrew/bin/git

[1] 'git' command already installed.

[2] Haskell found, skipping install of that...

[3] Congratulations, you have all the pre-reqs...

Installing tidalcycles haskell library (via cabal)...

Downloading the latest package list from hackage.haskell.org

Updated package list of hackage.haskell.org to the index-state 2022-02-07T16:58:19Z

To revert to previous state run:

cabal v2-update 'hackage.haskell.org,2022-02-06T15:27:23Z'

Resolving dependencies...

Build profile: -w ghc-8.10.7 -O1

In order, the following will be built (use -v for more details):

  • blaze-builder-0.4.2.2 (lib) (requires build)

  • base-orphans-0.8.6 (lib) (requires build)

  • clock-0.8.2 (lib) (requires build)

  • colour-2.3.6 (lib) (requires build)

  • data-binary-ieee754-0.4.4 (lib:data-binary-ieee754) (requires build)

  • ghc-paths-0.1.0.12 (lib:ghc-paths) (requires build)

  • hsc2hs-0.68.8 (exe:hsc2hs) (requires build)

  • indexed-traversable-0.1.2 (lib) (requires build)

  • primitive-0.7.3.0 (lib) (requires build)

  • splitmix-0.1.0.4 (lib) (requires build)

  • tagged-0.8.6.1 (lib) (requires build)

  • th-abstraction-0.4.3.0 (lib) (requires build)

  • transformers-compat-0.7.1 (lib) (requires build)

  • hashable-1.4.0.2 (lib) (requires build)

  • network-3.1.2.7 (lib:network) (requires build)

  • random-1.2.1 (lib) (requires build)

  • distributive-0.6.2.1 (lib) (requires build)

  • async-2.2.4 (lib) (requires build)

  • hosc-0.19.1 (lib) (requires build)

  • temporary-1.3 (lib) (requires build)

  • comonad-5.0.8 (lib) (requires build)

  • hint-0.9.0.5 (lib) (requires build)

  • bifunctors-5.5.11 (lib) (requires build)

  • tidal-1.7.10 (lib) (requires build)

  • tidal-1.7.10 (exe:tidal) (requires build)

Starting clock-0.8.2 (lib)

Starting base-orphans-0.8.6 (lib)

Starting data-binary-ieee754-0.4.4 (all, legacy fallback)

Starting colour-2.3.6 (lib)

Starting blaze-builder-0.4.2.2 (lib)

Starting ghc-paths-0.1.0.12 (all, legacy fallback)

Starting indexed-traversable-0.1.2 (lib)

Starting hsc2hs-0.68.8 (exe:hsc2hs)

Starting primitive-0.7.3.0 (lib)

Building colour-2.3.6 (lib)

Building indexed-traversable-0.1.2 (lib)

Building data-binary-ieee754-0.4.4 (all, legacy fallback)

Building clock-0.8.2 (lib)

Building blaze-builder-0.4.2.2 (lib)

Building hsc2hs-0.68.8 (exe:hsc2hs)

Building base-orphans-0.8.6 (lib)

Building primitive-0.7.3.0 (lib)

Failed to build blaze-builder-0.4.2.2.

Build log ( /Users/socez/.cabal/logs/ghc-8.10.7/blz-bldr-0.4.2.2-b180ed46.log

):

Configuring library for blaze-builder-0.4.2.2..

Preprocessing library for blaze-builder-0.4.2.2..

Building library for blaze-builder-0.4.2.2..

: error:

Warning: Couldn't figure out LLVM version!

Make sure you have installed LLVM between [9 and 13)

: error:

Warning: Couldn't figure out LLVM version!

Make sure you have installed LLVM between [9 and 13)

: error:

Warning: Couldn't figure out LLVM version!

Make sure you have installed LLVM between [9 and 13)

: error:

Warning: Couldn't figure out LLVM version!

Make sure you have installed LLVM between [9 and 13)

: 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 )

: 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.6.

Build log ( /Users/socez/.cabal/logs/ghc-8.10.7/bs-rphns-0.8.6-9ea8782d.log ):

Configuring library for base-orphans-0.8.6..

Preprocessing library for base-orphans-0.8.6..

Building library for base-orphans-0.8.6..

: error:

Warning: Couldn't figure out LLVM version!

Make sure you have installed LLVM between [9 and 13)

: 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 )

: 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/socez/.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 )

: 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/socez/.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 )

: 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/socez/.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

| ^^^^^^^^

: 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.8.

Build log ( /Users/socez/.cabal/logs/ghc-8.10.7/hsc2hs-0.68.8-64576920.log ):

Configuring executable 'hsc2hs' for hsc2hs-0.68.8..

Preprocessing executable 'hsc2hs' for hsc2hs-0.68.8..

Building executable 'hsc2hs' for hsc2hs-0.68.8..

: error:

Warning: Couldn't figure out LLVM version!

Make sure you have installed LLVM between [9 and 13)

: error:

Warning: Couldn't figure out LLVM version!

Make sure you have installed LLVM between [9 and 13)

: error:

Warning: Couldn't figure out LLVM version!

Make sure you have installed LLVM between [9 and 13)

: error:

Warning: Couldn't figure out LLVM version!

Make sure you have installed LLVM between [9 and 13)

: error:

Warning: Couldn't figure out LLVM version!

Make sure you have installed LLVM between [9 and 13)

: error:

Warning: Couldn't figure out LLVM version!

Make sure you have installed LLVM between [9 and 13)

[ 1 of 12] Compiling ATTParser ( src/ATTParser.hs, dist/build/hsc2hs/hsc2hs-tmp/ATTParser.o )

: 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.2.

Build log (

/Users/socez/.cabal/logs/ghc-8.10.7/ndxd-trvrsbl-0.1.2-09e8e28c.log ):

Configuring library for indexed-traversable-0.1.2..

Preprocessing library for indexed-traversable-0.1.2..

Building library for indexed-traversable-0.1.2..

: error:

Warning: Couldn't figure out LLVM version!

Make sure you have installed LLVM between [9 and 13)

: error:

Warning: Couldn't figure out LLVM version!

Make sure you have installed LLVM between [9 and 13)

: error:

Warning: Couldn't figure out LLVM version!

Make sure you have installed LLVM between [9 and 13)

: error:

Warning: Couldn't figure out LLVM version!

Make sure you have installed LLVM between [9 and 13)

: 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 )

: 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.3.0.

Build log ( /Users/socez/.cabal/logs/ghc-8.10.7/prmtv-0.7.3.0-fd61c6c9.log ):

Configuring library for primitive-0.7.3.0..

Preprocessing library for primitive-0.7.3.0..

Building library for primitive-0.7.3.0..

: error:

Warning: Couldn't figure out LLVM version!

Make sure you have installed LLVM between [9 and 13)

: error:

Warning: Couldn't figure out LLVM version!

Make sure you have installed LLVM between [9 and 13)

: error:

Warning: Couldn't figure out LLVM version!

Make sure you have installed LLVM between [9 and 13)

: error:

Warning: Couldn't figure out LLVM version!

Make sure you have installed LLVM between [9 and 13)

: error:

Warning: Couldn't figure out LLVM version!

Make sure you have installed LLVM between [9 and 13)

: error:

Warning: Couldn't figure out LLVM version!

Make sure you have installed LLVM between [9 and 13)

: error:

Warning: Couldn't figure out LLVM version!

Make sure you have installed LLVM between [9 and 13)

: error:

Warning: Couldn't figure out LLVM version!

Make sure you have installed LLVM between [9 and 13)

: error:

Warning: Couldn't figure out LLVM version!

Make sure you have installed LLVM between [9 and 13)

: error:

Warning: Couldn't figure out LLVM version!

Make sure you have installed LLVM between [9 and 13)

: error:

Warning: Couldn't figure out LLVM version!

Make sure you have installed LLVM between [9 and 13)

[ 1 of 12] Compiling Control.Monad.Primitive ( Control/Monad/Primitive.hs, dist/build/Control/Monad/Primitive.o, dist/build/Control/Monad/Primitive.dyn_o )

: 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.2 (which is required by exe:tidal

from tidal-1.7.10). See the build log above for details.

Failed to build base-orphans-0.8.6 (which is required by exe:tidal from

tidal-1.7.10). See the build log above for details.

Failed to build clock-0.8.2 (which is required by exe:tidal from

tidal-1.7.10). See the build log above for details.

Failed to build colour-2.3.6 (which is required by exe:tidal from

tidal-1.7.10). See the build log above for details.

Failed to build data-binary-ieee754-0.4.4 (which is required by exe:tidal from

tidal-1.7.10). See the build log above for details.

Failed to build ghc-paths-0.1.0.12 (which is required by exe:tidal from

tidal-1.7.10). The failure occurred during the configure step. The exception

was:

dieVerbatim: user error (cabal: '/Users/socez/.ghcup/bin/ghc' exited with an

error:

: error:

Warning: Couldn't figure out LLVM version!

Make sure you have installed LLVM between [9 and 13)

: 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.8 (which is required by exe:tidal

from tidal-1.7.10). See the build log above for details.

Failed to build indexed-traversable-0.1.2 (which is required by exe:tidal from

tidal-1.7.10). See the build log above for details.

Failed to build primitive-0.7.3.0 (which is required by exe:tidal from

tidal-1.7.10). See the build log above for details.

[4] Atom already installed, skipping...

[6] Installing atom TidalCycles plugin...

Installing tidalcycles to /Users/socez/.atom/packages ✓

[7] SuperCollider already installed, skipping...

[8] Installing SuperCollider Plugins...

% Total % Received % Xferd Average Speed Time Time Time Current

Dload Upload Total Spent Left Speed

100 670 100 670 0 0 1982 0 --:--:-- --:--:-- --:--:-- 2012

100 10.3M 100 10.3M 0 0 7601k 0 0:00:01 0:00:01 --:--:-- 22.1M

[9] Installing the SuperDirt synths and samples (will take some time..)

compiling class library...

Found 855 primitives.

Compiling directory '/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary'

Compiling directory '/Users/socez/Library/Application Support/SuperCollider/Extensions'

Compiling directory '/Users/socez/Library/Application Support/SuperCollider/downloaded-quarks/Vowel'

Compiling directory '/Users/socez/Library/Application Support/SuperCollider/downloaded-quarks/Dirt-Samples'

Compiling directory '/Users/socez/Library/Application Support/SuperCollider/downloaded-quarks/SuperDirt'

WARNING: Could not open directory: '/Users/socez/Library/Application Support/SuperCollider/downloaded-quarks/3Dj'

To resolve this, either create the directory or remove it from your compilation paths.

Compiling directory '/Users/socez/Library/Application Support/SuperCollider/downloaded-quarks/FoxDot'

WARNING: Could not open directory: '/Users/socez/Library/Application Support/SuperCollider/downloaded-quarks/ProteinBioSynthesis'

To resolve this, either create the directory or remove it from your compilation paths.

WARNING: Could not open directory: '/Users/socez/Library/Application Support/SuperCollider/downloaded-quarks/UGenPatterns'

To resolve this, either create the directory or remove it from your compilation paths.

WARNING: Could not open directory: '/Users/socez/Library/Application Support/SuperCollider/downloaded-quarks/UGenStructure'

To resolve this, either create the directory or remove it from your compilation paths.

WARNING: Could not open directory: '/Users/socez/Library/Application Support/SuperCollider/downloaded-quarks/cycle'

To resolve this, either create the directory or remove it from your compilation paths.

Compiling directory '/Users/socez/Library/Application Support/SuperCollider/downloaded-quarks/BatLib'

numentries = 1294066 / 19880822 = 0.065

5837 method selectors, 3406 classes

method table size 21026632 bytes, big table size 159046576

Number of Symbols 15028

Byte Code Size 444345

compiled 574 files in 0.82 seconds

compile done

localhost : setting clientID to 0.

internal : setting clientID to 0.

Class tree inited in 0.01 seconds

*** Welcome to SuperCollider 3.12.2. *** For help type cmd-d.

sc3> include("SuperDirt");"SuperDirt installation complete!".postln;0.exit;

SuperDirt installation complete!

-> 0

sc3>

Exiting sclang (ctrl-D)

sc3>

Exiting sclang (ctrl-D)


Huge number of rows with the above "Exiting sclang (Ctrl + D)" and it's ending with:


sc3> main: waiting for input thread to join...
main: quitting...
cleaning up OSC
Tidal and SuperDirt should now be installed!

Please log out and in again to complete the set up.

You can then follow the instructions here to start everything up for the first time:
https://tidalcycles.org/index.php/Start_tidalcycles_and_superdirt_for_the_first_time
Enjoy!

I'm not sure automated script worked for me either. Most likely I installed it using manual install instructions for macOS from the link in my previous message. Those manual instructions require to install Haskell as prerequisite and that I'm sure I accomplished by using ghcup:

GHCup

Anyway I see you get some errors regarding LLVM and I think I had a similar issue somewhere which I was able to fix by installing arm64 homebrew and then LLVM:

brew install llvm

Maybe install LLVM first, run automated script again and if it doesn't work try manual installation route.

PS:
I also added these into ~/.zshrc

[ -f "/Users/ivxvm/.ghcup/env" ] && source "/Users/ivxvm/.ghcup/env" # ghcup-env

. $HOME/.ghcup/env

export PATH="/usr/local/opt/llvm/bin:$PATH"

export PATH="/opt/homebrew/opt/llvm/bin:$PATH"

Meanwhile, I managed to install it on Monterey. It's working perfectly now.
The thing was that I got troubles in installing Haskell.

Somehow I installed "blaze-builder-0.4.2.2" package and then I ran the automated script and it worked properly.

Thank you very much for implication and sugestions! !:v:

For others, I posted here with some different fixes for common install issues on apple silicon