Problem with package.db when I try to start tidal

Hello!
I am trying to start tidal with Atom on endevour os (based on arch) and is saying this:

Cannot browse tidal to obtain informations for autocomplete: Error: Command failed: echo ":browse Sound.Tidal.Context" | "ghci" ghc: can't find a package database at /home/mattin/.cabal/store/ghc-9.0.2/package.db

t> Loaded package environment from /home/mattin/.ghc/x86_64-linux-9.0.2/environments/default

t> ghc: can't find a package database at /home/mattin/.cabal/store/ghc-9.0.2/package.db

I don't know what I have to do to get package.db.
I have already cabal and ghc but I do not get package.db
Can somebody please help me?

Hi @Mattin good to read you, sorry for not seeing this message until now

I'm not sure exactly what's happening here but could you try cabal update; cabal v1-install tidal from the commandline?

Hi Alex,
Thanks a lot for the reply!
When I do the commands, I get this:
[mattin@mattin ~]$ cabal update
Downloading the latest package list from hackage.haskell.org
Updated package list of hackage.haskell.org to the
index-state 2022-09-14T11:21:20Z
To revert to previous state run:
cabal v2-update 'hackage.haskell.org,2022-08-30T12:39:59Z'
[mattin@mattin ~]$ cabal v1-install tidal
Resolving dependencies...
All the requested packages are already installed:
tidal-1.8.1
Use --reinstall if you want to reinstall anyway.

And then when I start tidal on Atom, I get this:

Choose ghc base path

no custom path configured
ghcup not found

  • using default GHC system path definition
    Ghci command: ghci
    Ghc-pkg command: ghc-pkg
    Choose BootTidal.hs path

no custom path configured
not found in current directory

  • found in the tidal installation folder
  • load BootTidal.hs from /usr/share/haskell-tidal/BootTidal.hs
    Cannot browse tidal to obtain informations for autocomplete: Error: Command failed: echo ":browse Sound.Tidal.Context" | "ghci"
    ghc: can't find a package database at /home/mattin/.cabal/store/ghc-9.0.2/package.db
    t> Loaded package environment from /home/mattin/.ghc/x86_64-linux-9.0.2/environments/default
    t> ghc: can't find a package database at /home/mattin/.cabal/store/ghc-9.0.2/package.db

Is there perhaps a problem with the version of cabal that I have?

Or is it the problem the path?
What is clear is that I don't have a file in my computer called package.db

@Mattin Hmm seems ghc has got confused with its pacakges.. When this kind of thing happens I think the easiest way is to delete all the haskell packages and start again..

You can do this by deleting the ~/.ghc and ~/.cabal folders, and then running cabal update and then cabal v1-install tidal again.

I think that should fix it, let me know!

Now it works! Thanks so much Alex. I am really enjoying working with tidalcycles. Fantastic work!!!

1 Like