[Haskell-cafe] Cabal problem, broken packages?

Volker Wysk post at volker-wysk.de
Thu Sep 15 16:39:39 UTC 2022


Am Donnerstag, dem 15.09.2022 um 12:25 -0400 schrieb Brandon Allbery:
> It looks good because you're using it the way you're supposed to
> instead of blindly using --lib to install things. That creates
> dependency issues like what you're having. Basically, don't use --lib
> unless you know what you're doing.
> 
> Remove the environment file, and create projects with dependencies on
> the libraries you want, instead of trying to preinstall them. Cabal
> knows how to manage packages for you so they don't conflict.

I admit that I don't really know what I'm doing, when using cabal. I'veĀ 
built my projects by calling ghc from a generic Makefile for a long time
now. And you're saying I should build them with "cabal build" instead? This
would mean that I must change my long-fostered build environment. 

Looks like I have to do some reading.

Bye,
Volker

> 
> On Thu, Sep 15, 2022 at 12:12 PM Volker Wysk <post at volker-wysk.de> wrote:
> > 
> > Am Donnerstag, dem 15.09.2022 um 16:31 +0100 schrieb Tom Ellis:
> > > On Thu, Sep 15, 2022 at 05:23:10PM +0200, Volker Wysk wrote:
> > > > I've lately set up the Haskell environment on my Linux box, with no
> > > > problems. Then I have installed some packages with "cabal install", again
> > > > without problems. But now I'm trying to install another package and I get a
> > > > dependency conflict. It doesn't seem to matter which package I try to
> > > > install:
> > > 
> > > This is quite weird, because neither directory nor ghc are
> > > dependencies of rfc5051.
> > > 
> > > As a first step, can you try the following and report back whether you
> > > successfully get to a GHCi a prompt?
> > > 
> > > $ cabal repl -z --build-depends rfc5051
> > 
> > This results in:
> > 
> > 
> > desktop ~ $ cabal repl -z --build-depends rfc5051
> > Resolving dependencies...
> > Build profile: -w ghc-8.8.4 -O1
> > In order, the following will be built (use -v for more details):
> >  - rfc5051-0.2 (lib) (requires download & build)
> >  - fake-package-0 (lib) (first run)
> > Downloading  rfc5051-0.2
> > Downloaded   rfc5051-0.2
> > Starting     rfc5051-0.2 (lib)
> > Building     rfc5051-0.2 (lib)
> > Installing   rfc5051-0.2 (lib)
> > Completed    rfc5051-0.2 (lib)
> > Configuring library for fake-package-0..
> > Preprocessing library for fake-package-0..
> > Warning: No exposed modules
> > GHCi, version 8.8.4: https://www.haskell.org/ghc/  :? for help
> > Loaded GHCi configuration from /tmp/cabal-repl.-17863/setcwd.ghci
> > Prelude>
> > 
> > 
> > Looks good, doesn't it..?
> > 
> > Volker
> > _______________________________________________
> > Haskell-Cafe mailing list
> > To (un)subscribe, modify options or view archives go to:
> > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> > Only members subscribed via the mailman list are allowed to post.
> 
> 
> 



More information about the Haskell-Cafe mailing list