Could not find module ‘Sound.Tidal.Context’ It is not a module in the current program, or in any known package

Hi,

I tried to install tidal on my M1 laptop. But when I opened Atom there was a problem. As suggested in Trouble installing Tidal library - MacOS Big Sur (Failed to build... Warning: Couldn't figure out LLVM version...) - #17 by dthel, I installed homebrew and LLVM. I made sure to copy the code for brew and LLVM into my path. Then I did

cabal install tidal --lib.

Nevertheless tidalcycles couldnt install:

The log file says:


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

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

was:

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

error:

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

ghc: could not execute: opt

)

Failed to build exe:hsc2hs from hsc2hs-0.68.8 (which is required by exe:tidal

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

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

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

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

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

So the LLVM is not being recognised.

On the side of atom I get this error:

 Could not find module ‘Sound.Tidal.Context’
    It is not a module in the current program, or in any known package.

Just checking on the brew llvvm page it looks like it might install llvm@14 whereas your log file stipulates between 9 and 13. I found my notes for the build I managed to sort out and I used llvm 13.0.0_1.

Found this, it's a bit different: specifies GHC 9.2.2 How to install for M1 Mac

According to this guide GHC 9 doesn't require llvm.... I don't know enough to comment. At the time I installed GHC 8.10.7 and is still @ version 8.10.7. My installation still works on OS X 12.0 m1 Mac.

Was this solved? Have you tried doing a v1-install?

Having this issue as well, not sure how to fix it since im pretty dumb :frowning:

Not really related to the problem of the poster exactly, but I had this message (Could not find module ‘Sound.Tidal.Context’) 2 times on a Windows machine in vs code with the tidal plugin. If I remember correctly it popped up when updating tidal, not really sure though. First time it was solved with

cabal update
cabal v1-install tidal

Second time it looked like I had 2 competing versions of ghc installed (8 vs 9). Terminal showed 9.4.2 but Tidal plugin in vs code showed 8.*. I think somehow Tidal was visible for ghc 9 but invisible for ghc used by vs code. It was solved by uninstalling ghc 8 (I just deleted it actually).

Hope that helps someone when this annoying problem pops up...

i'm not sure this has to do with the install. i was able to finally upgrade to 1.9.2 with stack after several failed attempts with cabal (cabal install, v1-install, --lib) and i also get the Sound.Tidal.Context error as mentioned above...but only in Atom...when i use VSCode the program boots just fine...i've got it pointed to the stack interpreter in both text editors.