Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 740034 - dev-haskell/cabal-3.0.1.0: emerge fail (234 of 235: Compiling Distribution.Simple.Test)
Summary: dev-haskell/cabal-3.0.1.0: emerge fail (234 of 235: Compiling Distribution.Si...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo's Haskell Language team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-02 08:07 UTC by martin
Modified: 2020-09-04 11:48 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge info (emerge--info.txt,16.90 KB, text/plain)
2020-09-02 08:08 UTC, martin
Details
emerge build log (build.log,40.44 KB, text/plain)
2020-09-02 08:08 UTC, martin
Details
Standard error output when manually trying to build the package. (manual_build_error.log,2.79 KB, text/plain)
2020-09-02 08:11 UTC, martin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description martin 2020-09-02 08:07:47 UTC
When emerging cabal (`emerge cabal`), the compilation fails when compiling the 234th item. When looking at the build log, the last line before failure is:

    [234 of 235] Compiling Distribution.Simple.Test ( Distribution/Simple/Test.hs, dist/build/Distribution/Simple/Test.o )

Looking quickly at the build log if I try to build it manually, it seems there is a problem with Parsec.hs, unfortunately, I am not familiar with haskell, so I can't investigate further than that.

N.B.: From the emerge--info log, you can see that I have the haskell overlay. However, I *do* speak about the regular cabal ebuild.

Reproducible: Always

Steps to Reproduce:
1. emerge -j1 =dev-haskell/cabal-3.0.1.0
2.
3.
Actual Results:  
Standard emerge failure.

Expected Results:  
Build success.
Comment 1 martin 2020-09-02 08:08:27 UTC
Created attachment 657880 [details]
emerge info
Comment 2 martin 2020-09-02 08:08:46 UTC
Created attachment 657882 [details]
emerge build log
Comment 3 martin 2020-09-02 08:11:11 UTC
Created attachment 657884 [details]
Standard error output when manually trying to build the package.

This file is obtained by runing the following commands after an unsuccessul build:
$ cd /var/tmp/portage/dev-haskell/cabal-3.0.1.0/work/Cabal-3.0.1.0
$ ./setup build 2> manual_build_error.log
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2020-09-02 18:13:20 UTC
"""
Distribution/PackageDescription/Parsec.hs:237:9: error:
    • No instance for (Control.Monad.Trans.Class.MonadTrans
                         (StateT SectionS))
        arising from a use of ‘lift’
      There are instances for similar types:
        instance [safe] Control.Monad.Trans.Class.MonadTrans
                          (Control.Monad.Trans.State.Strict.StateT s)
          -- Defined in ‘Control.Monad.Trans.State.Strict’
        instance [safe] Control.Monad.Trans.Class.MonadTrans
                          (Control.Monad.Trans.State.Lazy.StateT s)
          -- Defined in ‘Control.Monad.Trans.State.Lazy’
"""

This probably hints at incompatibility between ghc-8.0's transformers API and requirement of Cabal-3.

Unless you really need it I suggest upgrading ghc to 8.8 first. Normally 'emerge -vuDN @world' would do it. Or you specifically need ghc-8.0?
Comment 5 martin 2020-09-03 17:58:00 UTC
Indeed, with an higher version of ghc it works. 

Do you think it might be useful to update the RDEPEND of the ebuild with `>=dev-lang/ghc-8.8` or something like that (I don't know exactly the lower bound to put) ?
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2020-09-03 19:28:47 UTC
Yeah, that's a very reasonable suggestion!
Comment 7 Larry the Git Cow gentoo-dev 2020-09-04 11:48:39 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9e51610b060ca7f4c21eecefd6a2b666067ce25

commit f9e51610b060ca7f4c21eecefd6a2b666067ce25
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-09-04 11:47:50 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-09-04 11:48:35 +0000

    dev-haskell/cabal: requre ghc-8.8 for 3.0.1.0
    
    Reported-by: martin@vassor.org
    Closes: https://bugs.gentoo.org/740034
    Package-Manager: Portage-3.0.5, Repoman-3.0.1
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 dev-haskell/cabal/cabal-3.0.1.0.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)