Failed to build exe:hsc2hs from hsc2hs-0.68.7

Hello everyone,
during a workshop I encountered this problem when installing tidal on one laptop which was solved with the help of @Leofltt. This post is for people that will have the same issue in the future.

If you get this error when installing tidal from cabal:

cabal: Failed to build exe:hsc2hs from hsc2hs-0.68.7 (which is required by
tidal-1.7.8). 

It means your ghc version and your cabal version are not compatible, this can be solved by updating ghc to a newer version.

If you have installed with ghcup type this:

ghcup install ghc 9.0.1

and then after the installation is done:

ghcup set ghc 9.0.1

after setting the appropriate version you should be able to install tidal with

cabal install tidal --lib

Hope this solves your problem if you stumble across this :smiley:

4 Likes

For Mac users with the M1 chip this may solve it:

C_INCLUDE_PATH="`xcrun --show-sdk-path`/usr/include/ffi" cabal install tidal --lib

I ran into the same issue, but changing the ghc version didn't work for me.

I found that solution on this post