Cabal woe

Matthew Pickering matthewtpickering at gmail.com
Tue Jul 9 09:20:56 UTC 2024


`cabal install --lib` is very hard to use properly. I would advise against it.

It is much easier to create a simple cabal project and use normal
cabal build commands. I packaged things in a repo for you.

https://github.com/mpickering/t25064

```
cabal build -w ghc-9.6.2 (fails)
cabal build -w /path/to/devel/compiler (fails with error message)
```

Matt

On Tue, Jul 9, 2024 at 9:58 AM Simon Peyton Jones
<simon.peytonjones at gmail.com> wrote:
>
> Friends
>
> I'm trying to repro #25064 with my development build of GHC.  The test case depends on packages `primitive` and `hashtables`.  So I try this (see below).
>
> Alas, apparently after the `cabal install`, it can't find Prelude.
>
> What should I do?  I tried removing the "environments" file, whatever that is, which then meant it could find Prelude -- but the libraries were no longer installed.
>
> I lack a decent model of what is going on with installing packages for my development builds.   Is there a write up anywhere?
>
> Thanks
>
> Simon
>
>
> bash$ cabal install --lib hashtables primitive --with-compiler $HOME/code/HEAD/$s2
> Warning: Unknown/unsupported 'ghc' version detected (Cabal 3.10.1.0 supports
> 'ghc' version < 9.8): /home/simonpj/code/HEAD/_build/stage1/bin/ghc is version
> 9.11.20240517
> Warning: Unknown/unsupported 'ghc' version detected (Cabal 3.10.1.0 supports
> 'ghc' version < 9.8): /home/simonpj/code/HEAD/_build/stage1/bin/ghc is version
> 9.11.20240517
> Resolving dependencies...
> bash$  ~/code/HEAD/$s2 -c T25064.hs
> Loaded package environment from
> T25064.hs:1:8: error: [ ]8;;https://errors.haskell.org/messages/GHC-87110 \GHC-87110 ]8;; \]
>     Could not load module ‘Prelude’.
>     It is a member of the hidden package ‘base-4.20.0.0’.
>     Use -v to see a list of the files searched for.
>   |
> 1 | module Bug where
>   |        ^^^
>
> bash$ rm /home/simonpj/.ghc/x86_64-linux-9.11.20240517/environments/default
> bash$ ~/code/HEAD/$s2 -c T25064.hs
> T25064.hs:3:1: error: [ ]8;;https://errors.haskell.org/messages/GHC-61948 \GHC-61948 ]8;; \]
>     Could not find module ‘Control.Monad.Primitive’.
>     Perhaps you meant Control.Monad.Writer (from mtl-2.3.1)
>     Use -v to see a list of the files searched for.
>   |
> 3 | import Control.Monad.Primitive
>   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> T25064.hs:4:1: error: [ ]8;;https://errors.haskell.org/messages/GHC-87110 \GHC-87110 ]8;; \]
>     Could not find module ‘Data.HashTable.ST.Basic’.
>     Use -v to see a list of the files searched for.
>   |
> 4 | import qualified Data.HashTable.ST.Basic as H
>   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


More information about the ghc-devs mailing list