uninstalling libraries

Brandon Allbery allbery.b at gmail.com
Mon Nov 13 04:51:17 UTC 2017


cabal and stack, and in the case of stack, cabal new-build, and possibly
cabal sandboxes, you probably shouldn't be trying to uninstall.

And yes, the data lines are telling ghc what to compile / link with, not
files but command line inclusions. And this will be especially messy on OS
X because of the need to group .dylibs together to avoid making the link
commands section too large with multiple RPATH entries. (Which will also
complicate uninstallation there.)

On Sun, Nov 12, 2017 at 11:45 PM, Evan Laforge <qdunkan at gmail.com> wrote:

> On Sun, Nov 12, 2017 at 8:14 PM, Brandon Allbery <allbery.b at gmail.com>
> wrote:
> > This is something of a nasty problem, considering that storing uninstall
> > information separately is not particularly robust. Perhaps ghc-pkg
> should,
> > if it doesn't already, support extension fields that e.g. cabal can use
> to
> > store uninstall information. (But even that potentially has problems,
> given
> > that people are known to copy package registration information between
> > package databases. If there is uninstall information in there, what
> happens
> > if someone uninstalls via one or the other copy?)
>
> Aren't packages only allowed to install a restricted set of things
> into a restricted set of places?  We have the code (.hi, .a, .so,
> etc., in import-dirs / library-dirs), possibly library-specific data
> (I assume that's data-dir), and haddock (haddock-html and
> haddock-interfaces, awkwardly in separate places).
>
> One problem is that I don't fully understand what those fields mean,
> is there documentation somewhere?  And then the fact that these are
> all plural so presumably you could have a lot of them, what is that
> for?
>
> I'm guessing library-dirs means something like "put this on your -L
> line" so it's clearly a mistake to interpret that as "here's where I
> put the library", and you'll have things like /usr/local/lib if you
> need to link external libraries.
>
> Is there any more complicated install plan than put *.a, *.so, *.hi in
> $root/lib/$ghc/$package-$id, put haddock in
> $root/share/doc/$ghc/$package, put ad-hoc junk in
> $root/share/$ghc/$package?  I assume there must be, but who's doing
> that and why?  If it's OS packages, then they have their own uninstall
> mechanisms, presumably not ghc's problem.
>



-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/glasgow-haskell-users/attachments/20171112/76dd00dd/attachment-0001.html>


More information about the Glasgow-haskell-users mailing list