I'm trying to compile one of my executables with profiling options. I added the -prof
options in my cabal file. When I do that, I get a message saying
Could not find module ‘Package-X’
Perhaps you haven't installed the profiling libraries for package ‘package-x’?
Use -v to see a list of the files searched for.
How do I do that? I tried cabal install --only-dependency --reinstall
and I get the following response :
All the requested packages are already installed:
Use --reinstall if you want to reinstall anyway.
I already used --reinstall
what should I do ? I also tried cabal configure --enable-profiling-libraries
etc ...
The link suggested by bheklilr helped but didn't straight away.
I ended up adding library-profiling: True
in my .cabal/config
file and reinstall everything.
cabal install --reinstall wolrd
didn't work, maybe because I'm inside a sandbox. However, the good
things about sandboxes is that you can ditch them away so I reinstalled everything using
cabal sandbox delete
cabal sandbox init
cabal install
Even though this solution worked, it's not satisfactory for the following reasons :
I had to modify .cabal/config
which is a global file, whereas in a ideal wolrd
I should have had to only modify my sandbox. However, I didn't try to create a local cabal config file
I had to reinstall EVERYTHING, ie the profiling version of each library as well as the plain version, which was already installed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With