I try to install TidalCycles 1.6.1 locally from the GitHub repository, but I got an error, when I use
cabal install. Interestingly, I can install it successfully using
cabal install tidal --lib
What I try to achieve is that I want to experiment locally with the TidalCycles source code.
The error message is:
cabal: Could not resolve dependencies:
[__0] trying: tidal-parse-0.0.1 (user goal)
[__1] next goal: template-haskell (dependency of tidal-parse)
[__1] rejecting: template-haskell-22.214.171.124/installed-126.96.36.199 (conflict:
tidal-parse => template-haskell>=188.8.131.52 && <2.15)
[__1] skipping: template-haskell-184.108.40.206, template-haskell-220.127.116.11 (has the
same characteristics that caused the previous version to fail: excluded by
constraint '>=18.104.22.168 && <2.15' from 'tidal-parse')
[__1] rejecting: template-haskell-22.214.171.124, template-haskell-126.96.36.199,
template-haskell-188.8.131.52, template-haskell-184.108.40.206, template-haskell-220.127.116.11,
template-haskell-18.104.22.168, template-haskell-22.214.171.124, template-haskell-126.96.36.199,
template-haskell-188.8.131.52, template-haskell-184.108.40.206, template-haskell-220.127.116.11,
template-haskell-18.104.22.168 (constraint from non-upgradeable package requires
[__1] fail (backjumping, conflict set: template-haskell, tidal-parse)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: template-haskell, tidal-parse
- ghci 8.8.3
- cabal 22.214.171.124
- MacOS 10.15.5
I would be very happy for help.
What command are you running?
It should be
cabal install --lib or
cabal v1-install from within the top level folder (where tidal.cabal lives)
The error message appeared when I use
cabal install --lib.
I have removed all tidal references from
~/.ghc and also run
ghc-pkg unregister tidal. Now in the source folder I can use
cabal v1-install which build everything successfully:
However, it seems that no references are created by this?
Can you load the library? Cabal is in a state of flux, so some commands might not work but I think at this point you should have a working system.
Unfortunately no. When I try to import Sound.Tidal.Context in ghci I get this error message:
Prelude> import Sound.Tidal.Context
**<no location info>:**
**Could not load module ‘Sound.Tidal.Context’**
**It is a member of the hidden package ‘tidal-1.6.1’.**
**You can run ‘:set -package tidal’ to expose it.**
**(Note: this unloads all the modules in the current scope.)**
The generated build files with
cabal v1-install end up successfully in
I should be able to add the package with
ghc-pkg expose tidal, but unfortunately this does not work.
And when I start the ghci session for testing with
ghci -package tidal or type in
:set -package tidal, then I get this error message:
Prelude> import Sound.Tidal.Context
**<no location info>:** **error:**
**Could not find module ‘Sound.Tidal.Context’**
**Perhaps you haven't installed the "dyn" libraries for package ‘tidal-1.6.1’?**
**Use -v (or `:set -v` in ghci) to see a list of the files searched for.**
Interestingly, when I download it from the hackage server with
cabal install tidal --lib, everything still works flawlessly even now.
That's very frustrating. When you start ghci, I think it will give you the location of an environment file. You could try deleting that, and re-installing, to see if that helps. Due to a known bug, you will have to delete this file every time you re-install the tidal library.
If that doesn't help, you could report the issue here:
Otherwise, install with
cabal v1-install instead of
cabal install --lib. This will use the older install method which is far less buggy. This is what I do.
Is this perhaps https://github.com/haskell/cabal/issues/6394 ?
My work-around for that is to delete offending lines (mentioning process, directory) from
register etc.) does not respect env files, so you need
ghc-pkg -f ~/.cabal/store/ghc-$(ghc --numeric-version)/package.db list
cf. tidal startup for emacs.
Also, I noticed
tidal-parse in the error message (top of this thread).
I guess this gets built because it appears in
It's not part of the sources that you'd get with
cabal unpack tidal, so that might be the essential difference.
@yaxu - could you perhaps explain what
tidal-parse does and who would need it? Its README is very terse.
Does it get built in CI? https://travis-ci.org/github/tidalcycles/Tidal/jobs/705355378 (yes)
--ignore-project (-z) would help, but https://github.com/haskell/cabal/issues/6942
I deleted the environment file under
~/.ghc/x86_64-darwin-8.8.3/environments/default and that actually fixed the problem for me. Thanks for the help!
@jwaldmann should I have this problem the next time, (i.e when I re-install the tidal library) then I will first try to delete the offending lines in the default. Thanks for the hint!