Skip to content
This repository has been archived by the owner on Apr 25, 2020. It is now read-only.

Failed to install ghc-mod with ghc 7.10 & cabal 1.22 #437

Closed
tonyday567 opened this issue Jan 15, 2015 · 111 comments
Closed

Failed to install ghc-mod with ghc 7.10 & cabal 1.22 #437

tonyday567 opened this issue Jan 15, 2015 · 111 comments

Comments

@tonyday567
Copy link

From a fresh clone, cabal install fails with:

Language/Haskell/GhcMod/Gap.hs:256:18:
Not in scope: data constructor ‘ExposePackageId’
Perhaps you meant ‘ExposePackage’ (imported from DynFlags)

ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.10.0.20141222
~/git/ghc-mod ghc710 master*
cabal --version
cabal-install version 1.22.0.0
using version 1.22.0.0 of the Cabal library

@DanielG
Copy link
Owner

DanielG commented Jan 16, 2015

This is all fixed in my fork, I'm just finishing up a few things before releasing it as for example case splitting is currently broken with 7.10 :/

@tonyday567
Copy link
Author

OK, thanks Daniel. Looking forward to the upgrade :)

@ebenTill
Copy link

ebenTill commented Feb 7, 2015

Are there any updates on this? Also (expectedly) affects Cabel 1.23. Missing ghc-mod a lot!

@DanielG
Copy link
Owner

DanielG commented Feb 7, 2015

Working on it still, unfortunately I managed to break case splitting with my changes somehow so I can't release this yet :/

@fhaust
Copy link

fhaust commented Feb 22, 2015

Anything we could do to make this go away?

@Fizzixnerd
Copy link

Any word on an update on this?

@vbettaque
Copy link

I would also appreciate an update on this issue. It's really driving me nuts!

@DanielG
Copy link
Owner

DanielG commented Mar 30, 2015

The workaround is basically to downgrade ghc for now as work has me rather tied up at the moment so I don't have any time to fix this properly, sorry. The GHC 7.10 support is all mangled up with a whole lot of other far reaching changes in my fork so It's not really feasible to release anything without finishing all that up first. (See: master...DanielG:master)

@taladar
Copy link

taladar commented Mar 31, 2015

Downgrading GHC also forces a downgrade of cabal-install below 1.22 since ghc-mod does not work with that one either.

@oblitum oblitum mentioned this issue Apr 2, 2015
@cartazio
Copy link
Contributor

cartazio commented Apr 3, 2015

@DanielG would you like help from hackage trustees to cut a version that works with 7.10 sooner (how can @bergmark @hvr, myself, etc help?)

@DanielG
Copy link
Owner

DanielG commented Apr 3, 2015

Right now I'm trying to fix all the failures in the test suite, which I thought I already had working at some point, but It's going quite slowly as I only have a few hours every few days. I'm not sure anyone would really be able to help much there without digging quite deep into the code but if anyone wants to help with that or testing in general just swing by IRC and I can give some guidance on how to help. So far people have only been complaining ;)

Not sure how hackage trustees specifically would be any more help than just anyone willing to spend some time on this.

@cartazio
Copy link
Contributor

cartazio commented Apr 3, 2015

I'll see if I can find some time. If you want some faster help, a post to
haskell cafe or reddit might result in someone getting it sorted this weeke
nd
On Apr 3, 2015 5:56 PM, "Daniel Gröber" notifications@github.com wrote:

Right now I'm trying to fix all the failures in the test suite, which I
thought I already had working at some point, but It's going quite slowly as
I only have a few hours every few days. I'm not sure anyone would really be
able to help much there without digging quite deep into the code but if
anyone wants to help with that or testing in general just swing by IRC and
I can give some guidance on how to help. So far people have only been
complaining ;)

Not sure how hackage trustees specifically would be any more help than
just anyone willing to spend some time on this.


Reply to this email directly or view it on GitHub
#437 (comment)
.

@joshacheson
Copy link

Anyone have advice regarding explicit steps I can take to work around this for now? I'm using https://ghcformacosx.github.io/ and have versions of ghc/cabal install up to date with that.

@oblitum
Copy link

oblitum commented Apr 6, 2015

@joshacheson exactly being up to date is the problem. Solving for now means: downgrade.

@joshacheson
Copy link

Yeah sorry, I'm just not quite sure how to downgrade / obtain an older version of this. Sorry for bein such a newb.

edit: I realize this isn't the obligation of anyone who works on ghc-mod to tell me this, but if oyu know off-hand it'd be a great help. Otherwise no worries.

@oblitum
Copy link

oblitum commented Apr 6, 2015

@joshacheson there's an older version at the same website. You just need to stick with that and wipe out the new one from your system (ghc, cabal, and the cabal home).

@wuciawe
Copy link

wuciawe commented Apr 6, 2015

@joshacheson I just downgrade to ghc 7.8.4 and cabal 1.20.0.3, and succeed in installing ghc-mod

@geraldus
Copy link

geraldus commented Apr 8, 2015

Any progress on GHC 7.10 support? Having exact same error:

[ 9 of 38] Compiling Language.Haskell.GhcMod.Gap ( Language/Haskell/GhcMod/Gap.hs, dist/build/Language/Haskell/GhcMod/Gap.o )

Language/Haskell/GhcMod/Gap.hs:256:18:
    Not in scope: data constructor ‘ExposePackageId’
    Perhaps you meant ‘ExposePackage’ (imported from DynFlags)

@behr328
Copy link

behr328 commented Apr 8, 2015

Experiencing the same issue here as well
"""""
Language/Haskell/GhcMod/Utils.hs:45:51: Warning:
In the use of ‘strMsg’
(imported from Language.Haskell.GhcMod.Error, but defined in Control.Monad.Trans.Error):
Deprecated: "Use Control.Monad.Trans.Except instead"
[ 8 of 38] Compiling Language.Haskell.GhcMod.Types ( Language/Haskell/GhcMod/Types.hs, dist/build/Language/Haskell/GhcMod/Types.o )
[ 9 of 38] Compiling Language.Haskell.GhcMod.Gap ( Language/Haskell/GhcMod/Gap.hs, dist/build/Language/Haskell/GhcMod/Gap.o )

Language/Haskell/GhcMod/Gap.hs:256:18:
Not in scope: data constructor ‘ExposePackageId’
Perhaps you meant ‘ExposePackage’ (imported from DynFlags)
cabal: Error: some packages failed to install:
ghc-mod-5.2.1.2 failed during the building phase. The exception was:
ExitFailure 1

"""

@oblitum
Copy link

oblitum commented Apr 8, 2015

Guys, everybody will be having this issue! There're two options solely, help or downgrade.

@hellerve
Copy link

hellerve commented Apr 8, 2015

In case anyone wants to start working on this (I do not have the insight into GHC nor ghc-mod and don't feel competent enough to fix this), there is some things I found (take everything I say with a grain of salt):
The missing data constructor ExposePackageId is still in DynFlags, according to the docs. However, in GHC commit 4accf60, it was integrated into the ExposePackage constructor, which in turn has a data constructor PackageIdArg, which should be equivalent.

I hope this helps.

@jonschoning
Copy link

DanielG has a lot of interconnected pending changes -- you'd need guidance from him first.

@geraldus
Copy link

geraldus commented Apr 8, 2015

I can confirm that Daniel's [1] fork (upcoming release) work well with GHC 7.8.4 and cabal-1.22. I've tried to look at sources of ghc-mod because of cabal-1.22 issue, but unfortunately my current experience is too small to make anything helpful.
[1] https://github.com/DanielG/ghc-mod

I heard that GHC 7.10 should eliminate cabal-1.22 issue, and hoped that it's possible to build ghc-mod with it.

@kilovanni
Copy link

I had huge problems with ghc-mod, vim and syntastic, but everything works now.

I followed HuStmpHrrr advice and modified the vesion in the .cabal file to the latest. The 0 version gave problems.

The build problem still persists if I try to install it using the hackage repos.

@CumpsD
Copy link

CumpsD commented Jul 29, 2015

I'm one of those Windows users :) Started learning Haskell yesterday and wanted to setup Atom integration, which needed ghc-mod, and ran into this issue to.

Am I correct the solution at this moment is still simply the following?

git clone git@github.com:kazu-yamamoto/ghc-mod.git
cabal install ghc-mod

@DanielG
Copy link
Owner

DanielG commented Jul 29, 2015

cd ghc-mod; cabal install . otherwise cabal will pull the one from hackage.

On 29 July 2015 11:49:58 CEST, David Cumps notifications@github.com wrote:

I'm one of those Windows users :) Started learning Haskell yesterday
and wanted to setup Atom integration, which needed ghc-mod, and ran
into this issue to.

Am I correct the solution at this moment is still simply the following?

git clone git@github.com:kazu-yamamoto/ghc-mod.git
cabal install ghc-mod

Reply to this email directly or view it on GitHub:
#437 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

@CumpsD
Copy link

CumpsD commented Jul 29, 2015

I added a trailing slash, seems to have worked too

cabal install ghc-mod/

@taladar
Copy link

taladar commented Jul 29, 2015

You should set a version in ghc-mod.cabal if you compile from source since some editor plugins check the version string and can't handle the 0 there.

@eigengrau
Copy link

Another issue with the 0 version is that you can’t just use cabal sandbox add-source; cabal install ghc-mod anymore. Usually, if the version is the same, Cabal will prefer the add-source package if you issue cabal install ghc-mod. Because of the 0, you have to explicly say cabal install ghc-mod==0, or you have to cabal install /path/to-repository.

@obadz
Copy link

obadz commented Jul 31, 2015

For those working Nix who want to use ghc-mod from git, you can put something like this in your shell.nix to override the ghc-mod derivation:

    (ghc-mod.overrideDerivation (attrs: {
      src = pkgs.fetchFromGitHub {
        owner = "kazu-yamamoto";
        repo = "ghc-mod";
        rev = "4b2be9c9edbd377c3d95b6685ab53e7c5270edea";
        sha256 = "1x8mifvwnlh9nsyq2zyg2fakqd8bam07z983wm3m6p2nm77aq85m";
      };  
      nativeBuildInputs = [ cabal-helper cereal ] ++ attrs.nativeBuildInputs;
      postInstall = ""; 
    })) 

@missingfaktor
Copy link

@CumpsD, your comment saved a lot of time for me. Thank you.

@schrepfler
Copy link

👍 to get Atom ghc integration working with ghc 7.10

@oblitum
Copy link

oblitum commented Aug 12, 2015

\o/

@lyhyl
Copy link

lyhyl commented Aug 13, 2015

@CumpsD I'm a windows(10) user too, but I run into the same problem again while setting up Atom env. Do I need some other operations?

@HuStmpHrrr
Copy link

how come this lasts so long... if the master is fine now why don't upload it.

@DanielG
Copy link
Owner

DanielG commented Aug 14, 2015

Feel free to speed things along by fixing one of these: https://github.com/kazu-yamamoto/ghc-mod/milestones/v5.3.0.0 :P

But seriously if we get that stderr stuff finished today we'll probably do the release this evening and fix the other issues later.

@anyong
Copy link

anyong commented Aug 14, 2015

Relatively new to Haskell, trying to get this set up and cannot build ghc-mod on Windows 10.

I tried hackage cabal install ghc-mod at first, got the error message which brought me to this thread, and then tried cloning and installing both this master and the master from DanielG's fork; here's the output (it's different from the previous errors pasted in this issue, but I haven't cross-referenced all of the linked issues here yet):

Building ghc-mod-0...
Preprocessing library ghc-mod-0...
[ 1 of 41] Compiling Language.Haskell.GhcMod.Read ( Language\Haskell\GhcMod\Read.hs, dist\dist-sandbox-eec368b6\build\Language\Haskell\GhcMod\Read.o )
[ 2 of 41] Compiling Paths_ghc_mod    ( dist\dist-sandbox-eec368b6\build\autogen\Paths_ghc_mod.hs, dist\dist-sandbox-eec368b6\build\Paths_ghc_mod.o )
[ 3 of 41] Compiling Utils            ( Utils.hs, dist\dist-sandbox-eec368b6\build\Utils.o )
[ 4 of 41] Compiling Language.Haskell.GhcMod.Caching.Types ( Language\Haskell\GhcMod\Caching\Types.hs, dist\dist-sandbox-eec368b6\build\Language\Haskell\GhcMod\Caching\Types.o
)
[ 5 of 41] Compiling Language.Haskell.GhcMod.Types ( Language\Haskell\GhcMod\Types.hs, dist\dist-sandbox-eec368b6\build\Language\Haskell\GhcMod\Types.o )
[ 6 of 41] Compiling Language.Haskell.GhcMod.Gap ( Language\Haskell\GhcMod\Gap.hs, dist\dist-sandbox-eec368b6\build\Language\Haskell\GhcMod\Gap.o )
[ 7 of 41] Compiling Language.Haskell.GhcMod.DynFlags ( Language\Haskell\GhcMod\DynFlags.hs, dist\dist-sandbox-eec368b6\build\Language\Haskell\GhcMod\DynFlags.o )
[ 8 of 41] Compiling Language.Haskell.GhcMod.Doc ( Language\Haskell\GhcMod\Doc.hs, dist\dist-sandbox-eec368b6\build\Language\Haskell\GhcMod\Doc.o )
[ 9 of 41] Compiling Language.Haskell.GhcMod.SrcUtils ( Language\Haskell\GhcMod\SrcUtils.hs, dist\dist-sandbox-eec368b6\build\Language\Haskell\GhcMod\SrcUtils.o )
[10 of 41] Compiling Language.Haskell.GhcMod.Monad.Types ( Language\Haskell\GhcMod\Monad\Types.hs, dist\dist-sandbox-eec368b6\build\Language\Haskell\GhcMod\Monad\Types.o )
[11 of 41] Compiling Language.Haskell.GhcMod.Output ( Language\Haskell\GhcMod\Output.hs, dist\dist-sandbox-eec368b6\build\Language\Haskell\GhcMod\Output.o )
[12 of 41] Compiling Language.Haskell.GhcMod.Convert ( Language\Haskell\GhcMod\Convert.hs, dist\dist-sandbox-eec368b6\build\Language\Haskell\GhcMod\Convert.o )
[13 of 41] Compiling Language.Haskell.GhcMod.Pretty ( Language\Haskell\GhcMod\Pretty.hs, dist\dist-sandbox-eec368b6\build\Language\Haskell\GhcMod\Pretty.o )
[14 of 41] Compiling Language.Haskell.GhcMod.Error ( Language\Haskell\GhcMod\Error.hs, dist\dist-sandbox-eec368b6\build\Language\Haskell\GhcMod\Error.o )
[15 of 41] Compiling Language.Haskell.GhcMod.Logger ( Language\Haskell\GhcMod\Logger.hs, dist\dist-sandbox-eec368b6\build\Language\Haskell\GhcMod\Logger.o )
[16 of 41] Compiling Language.Haskell.GhcMod.Utils ( Language\Haskell\GhcMod\Utils.hs, dist\dist-sandbox-eec368b6\build\Language\Haskell\GhcMod\Utils.o )
[17 of 41] Compiling Language.Haskell.GhcMod.Logging ( Language\Haskell\GhcMod\Logging.hs, dist\dist-sandbox-eec368b6\build\Language\Haskell\GhcMod\Logging.o )
[18 of 41] Compiling Language.Haskell.GhcMod.Caching ( Language\Haskell\GhcMod\Caching.hs, dist\dist-sandbox-eec368b6\build\Language\Haskell\GhcMod\Caching.o )
[19 of 41] Compiling Language.Haskell.GhcMod.PathsAndFiles ( Language\Haskell\GhcMod\PathsAndFiles.hs, dist\dist-sandbox-eec368b6\build\Language\Haskell\GhcMod\PathsAndFiles.o
)
[20 of 41] Compiling Language.Haskell.GhcMod.CabalHelper ( Language\Haskell\GhcMod\CabalHelper.hs, dist\dist-sandbox-eec368b6\build\Language\Haskell\GhcMod\CabalHelper.o )

Language\Haskell\GhcMod\CabalHelper.hs:136:24:
    Not in scope: `prepare'
ghc.exe: warning: _tzset from msvcrt is linked instead of __imp__tzset
cabal.exe: Error: some packages failed to install:
ghc-mod-0 failed during the building phase. The exception was:
ExitFailure 1

@DanielG
Copy link
Owner

DanielG commented Aug 14, 2015

brb, releaseing new cabal-helper ;)

@DanielG
Copy link
Owner

DanielG commented Aug 14, 2015

Ok give hackage a few minutes to update the index then git pull in ghc-mod, cabal update and try again.

@tr00per
Copy link

tr00per commented Aug 14, 2015

As soon as this was ready the new version shoud've been uploaded. This is a much higher priority bug than any other on the list.

@DanielG
Copy link
Owner

DanielG commented Aug 14, 2015

Well it's been released like two hours ago so stop bitching already. grumbles ungrateful bunch these hackers.. :P

@davegomez
Copy link

I'm having this issue even using the master branch.

The Glorious Glasgow Haskell Compilation System, version 7.10.2
cabal-install version 1.22.6.0
➜  ~ cabal install ghc-mod
Resolving dependencies...
In order, the following will be installed:
djinn-ghc-0.0.2.3 (via: ghc-mod-5.3.0.0) (reinstall) (changes: ghc-7.10.2 added)
ghc-syb-utils-0.2.3 (via: ghc-mod-5.3.0.0) (reinstall) (changes: ghc-7.10.2 added)
haskell-src-exts-1.16.0.1 (via: ghc-mod-5.3.0.0 hlint-1.9.21) (new package)
hlint-1.9.21 (via: ghc-mod-5.3.0.0) (new package)
ghc-mod-5.3.0.0 (new package)
Warning: Note that reinstalls are always dangerous. Continuing anyway...
Downloading djinn-ghc-0.0.2.3...
Downloading ghc-syb-utils-0.2.3...
Configuring djinn-ghc-0.0.2.3...
Downloading haskell-src-exts-1.16.0.1...
Configuring ghc-syb-utils-0.2.3...
Configuring haskell-src-exts-1.16.0.1...
Building djinn-ghc-0.0.2.3...
Building ghc-syb-utils-0.2.3...
Failed to install djinn-ghc-0.0.2.3
Build log ( /Users/dave/.cabal/logs/djinn-ghc-0.0.2.3.log ):
[1 of 1] Compiling Main             ( /var/folders/0f/760m1jd13498ktz7ns7kh2d40000gn/T/cabal-tmp-22459/djinn-ghc-0.0.2.3/dist/setup/setup.hs, /var/folders/0f/760m1jd13498ktz7ns7kh2d40000gn/T/cabal-tmp-22459/djinn-ghc-0.0.2.3/dist/setup/Main.o )
Linking /var/folders/0f/760m1jd13498ktz7ns7kh2d40000gn/T/cabal-tmp-22459/djinn-ghc-0.0.2.3/dist/setup/setup ...
Configuring djinn-ghc-0.0.2.3...
Building djinn-ghc-0.0.2.3...
Preprocessing library djinn-ghc-0.0.2.3...

src/Djinn/GHC.hs:5:8:
    Could not find module ‘Control.Concurrent.Async’
    There are files missing in the ‘async-2.0.2@async_J3wPtBMkDlC1zlPIsbgEk9’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.

src/Djinn/GHC.hs:10:18:
    Could not find module ‘Djinn.HTypes’
    There are files missing in the ‘djinn-lib-0.0.1.2@djinn_90Jpivwn17JIksJR6o4p01’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.

src/Djinn/GHC.hs:11:18:
    Could not find module ‘Djinn.LJT’
    There are files missing in the ‘djinn-lib-0.0.1.2@djinn_90Jpivwn17JIksJR6o4p01’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.
Failed to install ghc-syb-utils-0.2.3
Build log ( /Users/dave/.cabal/logs/ghc-syb-utils-0.2.3.log ):
Configuring ghc-syb-utils-0.2.3...
Building ghc-syb-utils-0.2.3...
Preprocessing library ghc-syb-utils-0.2.3...

GHC/SYB/Utils.hs:176:8:
    Could not find module ‘Data.Generics’
    There are files missing in the ‘syb-0.5.1@syb_8qmIMcBFhWM7BKRUTFb5M4’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.
Failed to install haskell-src-exts-1.16.0.1
Build log ( /Users/dave/.cabal/logs/haskell-src-exts-1.16.0.1.log ):
Configuring haskell-src-exts-1.16.0.1...
setup-Simple-Cabal-1.22.4.0-x86_64-osx-ghc-7.10.2: The program 'happy' version
>=1.17 is required but it could not be found.
cabal: Error: some packages failed to install:
djinn-ghc-0.0.2.3 failed during the building phase. The exception was:
ExitFailure 1
ghc-mod-5.3.0.0 depends on haskell-src-exts-1.16.0.1 which failed to install.
ghc-syb-utils-0.2.3 failed during the building phase. The exception was:
ExitFailure 1
haskell-src-exts-1.16.0.1 failed during the configure step. The exception was:
ExitFailure 1
hlint-1.9.21 depends on haskell-src-exts-1.16.0.1 which failed to install.
➜  ~ cabal install djinn-ghc
Resolving dependencies...
In order, the following will be installed:
djinn-ghc-0.0.2.3 (reinstall) (changes: ghc-7.10.2 added)
Warning: Note that reinstalls are always dangerous. Continuing anyway...
Configuring djinn-ghc-0.0.2.3...
Building djinn-ghc-0.0.2.3...
Failed to install djinn-ghc-0.0.2.3
Build log ( /Users/dave/.cabal/logs/djinn-ghc-0.0.2.3.log ):
Configuring djinn-ghc-0.0.2.3...
Building djinn-ghc-0.0.2.3...
Preprocessing library djinn-ghc-0.0.2.3...

src/Djinn/GHC.hs:5:8:
    Could not find module ‘Control.Concurrent.Async’
    There are files missing in the ‘async-2.0.2@async_J3wPtBMkDlC1zlPIsbgEk9’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.

src/Djinn/GHC.hs:10:18:
    Could not find module ‘Djinn.HTypes’
    There are files missing in the ‘djinn-lib-0.0.1.2@djinn_90Jpivwn17JIksJR6o4p01’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.

src/Djinn/GHC.hs:11:18:
    Could not find module ‘Djinn.LJT’
    There are files missing in the ‘djinn-lib-0.0.1.2@djinn_90Jpivwn17JIksJR6o4p01’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.
cabal: Error: some packages failed to install:
djinn-ghc-0.0.2.3 failed during the building phase. The exception was:
ExitFailure 1

Before all this I tried to install some dependencies individually like happy but it didn't work either.

BTW, I'm not using brew but Haskell for Mac OS X, because it didn't work with brew either.

@DanielG
Copy link
Owner

DanielG commented Aug 20, 2015

The program 'happy' version >=1.17 is required but it could not be found. You should probably fix that first and then reinstall.

@DanielG
Copy link
Owner

DanielG commented Aug 20, 2015

Oh and cabal warned you, didn't it? Warning: Note that reinstalls are always dangerous. Continuing anyway.. you'll probably have to kill .ghc and .cabal and reinstall it then.

@DanielG
Copy link
Owner

DanielG commented Aug 20, 2015

Actually please open a new issue there's 46 people being notified about this xD

Repository owner locked and limited conversation to collaborators Aug 20, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests