Cabal not installing dependencies when needing profiling libraries?

后端 未结 5 655
暖寄归人
暖寄归人 2020-11-28 06:02

I want to compile my program with profiling, so I run:

$ cabal configure --enable-executable-profiling
...
$ cabal build
...
    Could not find module \'Grap         


        
5条回答
  •  忘掉有多难
    2020-11-28 06:35

    Daniel Fischer's answer looks good, but for some reason my ~/.cabal/world library only contained entries for libraries directly installed, and not their dependencies.

    Instead, I dumped out a list of all installed libraries using

    $ ghc-pkg list > list
    

    This lists the libraries installed system-wide and locally. Therefore, I edited the list file to remove the first portion (containing libraries installed system-wide) leaving only the lines after /home//.ghc/.... Finally, I ran

    $ cabal install --reinstall $(cat list) 
    

    This worked for me. You should maybe do --dry-run first. Then go make a pot of tea. Or bake a cake.

提交回复
热议问题