Synchronization error after upgrade to GHC 7.6.2

Help
2013-04-30
2013-05-05
  • Ernesto Posse
    Ernesto Posse
    2013-04-30

    I recently upgraded GHC to version 7.6.2 and now EclipseFP hangs whenever it's trying to synchronize the editor. When I open a .hs file (any), I get an error dialog box with the following message:

    An internal error occurred during: "Synchronizing editor content for hccs".
    Attempted to beginRule: P/hccs, does not match outer scope rule: L/hccs/.dist- buildwrapper/Setup.hs
    

    The console view shows the following errors:

    /home/eposse/.cabal/bin/buildwrapper configure --cabaltarget=Source --tempfolder=.dist-buildwrapper --cabalpath=/usr/bin/cabal --cabalfile=/home/eposse/Dropbox/Projects/hccs/hccs.cabal --cabalflags=
    
    buildwrapper: user error (You need to re-run the 'configure' command. The version of Cabal being used has changed (was Cabal-1.14.0, now Cabal-1.16.0). Additionally the compiler is different (was ghc-7.4, now ghc-7.6) which is probably the cause of the problem.)
    /home/eposse/.cabal/bin/buildwrapper configure --cabaltarget=Source --tempfolder=.dist-buildwrapper --cabalpath=/usr/bin/cabal --cabalfile=/home/eposse/Dropbox/Projects/hccs/hccs.cabal --cabalflags=
    
    buildwrapper: user error (You need to re-run the 'configure' command. The version of Cabal being used has changed (was Cabal-1.14.0, now Cabal-1.16.0). Additionally the compiler is different (was ghc-7.4, now ghc-7.6) which is probably the cause of the problem.)
    /home/eposse/.cabal/bin/buildwrapper configure --cabaltarget=Source --tempfolder=.dist-buildwrapper --cabalpath=/usr/bin/cabal --cabalfile=/home/eposse/Dropbox/Projects/hccs/hccs.cabal --cabalflags=
    
    buildwrapper: user error (You need to re-run the 'configure' command. The version of Cabal being used has changed (was Cabal-1.14.0, now Cabal-1.16.0). Additionally the compiler is different (was ghc-7.4, now ghc-7.6) which is probably the cause of the problem.)
    /home/eposse/.cabal/bin/buildwrapper configure --cabaltarget=Source --tempfolder=.dist-buildwrapper --cabalpath=/usr/bin/cabal --cabalfile=/home/eposse/Dropbox/Projects/hccs/hccs.cabal --cabalflags=
    
    ... etc.
    

    and it continues in an infinite loop. If I click on the cancel button on the "Progress" view, it is ignored. If I close the .hs files, the "Progress" view still shows the process trying to synchronize. If I try to use hoogle, the whole Eclipse UI freezes and greys out.

    I tried to run that buildwrapper command on the console, but I just get the same error.

    The problem occurs with any .hs file.

    What can I do?

     
  • JP Moresmau
    JP Moresmau
    2013-05-05

    You need to reinstall BuildWrapper so that BuildWrapper uses the same version of the Cabal library as your cabal executable and of course the same version of the GHC API than your compiler.