[Haskell-beginners] Build woes (cabal configure can't find sandboxed deps)

Alex Hammel ahammel87 at gmail.com
Mon Feb 2 20:40:19 UTC 2015


Hmm, nuking ~/.cabal and ~/.ghc seems to have fixed it.

Good old cabal. When in doubt, delete everything.

On Mon, Feb 2, 2015 at 10:22 AM, Alex Hammel <ahammel87 at gmail.com> wrote:

> Hi list,
>
> I've got a number of modules in a project set up like this:
>
> project
> |-- foo
> |-- bar
> |-- baz
> `-- sandbox
>
> where 'foo', 'bar' and 'baz' are modules which depend on one another, and
> 'sandbox' is a sandbox. Before building from scratch, I do a $(cabal
> sandbox init --sandbox=../sandbox) in each of the module folders.
>
> If I run $(cabal install ./foo ./bar ./baz) from the projects/ directory,
> everything is happy. However, if I reconfigure one of the sub-modules with
> different flags, it fails with missing dependencies:
>
> # in foo/
> $ cabal build
> Package has never been configured. Configuring with default flags. If this
> fails, please run configure manually.
> # module builds correctly
>
> $ cabal configure --enable-tests
> Resolving dependencies...
> Configuring foo-0.1...
>
> $ cabal build
>
> dist/setup/setup.hs:13:8:
>     Could not find module ‘System.FilePath.Glob’
>     Perhaps you meant
>       System.FilePath (from filepath-1.3.0.2)
>       System.FilePath.Posix (from filepath-1.3.0.2)
>     Use -v to see a list of the files searched for.
>
> Glob is installed in the sandbox.
>
> I've tried pointing to the sandbox config file manually with both $(cabal
> --sandbox-config-file=project/foo/cabal.sandbox.config) and $(cabal
> --sandbox-config-file=project/cabal.sandbox.config) with the same result.
> Cabal insists that Glob isn't installed until I nuke the foo/dist directory
> and start over.
>
> I figure there's some flag I need to pass to `cabal configure` that I'm
> missing, but I can't figure out what it is. Anybody have any hints?
>
> Cheers,
> Alex
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20150202/2014b081/attachment.html>


More information about the Beginners mailing list