<div dir="ltr">The short version is what Francesco said. The longer version is that with modern cabal (and stack), libraries are managed by cabal/stack and you don't normally install them directly. For the cases where you need a library to be available outside cabal's implicit sandboxing, there is `cabal install --lib`; but be aware that multiple versions of packages in the resulting environment may cause other build problems down the line, and it's on you to manage the environment file as needed. The proper way to work with libraries outside of a project is "cabal repl" or "stack ghci" as appropriate. For quick one-offs with cabal, you can use e.g. `cabal repl -b HsShellScript`. (I don't know the stack equivalent, sorry.)<div><br></div><div>This whole rigmarole is intended to avoid situations where multiple versions of libraries are in ghc's environment and it picks inconsistent versions, leading to the old "cabal hell".</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 29, 2024 at 9:50 AM Volker Wysk <<a href="mailto:post@volker-wysk.de">post@volker-wysk.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Am Freitag, dem 29.03.2024 um 14:36 +0100 schrieb Francesco Ariis:<br>
> Hello Volker,<br>
> <br>
> Il 29 marzo 2024 alle 14:26 Volker Wysk ha scritto:<br>
> > Hi<br>
> > <br>
> > I've migrated my HsShellScript library to Cabal 3.0 and now I get an error<br>
> > when I try to install it:<br>
> > <br>
> > -----snip-----<br>
> > desktop /usr/local/src/hsshellscript $ cabal install --user<br>
> > Wrote tarball sdist to<br>
> > /usr/local/src/hsshellscript/dist-newstyle/sdist/hsshellscript-3.6.0.tar.gz<br>
> > Resolving dependencies...<br>
> > Error: cabal: Cannot build the executables in the package hsshellscript<br>
> > because it does not contain any executables. Check the .cabal file for the<br>
> > package and make sure that it properly declares the components that you<br>
> > expect.<br>
> > -----snip-----<br>
> <br>
> If you are trying to install a library, use<br>
> <br>
> cabal install --lib<br>
> <br>
> and let us know if it worked as you expected<br>
<br>
The install succeeds with "--lib". It had to be something stupid. It's been<br>
three years since I used cabal and meanwhile things look like they moved<br>
forward.<br>
<br>
There are other errors, but they don't look cabal-related.<br>
<br>
Thanks for your help.<br>
<br>
Volker<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>brandon s allbery kf8nh</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a></div></div></div></div></div>