Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cabal configure in a sandbox complains "At least the following dependencies are missing" on installed packages

Tags:

haskell

cabal

I have a project, it's inside a sandbox, I introduced a test-suite in my cabal file and it build-depends on hunit ==1.2.*. The problem is when I try to configure:

$ cabal configure --enable-tests
Resolving dependencies...
Configuring MyProject-0.1.0.0...
cabal: At least the following dependencies are missing:
hunit ==1.2.*

A few more attempts to get it to come around:

$ cabal install --dependencies-only
Resolving dependencies...
All the requested packages are already installed:
Use --reinstall if you want to reinstall anyway.

&

$ cabal install hunit
Resolving dependencies...
All the requested packages are already installed:
HUnit-1.2.5.2
Use --reinstall if you want to reinstall anyway.

&

$ cabal install --enable-tests
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: MyProject-0.1.0.0 (user goal)
rejecting: MyProject-0.1.0.0:!test (global constraint requires opposite flag selection)
trying: MyProject-0.1.0.0:*test
next goal: hunit (dependency of MyProject-0.1.0.0:*test)
fail (unknown package: hunit)
Dependency tree exhaustively searched.

--reinstalling did nothing.
I even played with the --user and --global flags, even tho I'm using cabal and not runhaskell, it doesn't help it.
I also tried to delete & re-init the sandbox.
I tried just deleteing the sandbox too, and it still gave me the same error.
ghc-pkg check finds nothing wrong.

What could it be?
By the way a part of me is suspicious that cabal ignores that my project is in a sandbox, since it didn't bother to install some packages that were already on my machine; it does so on my Windows (this is on Ubuntu). Is it possible to get that checked?

Ubuntu 14.04.1 LTS
GHC version: 7.6.3
cabal-install version: 1.20.0.3
Cabal library version: 1.20.0.2

Also tried now with cabal-install 1.16.0.2 without success.

like image 473
MasterMastic Avatar asked Aug 03 '14 18:08

MasterMastic


1 Answers

Package names are case sensitive in Cabal/Hackage, the correct package name is HUnit. Change the line in your cabal file containing:

hunit ==1.2.*

To

HUnit ==1.2.*
like image 135
Rudy Matela Avatar answered Nov 09 '22 15:11

Rudy Matela