Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 534194 - haskell-cabal.eclass does not like non-/ ROOT: - /usr/bin/ghc -package Cabal- --make ...: cannot satisfy -package Cabal-
Summary: haskell-cabal.eclass does not like non-/ ROOT: - /usr/bin/ghc -package Cabal-...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Haskell Language team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-01 11:52 UTC by Dennis Schridde
Modified: 2016-07-26 09:05 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,3.03 KB, text/plain)
2015-01-01 11:54 UTC, Dennis Schridde
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Schridde 2015-01-01 11:52:26 UTC
>>> Configuring source in /var/tmp/portage/dev-vcs/git-annex-5.20141203/work/git-annex-5.20141203 ...
 * Using cabal-.
 * Prepending /usr/lib64/ghc-7.8.4 to LD_LIBRARY_PATH
/usr/bin/ghc -package Cabal- --make /var/tmp/portage/dev-vcs/git-annex-5.20141203/work/git-annex-5.20141203/Setup.hs -dynamic -o setup
<command line>: cannot satisfy -package Cabal-
    (use -v for more information)
/usr/bin/ghc -package Cabal- --make /var/tmp/portage/dev-vcs/git-annex-5.20141203/work/git-annex-5.20141203/Setup.hs -o setup
<command line>: cannot satisfy -package Cabal-
    (use -v for more information)
 * ERROR: dev-vcs/git-annex-5.20141203::gentoo failed (configure phase):


Reproducible: Always
Comment 1 Dennis Schridde 2015-01-01 11:54:11 UTC
Created attachment 392846 [details]
build.log

Using dev-haskell/cabal-1.20.0.2.
Comment 2 Dennis Schridde 2015-01-01 12:01:56 UTC
It does not seem to be caused by an incomplete Haskell installation:

# haskell-updater 
Running haskell-updater using GHC 7.8.4
  * Executable: /usr/bin/ghc
  * Library directory: /usr/lib64/ghc-7.8.4
  * Package manager (PM): portage

Searching for packages installed with a different version of GHC.
No old packages found!

Searching for Haskell libraries with broken dependencies.
No broken packages found!


Nothing to build!
Comment 3 Dennis Schridde 2015-01-01 12:33:23 UTC
Using ebuildshell (bug #155161), I see that dev-haskell/cabal is missing in $ROOT:
EBUILD git-annex pkg_setup $ echo $ROOT
/var/lxc/sh/
EBUILD git-annex pkg_setup $ ghc-extractportageversion dev-haskell/cabal

EBUILD git-annex pkg_setup $ ROOT=/
EBUILD git-annex pkg_setup $ ghc-extractportageversion dev-haskell/cabal
1.20.0.2

I assume the git-annex ebuild should check in ROOT=/ instead of the actual ROOT, since cabal is needed for building.
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2015-01-02 19:46:04 UTC
Did it used to work like that?

What haskell-updater version you are using now?
Comment 5 Dennis Schridde 2015-01-03 09:36:51 UTC
(In reply to Sergei Trofimovich from comment #4)
> Did it used to work like that?

This is my first install, so I cannot tell you.

But I installed dev-haskell/cabal-1.20.0.2 into $ROOT and emerging git-annex into $ROOT succeeded afterwards.

> What haskell-updater version you are using now?

app-admin/haskell-updater-1.2.1
Comment 6 Dennis Schridde 2015-01-30 08:17:13 UTC
Issue persists in dev-vcs/git-annex-5.20141231::gentoo
Comment 7 Dennis Schridde 2015-01-30 09:50:20 UTC
This patch solves the issue for me:
--- /var/cache/portage/gentoo/eclass/haskell-cabal.eclass.orig  2015-01-30 09:20:24.265352015 +0100
+++ /var/cache/portage/gentoo/eclass/haskell-cabal.eclass       2015-01-30 09:20:34.437189403 +0100
@@ -161,7 +161,7 @@
                else
                        # We ask portage, not ghc, so that we only pick up
                        # portage-installed cabal versions.
-                       _CABAL_VERSION_CACHE="$(ghc-extractportageversion dev-haskell/cabal)"
+                       _CABAL_VERSION_CACHE="$(ROOT=/ ghc-extractportageversion dev-haskell/cabal)"
                fi
        fi
        echo "${_CABAL_VERSION_CACHE}"
Comment 8 Sergei Trofimovich (RETIRED) gentoo-dev 2015-01-30 15:55:06 UTC
(In reply to Dennis Schridde from comment #7)
> This patch solves the issue for me:
> --- /var/cache/portage/gentoo/eclass/haskell-cabal.eclass.orig  2015-01-30
> 09:20:24.265352015 +0100
> +++ /var/cache/portage/gentoo/eclass/haskell-cabal.eclass       2015-01-30
> 09:20:34.437189403 +0100
> @@ -161,7 +161,7 @@
>                 else
>                         # We ask portage, not ghc, so that we only pick up
>                         # portage-installed cabal versions.
> -                       _CABAL_VERSION_CACHE="$(ghc-extractportageversion
> dev-haskell/cabal)"
> +                       _CABAL_VERSION_CACHE="$(ROOT=/
> ghc-extractportageversion dev-haskell/cabal)"
>                 fi
>         fi
>         echo "${_CABAL_VERSION_CACHE}"

That looks sane but to not to break gentoo-prefix it needs to be
ROOT="${EPREFIX}", or something like that.
Comment 9 Dennis Schridde 2015-06-02 10:12:15 UTC
Any news? I still get git-annex to compile when setting ROOT=${EPREFIX}, as you suggested.
Comment 10 Dennis Schridde 2015-09-03 21:55:15 UTC
The issue still exists - have you had any progress with incorporating the patch mentioned earlier?
Comment 11 Sergei Trofimovich (RETIRED) gentoo-dev 2016-05-23 22:19:15 UTC
Pushed a fix to overlay to test it lightly: https://github.com/gentoo-haskell/gentoo-haskell/commit/b867158b2357c6c1c35308edec7dcb6f5e7c71f9
Comment 12 Sergei Trofimovich (RETIRED) gentoo-dev 2016-05-31 21:39:31 UTC
Pushed to the main tree as: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2db4176c329e5e99e68f47dcb058c55d434bb64e

Thanks for the report and fix!
Comment 13 Benda Xu gentoo-dev 2016-07-26 08:37:59 UTC
(In reply to Sergei Trofimovich from comment #8)
> (In reply to Dennis Schridde from comment #7)
> > This patch solves the issue for me:
> > --- /var/cache/portage/gentoo/eclass/haskell-cabal.eclass.orig  2015-01-30
> > 09:20:24.265352015 +0100
> > +++ /var/cache/portage/gentoo/eclass/haskell-cabal.eclass       2015-01-30
> > 09:20:34.437189403 +0100
> > @@ -161,7 +161,7 @@
> >                 else
> >                         # We ask portage, not ghc, so that we only pick up
> >                         # portage-installed cabal versions.
> > -                       _CABAL_VERSION_CACHE="$(ghc-extractportageversion
> > dev-haskell/cabal)"
> > +                       _CABAL_VERSION_CACHE="$(ROOT=/
> > ghc-extractportageversion dev-haskell/cabal)"
> >                 fi
> >         fi
> >         echo "${_CABAL_VERSION_CACHE}"
> 
> That looks sane but to not to break gentoo-prefix it needs to be
> ROOT="${EPREFIX}", or something like that.

I am sorry, ROOT="${EPREFIX}" is not necessary. 

In the definition of best_version()

  https://gitweb.gentoo.org/proj/portage.git/tree/bin/phase-helpers.sh#n908

EPREFIX is implicitly appended to ROOT.

Calling best_version with ROOT="${EPREFIX}" gives EROOT=${EPREFIX}${EPREFIX}, which is not intended.
Comment 14 Benda Xu gentoo-dev 2016-07-26 09:05:44 UTC
In tree, thanks!