GHC 8.8.1 and cabal-install 3.0 not compatible with ghc-pkg

George Colpitts <[email protected]>
Newsgroups gmane.comp.lang.haskell.glasgow.user,gmane.comp.lang.haskell.ghc.devel,gmane.comp.lang.haskell.cafe
Message-ID <CAB-d4A51atytAvrYhgRcc2XbnX6b8OHOE8A77dbCdOaUg1Zj_Q@mail.gmail.com>
Unfortunately ghc 8.8.1 and cabal-install 3.0 are not compatible with
ghc-pkg as documented in
https://github.com/haskell/cabal/issues/6262#issuecomment-538850477. As
Daniel Grober wrote there:

I think this is expected behaviour, at least from the cabal side of things.
Version 3.0.0.0 switched to using v2-build by default so installed
libraries are now registered into the "default" package environment file in
.ghc/*/environments/default as well as a package-db in
.cabal/store/ghc-*/package.db which GHC doesn't know about by itself.

AFAICS ghc-pkg simply doesn't have support for listing package environments
which sort of kind of makes sense but also breaks this workflow. I think
this should be reported as a GHC bug but I'm not sure it would even be a
good idea to add pkg-env support to ghc-pkg.



I thought this might be a ghc issue but since nobody else was complaining I
assumed I must have done something wrong. Should I file a ghc bug ?

Thanks
George



On Sat, Sep 7, 2019 at 6:20 PM George Colpitts <[email protected]>
wrote:

> Thanks for everybody's responses. I figured out that the following
>
> cabal-install users should note that cabal-install-3.0 or later is
> required for use with GHC 8.8.
>
>
> means  I should have cabal-install-3.0 before installing 8.8.1. Once I did
> that everything is fine.
>
> Maybe configure should give an error if the user does not
> have cabal-install-3.0?
>
> Thanks
> George
>
>
> On Fri, Sep 6, 2019 at 1:48 PM Shayne Fletcher <[email protected]>
> wrote:
>
>> I got there by doing,
>> ```
>>   cabal v2-install --installdir=~/.cabal/bin alex
>>   cabal v2-install --installdir=~/.cabal/bin happy
>> ```
>> and things seemed to be going smoothly enough after that.
>>
>> On Fri, Sep 6, 2019 at 12:08 PM Carter Schonwald <
>> [email protected]> wrote:
>>
>>> V1 or v2 install?
>>>
>>> On Mon, Sep 2, 2019 at 11:42 AM George Colpitts <
>>> [email protected]> wrote:
>>>
>>>> https://www.haskell.org/ghc/blog/20190825-ghc-8.8.1-released.html says
>>>>
>>>> cabal-install users should note that cabal-install-3.0 or later is
>>>> required for use with GHC 8.8.
>>>>
>>>> but this seems wrong or have I done something wrong?
>>>>
>>>> $ cabal install cabal-install
>>>> cabal install cabal-install
>>>> ...
>>>>
>>>> Resolving dependencies...
>>>> cabal: Could not resolve dependencies:
>>>> [__0] trying: cabal-install-3.0.0.0 (user goal)
>>>> [__1] next goal: time (dependency of cabal-install)
>>>> [__1] rejecting: time-1.9.3/installed-1.9... (conflict: cabal-install =>
>>>> base>=4.8 && <4.13, time => base==4.13.0.0/installed-4.1...)
>>>> [__1] trying: time-1.9.3
>>>> [__2] next goal: stm (dependency of cabal-install)
>>>> [__2] rejecting: stm-2.5.0.0/installed-2.5... (conflict: cabal-install
>>>> =>
>>>> base>=4.8 && <4.13, stm => base==4.13.0.0/installed-4.1...)
>>>> [__2] trying: stm-2.5.0.0
>>>> [__3] next goal: process (dependency of cabal-install)
>>>> [__3] rejecting: process-1.6.5.1/installed-1.6... (conflict:
>>>> cabal-install =>
>>>> base>=4.8 && <4.13, process => base==4.13.0.0/installed-4.1...)
>>>> [__3] trying: process-1.6.5.1
>>>> [__4] next goal: pretty (dependency of cabal-install)
>>>> [__4] rejecting: pretty-1.1.3.6/installed-1.1... (conflict:
>>>> cabal-install =>
>>>> base>=4.8 && <4.13, pretty => base==4.13.0.0/installed-4.1...)
>>>> [__4] trying: pretty-1.1.3.6
>>>> [__5] next goal: network (dependency of cabal-install)
>>>> [__5] rejecting: network-3.1.0.1/installed-CeX... (conflict:
>>>> cabal-install =>
>>>> base>=4.8 && <4.13, network => base==4.13.0.0/installed-4.1...)
>>>> [__5] trying: network-3.1.0.1
>>>> [__6] trying: hackage-security-0.5.3.0 (dependency of cabal-install)
>>>> [__7] next goal: template-haskell (dependency of hackage-security)
>>>> [__7] rejecting: template-haskell-2.15.0.0/installed-2.1... (conflict:
>>>> cabal-install => base>=4.8 && <4.13, template-haskell =>
>>>> base==4.13.0.0/installed-4.1...)
>>>> [__7] rejecting: template-haskell-2.15.0.0, template-haskell-2.14.0.0,
>>>> template-haskell-2.13.0.0, template-haskell-2.12.0.0,
>>>> template-haskell-2.11.1.0, template-haskell-2.11.0.0,
>>>> template-haskell-2.10.0.0, template-haskell-2.9.0.0,
>>>> template-haskell-2.8.0.0,
>>>> template-haskell-2.7.0.0, template-haskell-2.6.0.0,
>>>> template-haskell-2.5.0.0,
>>>> template-haskell-2.4.0.1, template-haskell-2.4.0.0,
>>>> template-haskell-2.3.0.1,
>>>> template-haskell-2.3.0.0, template-haskell-2.2.0.0 (constraint from
>>>> non-upgradeable package requires installed instance)
>>>> [__7] fail (backjumping, conflict set: cabal-install, hackage-security,
>>>> template-haskell)
>>>> After searching the rest of the dependency tree exhaustively, these
>>>> were the
>>>> goals I've had most trouble fulfilling: base, cabal-install, directory,
>>>> template-haskell, process, time, network, pretty, hackage-security,
>>>> deepseq,
>>>> HTTP, stm, cabal-install:lib
>>>>
>>>>
>>>> On Mon, Aug 26, 2019 at 6:25 AM Ben Gamari <[email protected]> wrote:
>>>>
>>>>>
>>>>> Hello everyone,
>>>>>
>>>>> The GHC team is pleased to announce the release candidate for GHC
>>>>> 8.8.1.
>>>>> The source distribution, binary distributions, and documentation are
>>>>> available at
>>>>>
>>>>>     https://downloads.haskell.org/ghc/8.8.1
>>>>>
>>>>> This release is the culmination of over 3000 commits by over one
>>>>> hundred
>>>>> contributors and has several new features and numerous bug fixes
>>>>> relative to GHC 8.6:
>>>>>
>>>>>  * Visible kind applications are now supported (GHC Proposal #15)
>>>>>
>>>>>  * Profiling now works correctly on 64-bit Windows (although still may
>>>>>    be problematic on 32-bit Windows due to platform limitations; see
>>>>>    #15934)
>>>>>
>>>>>  * A new code layout algorithm for amd64's native code generator
>>>>>    significantly improving the runtime performance of some kernels
>>>>>
>>>>>  * The introduction of a late lambda-lifting pass which may reduce
>>>>>    allocations significantly for some programs.
>>>>>
>>>>>  * Further work on Trees That Grow, enabling improved code re-use of
>>>>> the
>>>>>    Haskell AST in tooling
>>>>>
>>>>>  * Users can write `forall` in more contexts (GHC Proposal #7)
>>>>>
>>>>>  * The pattern-match checker is now more precise in the presence of
>>>>>    strict fields with uninhabited types.
>>>>>
>>>>>  * A comprehensive audit of GHC's memory ordering barriers has been
>>>>>    performed, resulting in a number of fixes that should significantly
>>>>>    improve the reliability of programs on architectures with
>>>>>    weakly-ordered memory models (e.g. PowerPC, many ARM and AArch64
>>>>>    implementations).
>>>>>
>>>>>  * A long-standing linker limitation rendering GHCi unusable with
>>>>>    projects with cyclic symbol dependencies has been fixed (#13786)
>>>>>
>>>>>  * Further work on the Hadrian build system
>>>>>
>>>>>  * Countless miscellaneous bug-fixes
>>>>>
>>>>> Unfortunately, due to a build issue (#17108) found late in the release
>>>>> process
>>>>> i386 Windows builds are currently unavailable. These will be provided
>>>>> in
>>>>> the coming weeks.
>>>>>
>>>>> As always, if anything looks amiss do let us know.
>>>>>
>>>>> Happy compiling!
>>>>>
>>>>> Cheers,
>>>>>
>>>>> - Ben
>>>>>
>>>>>
>>>>> [1]
>>>>> https://downloads.haskell.org/ghc/8.8.1/docs/html/users_guide/8.8.1-notes.html
>>>>> _______________________________________________
>>>>> Glasgow-haskell-users mailing list
>>>>> [email protected]
>>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users
>>>>>
>>>> _______________________________________________
>>>> Glasgow-haskell-users mailing list
>>>> [email protected]
>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users
>>>>
>>> _______________________________________________
>>> ghc-devs mailing list
>>> [email protected]
>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>>>
>>
>>
>> --
>> *Shayne Fletcher*
>> Language Engineer */* +1 917 699 7663
>> *Digital Asset* <https://digitalasset.com/>, creators of *DAML
>> <https://daml.com/>*
>>
>> This message, and any attachments, is for the intended recipient(s) only,
>> may contain information that is privileged, confidential and/or proprietary
>> and subject to important terms and conditions available at
>> http://www.digitalasset.com/emaildisclaimer.html. If you are not the
>> intended recipient, please delete this message.
>
>

_______________________________________________
Glasgow-haskell-users mailing list
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.