[Haskell-cafe] Bug in GHC or cabal-install?

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Mon Jun 5 02:58:05 UTC 2017


I don't think it's a problem with Cabal, but the version of base going
by the error: versionBranch is from base, and that error message is
talking about compiling the setup.hs from wxc.

On 5 June 2017 at 12:03, Henk-Jan van Tuyl <b.vantuyl1 at upcmail.nl> wrote:
>
> The strange thing is, that the right version of Cabal is picked, the first
> time wxc is compiled. But when invoking cabal-install the second time, the
> setup-depends section seems to be ignored (or at least the Cabal < 2 part).
> This does not happen with GHC 8.0.2
>
> (By the way, cabal-install tries to compile setup.hs again, even though
> nothing has changed.)
>
> Regards,
> Henk-Jan van Tuyl
>
>
>
> On Sun, 04 Jun 2017 13:39:17 +0200, Ivan Lazar Miljenovic
> <ivan.miljenovic at gmail.com> wrote:
>
>> This is from a limitation/bug with Cabal-the-library, in that there
>> are typically no dependency checks for custom Setup.[l]hs
>> configurations.
>>
>> wxc has such a custom one:
>> http://hackage.haskell.org/package/wxc-0.92.3.0/src/Setup.hs
>>
>> versionBranch is from Data.Version in base, and it appears that the in
>> this GHC pre-release there's been a change in base that removed this
>> function.
>>
>> On 4 June 2017 at 19:45, Henk-Jan van Tuyl <hjgtuyl at chello.nl> wrote:
>>>
>>>
>>> L.S.,
>>>
>>> I am trying the prerelease of GHC, version 8.2.0.20170507
>>>
>>> I adapted wxHaskell to the new packages that come with the new GHC and it
>>> compiles now, but only the first time. If I compile it a second time,
>>> even
>>> if nothing has changed, the information from the custom-setup section of
>>> the wxc.cabal file seems to be forgotten. This section looks like this:
>>>
>>> custom-setup
>>>   setup-depends:
>>>     base,
>>>     Cabal < 2,
>>>     containers,
>>>     bytestring,
>>>     split,
>>>     process,
>>>     directory,
>>>     filepath
>>> (I am using cabal-install 1.24.0.2)
>>>
>>> Output from the second time I try to install wxHaskell:
>>>
>>>> cabal install --force-reinstalls --reinstall wxdirect wxc wxcore wx
>>>
>>>
>>> [1 of 1] Compiling Main             (
>>> X:\Temp\wxHaskell\wxcore\dist\setup\setup.hs,
>>> X:\Temp\wxHaskell\wxcore\dist\setup\Main.o )
>>> Linking X:\Temp\wxHaskell\wxcore\dist\setup\setup.exe ...
>>> [1 of 1] Compiling Main             (
>>> X:\Temp\wxHaskell\wxc\dist\setup\setup.hs,
>>> X:\Temp\wxHaskell\wxc\dist\setup\Main.o )
>>>
>>> X:\Temp\wxHaskell\wxc\dist\setup\setup.hs:505:61: error:
>>>                       Variable not in scope: versionBranch :: Version ->
>>> [a0]
>>>                       |
>>> 505 |           full_ver = (concat . intersperse "." . map show .
>>> versionBranch) ver
>>>                       |
>>> ^^^^^^^^^^^^^
>>>
>>> This error message indicates that the wrong version of Cabal (2.0) is
>>> used
>>> to compile the wxcore setup.hs
>>> It looks like a cabal-install bug, but this does not happen when I
>>> use GHC 8.0.2; should I write a GHC bug ticket?
>>>
>>> Regards,
>>> Henk-Jan van Tuyl
>
>
>
> --
> Folding at home
> What if you could share your unused computer power to help find a cure? In
> just 5 minutes you can join the world's biggest networked computer and get
> us closer sooner. Watch the video.
> http://foldingathome.stanford.edu/
>
>
> http://Van.Tuyl.eu/
> http://members.chello.nl/hjgtuyl/tourdemonad.html
> Haskell programming
> --



-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
http://IvanMiljenovic.wordpress.com


More information about the Haskell-Cafe mailing list