haskell / haskell-ide-engine

The engine for haskell ide-integration. Not an IDE
BSD 3-Clause "New" or "Revised" License
2.38k stars 210 forks source link

[Win10] Compilation fails for 8.4.2 version #550

Closed Anrock closed 6 years ago

Anrock commented 6 years ago

Microsoft Windows [Version 10.0.16299.371] HIE at 97f67d4

Running stack build --copy-compiler-tool results in failure with following output:

ghc-mod-core-5.9.0.0: build (lib)
ghc-exactprint-0.5.6.1: configure
ghc-exactprint-0.5.6.1: build
Progress 2/8

--  While building custom Setup.hs for package ghc-exactprint-0.5.6.1 using:
      C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_2.2.0.1_ghc-8.4.2.exe --builddir=.stack-work\dist\7d103d30 build --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1
    Logs have been written to: C:\Users\Anrock\projects\haskell-ide-engine\.stack-work\logs\ghc-exactprint-0.5.6.1.log

    Configuring ghc-exactprint-0.5.6.1...
    Warning: The package has an extraneous version range for a dependency on an
    internal library: ghc-exactprint >=0.5.4. This version range includes the
    current package but isn't needed as the current package's library will always
    be used.
    Warning:
        This package indirectly depends on multiple versions of the same package. This is very likely to cause a compile failure.
          package time (time-1.8.0.2-D1fwd9ZaD3eDd2StmPCsSC) requires Win32-2.5.4.1-LVNqK0SwW285hUwHpPOkae
          package directory (directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1) requires Win32-2.5.4.1-LVNqK0SwW285hUwHpPOkae
          package time (time-1.8.0.2) requires Win32-2.6.1.0
          package process (process-1.6.3.0) requires Win32-2.6.1.0
          package ghc (ghc-8.4.2) requires Win32-2.6.1.0
          package directory (directory-1.3.1.5) requires Win32-2.6.1.0
          package process (process-1.6.3.0) requires directory-1.3.1.5
          package hpc (hpc-0.6.0.3) requires directory-1.3.1.5
          package ghc-boot (ghc-boot-8.4.2) requires directory-1.3.1.5
          package ghc (ghc-8.4.2) requires directory-1.3.1.5
          package ghc-exactprint (ghc-exactprint-0.5.6.1) requires directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1
          package ghc-boot (ghc-boot-8.4.2-IjXXYP7XIDA1Af0Wr3EqUE) requires directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1
          package ghci (ghci-8.4.2) requires ghc-boot-8.4.2
          package ghc (ghc-8.4.2) requires ghc-boot-8.4.2
          package ghc-exactprint (ghc-exactprint-0.5.6.1) requires ghc-boot-8.4.2-IjXXYP7XIDA1Af0Wr3EqUE
          package hpc (hpc-0.6.0.3) requires time-1.8.0.2
          package ghc (ghc-8.4.2) requires time-1.8.0.2
          package directory (directory-1.3.1.5) requires time-1.8.0.2
          package directory (directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1) requires time-1.8.0.2-D1fwd9ZaD3eDd2StmPCsSC
    Preprocessing library for ghc-exactprint-0.5.6.1..
    Building library for ghc-exactprint-0.5.6.1..
    [ 1 of 13] Compiling Language.Haskell.GHC.ExactPrint.Types ( src\Language\Haskell\GHC\ExactPrint\Types.hs, .stack-work\dist\7d103d30\build\Language\Haskell\GHC\ExactPrint\Types.o )
    [ 2 of 13] Compiling Language.Haskell.GHC.ExactPrint.Lookup ( src\Language\Haskell\GHC\ExactPrint\Lookup.hs, .stack-work\dist\7d103d30\build\Language\Haskell\GHC\ExactPrint\Lookup.o )
    [ 3 of 13] Compiling Language.Haskell.GHC.ExactPrint.AnnotateTypes ( src\Language\Haskell\GHC\ExactPrint\AnnotateTypes.hs, .stack-work\dist\7d103d30\build\Language\Haskell\GHC\ExactPrint\AnnotateTypes.o )
    GHC runtime linker: fatal error: I found a duplicate definition for symbol
       rgb
    whilst processing object file
       C:\Users\Anrock\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.2\lib\Win32-2.6.1.0\HSWin32-2.6.1.0.o
    The symbol was previously defined in
       C:\sr\snapshots\03fa9465\lib\x86_64-windows-ghc-8.4.2\Win32-2.5.4.1-LVNqK0SwW285hUwHpPOkae\HSWin32-2.5.4.1-LVNqK0SwW285hUwHpPOkae.o
    This could be caused by:
       * Loading two different object files which export the same symbol
       * Specifying the same object file twice on the GHCi command line
       * An incorrect `package.conf' entry, causing some object to be
         loaded twice.
    ghc.EXE: panic! (the 'impossible' happened)
      (GHC version 8.4.2 for x86_64-unknown-mingw32):
        loadObj "C:\\Users\\Anrock\\AppData\\Local\\Programs\\stack\\x86_64-windows\\ghc-8.4.2\\lib\\Win32-2.6.1.0\\HSWin32-2.6.1.0.o": failed

    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

--  While building custom Setup.hs for package ghc-mod-core-5.9.0.0 using:
      C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_2.2.0.1_ghc-8.4.2.exe --builddir=.stack-work\dist\7d103d30 build lib:ghc-mod-core --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1
    Logs have been written to: C:\Users\Anrock\projects\haskell-ide-engine\.stack-work\logs\ghc-mod-core-5.9.0.0.log

    Preprocessing library for ghc-mod-core-5.9.0.0..
    Building library for ghc-mod-core-5.9.0.0..
    [10 of 45] Compiling GhcMod.Types     ( GhcMod\Types.hs, .stack-work\dist\7d103d30\build\GhcMod\Types.o )
    GHC runtime linker: fatal error: I found a duplicate definition for symbol
       rgb
    whilst processing object file
       C:\Users\Anrock\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.2\lib\Win32-2.6.1.0\HSWin32-2.6.1.0.o
    The symbol was previously defined in
       C:\sr\snapshots\03fa9465\lib\x86_64-windows-ghc-8.4.2\Win32-2.5.4.1-LVNqK0SwW285hUwHpPOkae\HSWin32-2.5.4.1-LVNqK0SwW285hUwHpPOkae.o
    This could be caused by:
       * Loading two different object files which export the same symbol
       * Specifying the same object file twice on the GHCi command line
       * An incorrect `package.conf' entry, causing some object to be
         loaded twice.
    ghc.EXE: panic! (the 'impossible' happened)
      (GHC version 8.4.2 for x86_64-unknown-mingw32):
        loadObj "C:\\Users\\Anrock\\AppData\\Local\\Programs\\stack\\x86_64-windows\\ghc-8.4.2\\lib\\Win32-2.6.1.0\\HSWin32-2.6.1.0.o": failed

    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
Anrock commented 6 years ago

@alanz should i move this issue to alanz/ghc-exactprint?

alanz commented 6 years ago

Try doing just stack build, I think the --copy-compiler-tool argument might be putting extraneous stuff into your package search path.

That warning on ghc-exactprint is normal, and not a problem.

Anrock commented 6 years ago

@alanz stack build fails too, although messages a little different now:

ghc-mod-core-5.9.0.0: configure (lib)
ghc-mod-core-5.9.0.0: build (lib)
ghc-exactprint-0.5.6.1: configure
ghc-exactprint-0.5.6.1: build
Progress 2/8

--  While building custom Setup.hs for package ghc-exactprint-0.5.6.1 using:
      C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_2.2.0.1_ghc-8.4.2.exe --builddir=.stack-work\dist\7d103d30 build --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1
    Logs have been written to: C:\Users\Anrock\projects\haskell-ide-engine\.stack-work\logs\ghc-exactprint-0.5.6.1.log

    Configuring ghc-exactprint-0.5.6.1...
    Warning: The package has an extraneous version range for a dependency on an
    internal library: ghc-exactprint >=0.5.4. This version range includes the
    current package but isn't needed as the current package's library will always
    be used.
    Warning:
        This package indirectly depends on multiple versions of the same package. This is very likely to cause a compile failure.
          package time (time-1.8.0.2-D1fwd9ZaD3eDd2StmPCsSC) requires Win32-2.5.4.1-LVNqK0SwW285hUwHpPOkae
          package directory (directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1) requires Win32-2.5.4.1-LVNqK0SwW285hUwHpPOkae
          package time (time-1.8.0.2) requires Win32-2.6.1.0
          package process (process-1.6.3.0) requires Win32-2.6.1.0
          package ghc (ghc-8.4.2) requires Win32-2.6.1.0
          package directory (directory-1.3.1.5) requires Win32-2.6.1.0
          package process (process-1.6.3.0) requires directory-1.3.1.5
          package hpc (hpc-0.6.0.3) requires directory-1.3.1.5
          package ghc-boot (ghc-boot-8.4.2) requires directory-1.3.1.5
          package ghc (ghc-8.4.2) requires directory-1.3.1.5
          package ghc-exactprint (ghc-exactprint-0.5.6.1) requires directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1
          package ghc-boot (ghc-boot-8.4.2-IjXXYP7XIDA1Af0Wr3EqUE) requires directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1
          package ghci (ghci-8.4.2) requires ghc-boot-8.4.2
          package ghc (ghc-8.4.2) requires ghc-boot-8.4.2
          package ghc-exactprint (ghc-exactprint-0.5.6.1) requires ghc-boot-8.4.2-IjXXYP7XIDA1Af0Wr3EqUE
          package hpc (hpc-0.6.0.3) requires time-1.8.0.2
          package ghc (ghc-8.4.2) requires time-1.8.0.2
          package directory (directory-1.3.1.5) requires time-1.8.0.2
          package directory (directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1) requires time-1.8.0.2-D1fwd9ZaD3eDd2StmPCsSC
    Preprocessing library for ghc-exactprint-0.5.6.1..
    Building library for ghc-exactprint-0.5.6.1..
    [ 1 of 13] Compiling Language.Haskell.GHC.ExactPrint.Types ( src\Language\Haskell\GHC\ExactPrint\Types.hs, .stack-work\dist\7d103d30\build\Language\Haskell\GHC\ExactPrint\Types.o )
    [ 2 of 13] Compiling Language.Haskell.GHC.ExactPrint.Lookup ( src\Language\Haskell\GHC\ExactPrint\Lookup.hs, .stack-work\dist\7d103d30\build\Language\Haskell\GHC\ExactPrint\Lookup.o )
    [ 3 of 13] Compiling Language.Haskell.GHC.ExactPrint.AnnotateTypes ( src\Language\Haskell\GHC\ExactPrint\AnnotateTypes.hs, .stack-work\dist\7d103d30\build\Language\Haskell\GHC\ExactPrint\AnnotateTypes.o )
    GHC runtime linker: fatal error: I found a duplicate definition for symbol
       rgb
    whilst processing object file
       C:\Users\Anrock\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.2\lib\Win32-2.6.1.0\HSWin32-2.6.1.0.o
    The symbol was previously defined in
       C:\sr\snapshots\03fa9465\lib\x86_64-windows-ghc-8.4.2\Win32-2.5.4.1-LVNqK0SwW285hUwHpPOkae\HSWin32-2.5.4.1-LVNqK0SwW285hUwHpPOkae.o
    This could be caused by:
       * Loading two different object files which export the same symbol
       * Specifying the same object file twice on the GHCi command line
       * An incorrect `package.conf' entry, causing some object to be
         loaded twice.
    ghc.EXE: panic! (the 'impossible' happened)
      (GHC version 8.4.2 for x86_64-unknown-mingw32):
        loadObj "C:\\Users\\Anrock\\AppData\\Local\\Programs\\stack\\x86_64-windows\\ghc-8.4.2\\lib\\Win32-2.6.1.0\\HSWin32-2.6.1.0.o": failed

    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

--  While building custom Setup.hs for package ghc-mod-core-5.9.0.0 using:
      C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_2.2.0.1_ghc-8.4.2.exe --builddir=.stack-work\dist\7d103d30 build lib:ghc-mod-core --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1
    Logs have been written to: C:\Users\Anrock\projects\haskell-ide-engine\.stack-work\logs\ghc-mod-core-5.9.0.0.log

    Configuring ghc-mod-core-5.9.0.0...
    Warning:
        This package indirectly depends on multiple versions of the same package. This is very likely to cause a compile failure.
          package unix-compat (unix-compat-0.5.0.1-ALLPuaD7J24dL9b6NTbA5) requires Win32-2.5.4.1-LVNqK0SwW285hUwHpPOkae
          package time (time-1.8.0.2-D1fwd9ZaD3eDd2StmPCsSC) requires Win32-2.5.4.1-LVNqK0SwW285hUwHpPOkae
          package process (process-1.6.3.0-FMzG7P7MVAn6mqfwmNuxPP) requires Win32-2.5.4.1-LVNqK0SwW285hUwHpPOkae
          package directory (directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1) requires Win32-2.5.4.1-LVNqK0SwW285hUwHpPOkae
          package ansi-terminal (ansi-terminal-0.8.0.2-AQwelgnwMTFGc4jiARIgzm) requires Win32-2.5.4.1-LVNqK0SwW285hUwHpPOkae
          package Cabal (Cabal-2.2.0.1-FeOI90Zvmr7AkYuby89JJ) requires Win32-2.5.4.1-LVNqK0SwW285hUwHpPOkae
          package time (time-1.8.0.2) requires Win32-2.6.1.0
          package process (process-1.6.3.0) requires Win32-2.6.1.0
          package ghc (ghc-8.4.2) requires Win32-2.6.1.0
          package directory (directory-1.3.1.5) requires Win32-2.6.1.0
          package process (process-1.6.3.0) requires directory-1.3.1.5
          package hpc (hpc-0.6.0.3) requires directory-1.3.1.5
          package ghc-boot (ghc-boot-8.4.2) requires directory-1.3.1.5
          package ghc (ghc-8.4.2) requires directory-1.3.1.5
          package unix-compat (unix-compat-0.5.0.1-ALLPuaD7J24dL9b6NTbA5) requires directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1
          package temporary (temporary-1.2.1.1-8f2WBQRkfsZ9IwRyqpPINq) requires directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1
          package process (process-1.6.3.0-FMzG7P7MVAn6mqfwmNuxPP) requires directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1
          package ghc-mod-core (ghc-mod-core-5.9.0.0) requires directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1
          package ghc-boot (ghc-boot-8.4.2-IjXXYP7XIDA1Af0Wr3EqUE) requires directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1
          package extra (extra-1.6.6-E23jajM052SDJ4GgmArFUp) requires directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1
          package cpphs (cpphs-1.20.8-JKmr2FfpPiI6VediyrxNsH) requires directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1
          package cabal-helper (cabal-helper-0.8.0.3-1xg5DxHt7TJ8aF98p8nk0A) requires directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1
          package Cabal (Cabal-2.2.0.1-FeOI90Zvmr7AkYuby89JJ) requires directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1
          package ghci (ghci-8.4.2) requires ghc-boot-8.4.2
          package ghc (ghc-8.4.2) requires ghc-boot-8.4.2
          package ghc-mod-core (ghc-mod-core-5.9.0.0) requires ghc-boot-8.4.2-IjXXYP7XIDA1Af0Wr3EqUE
          package ghc (ghc-8.4.2) requires process-1.6.3.0
          package optparse-applicative (optparse-applicative-0.14.2.0-2cLHts4ddm62O3ilVqxDVF) requires process-1.6.3.0-FMzG7P7MVAn6mqfwmNuxPP
          package ghc-mod-core (ghc-mod-core-5.9.0.0) requires process-1.6.3.0-FMzG7P7MVAn6mqfwmNuxPP
          package extra (extra-1.6.6-E23jajM052SDJ4GgmArFUp) requires process-1.6.3.0-FMzG7P7MVAn6mqfwmNuxPP
          package cabal-helper (cabal-helper-0.8.0.3-1xg5DxHt7TJ8aF98p8nk0A) requires process-1.6.3.0-FMzG7P7MVAn6mqfwmNuxPP
          package Cabal (Cabal-2.2.0.1-FeOI90Zvmr7AkYuby89JJ) requires process-1.6.3.0-FMzG7P7MVAn6mqfwmNuxPP
          package hpc (hpc-0.6.0.3) requires time-1.8.0.2
          package ghc (ghc-8.4.2) requires time-1.8.0.2
          package directory (directory-1.3.1.5) requires time-1.8.0.2
          package unix-compat (unix-compat-0.5.0.1-ALLPuaD7J24dL9b6NTbA5) requires time-1.8.0.2-D1fwd9ZaD3eDd2StmPCsSC
          package ghc-mod-core (ghc-mod-core-5.9.0.0) requires time-1.8.0.2-D1fwd9ZaD3eDd2StmPCsSC
          package extra (extra-1.6.6-E23jajM052SDJ4GgmArFUp) requires time-1.8.0.2-D1fwd9ZaD3eDd2StmPCsSC
          package directory (directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1) requires time-1.8.0.2-D1fwd9ZaD3eDd2StmPCsSC
          package Cabal (Cabal-2.2.0.1-FeOI90Zvmr7AkYuby89JJ) requires time-1.8.0.2-D1fwd9ZaD3eDd2StmPCsSC
    Preprocessing library for ghc-mod-core-5.9.0.0..
    Building library for ghc-mod-core-5.9.0.0..
    [ 8 of 45] Compiling GhcMod.DynFlagsTH ( GhcMod\DynFlagsTH.hs, .stack-work\dist\7d103d30\build\GhcMod\DynFlagsTH.o )

    GhcMod\DynFlagsTH.hs:26:1: warning: [-Wunused-imports]
        The import of `GHC.LanguageExtensions' is redundant
          except perhaps to import instances from `GHC.LanguageExtensions'
        To import instances alone, use: import GHC.LanguageExtensions()
       |
    26 | import GHC.LanguageExtensions
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    GhcMod\DynFlagsTH.hs:209:1: warning: [-Wmissing-signatures]
        Top-level binding with no type signature:
          toSet :: (Ord a, Enum a) => E.EnumSet a -> IS.Set a
        |
    209 | toSet es = IS.fromList $ E.toList es
        | ^^^^^
    
    GhcMod\DynFlagsTH.hs:211:1: warning: [-Worphans]
        Orphan instance: instance Ord GeneralFlag
        To avoid this
            move the instance declaration to the module of the class or of the type, or
            wrap the type with a newtype and declare the instance on the new type.
        |
    211 | deriving instance Ord GeneralFlag
        | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    GhcMod\DynFlagsTH.hs:212:1: warning: [-Worphans]
        Orphan instance: instance Ord WarningFlag
        To avoid this
            move the instance declaration to the module of the class or of the type, or
            wrap the type with a newtype and declare the instance on the new type.
        |
    212 | deriving instance Ord DynFlags.WarningFlag
        | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    GhcMod\DynFlagsTH.hs:213:1: warning: [-Worphans]
        Orphan instance: instance Ord DumpFlag
        To avoid this
            move the instance declaration to the module of the class or of the type, or
            wrap the type with a newtype and declare the instance on the new type.
        |
    213 | deriving instance Ord DynFlags.DumpFlag
        | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    GhcMod\DynFlagsTH.hs:214:1: warning: [-Worphans]
        Orphan instance: instance Ord LlvmTarget
        To avoid this
            move the instance declaration to the module of the class or of the type, or
            wrap the type with a newtype and declare the instance on the new type.
        |
    214 | deriving instance Ord DynFlags.LlvmTarget
        | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    GhcMod\DynFlagsTH.hs:215:1: warning: [-Worphans]
        Orphan instance: instance Ord Extension
        To avoid this
            move the instance declaration to the module of the class or of the type, or
            wrap the type with a newtype and declare the instance on the new type.
        |
    215 | deriving instance Ord Extension
        | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    GhcMod\DynFlagsTH.hs:216:1: warning: [-Worphans]
        Orphan instance: instance Eq LlvmTarget
        To avoid this
            move the instance declaration to the module of the class or of the type, or
            wrap the type with a newtype and declare the instance on the new type.
        |
    216 | deriving instance Eq LlvmTarget
        | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [ 9 of 45] Compiling GhcMod.Options.Help ( GhcMod\Options\Help.hs, .stack-work\dist\7d103d30\build\GhcMod\Options\Help.o )
    [10 of 45] Compiling GhcMod.Types     ( GhcMod\Types.hs, .stack-work\dist\7d103d30\build\GhcMod\Types.o )
    GHC runtime linker: fatal error: I found a duplicate definition for symbol
       rgb
    whilst processing object file
       C:\Users\Anrock\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.2\lib\Win32-2.6.1.0\HSWin32-2.6.1.0.o
    The symbol was previously defined in
       C:\sr\snapshots\03fa9465\lib\x86_64-windows-ghc-8.4.2\Win32-2.5.4.1-LVNqK0SwW285hUwHpPOkae\HSWin32-2.5.4.1-LVNqK0SwW285hUwHpPOkae.o
    This could be caused by:
       * Loading two different object files which export the same symbol
       * Specifying the same object file twice on the GHCi command line
       * An incorrect `package.conf' entry, causing some object to be
         loaded twice.
    ghc.EXE: panic! (the 'impossible' happened)
      (GHC version 8.4.2 for x86_64-unknown-mingw32):
        loadObj "C:\\Users\\Anrock\\AppData\\Local\\Programs\\stack\\x86_64-windows\\ghc-8.4.2\\lib\\Win32-2.6.1.0\\HSWin32-2.6.1.0.o": failed

    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
Anrock commented 6 years ago

Probably related: https://ghc.haskell.org/trac/ghc/ticket/11748

cryptoquick commented 6 years ago

sigh... I'm hitting this too, I think. I'm too new to Haskell to know for sure.

PS C:\projects\personal\haskell-ide-engine> stack build
No packages found in snapshot which provide a "cabal" executable, which is a build-tool dependency of "cabal-helper"
ghc-mod-core-5.9.0.0: configure (lib)
haskell-src-exts-util-0.2.2: download
haskell-lsp-types-0.2.2.0: download
haskell-src-exts-util-0.2.2: configure
ghc-mod-core-5.9.0.0: build (lib)
haskell-src-exts-util-0.2.2: build
haskell-lsp-types-0.2.2.0: configure
haskell-lsp-types-0.2.2.0: build
haskell-src-exts-util-0.2.2: copy/register
hlint-2.1.3: download
ghc-exactprint-0.5.6.1: configure
ghc-exactprint-0.5.6.1: build
hlint-2.1.3: configure
hlint-2.1.3: build
hlint-2.1.3: copy/register
haskell-lsp-types-0.2.2.0: copy/register
Progress 5/13

--  While building custom Setup.hs for package ghc-exactprint-0.5.6.1 using:
      C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_2.2.0.1_ghc-8.4.2.exe --builddir=.stack-work\dist\7d103d30 build --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1
    Logs have been written to: C:\projects\personal\haskell-ide-engine\.stack-work\logs\ghc-exactprint-0.5.6.1.log

    Configuring ghc-exactprint-0.5.6.1...
    Warning: The package has an extraneous version range for a dependency on an
    internal library: ghc-exactprint >=0.5.4. This version range includes the
    current package but isn't needed as the current package's library will always
    be used.
    Warning:
        This package indirectly depends on multiple versions of the same package. This is very likely to cause a compile failure.
          package time (time-1.8.0.2-D1fwd9ZaD3eDd2StmPCsSC) requires Win32-2.5.4.1-LVNqK0SwW285hUwHpPOkae
          package directory (directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1) requires Win32-2.5.4.1-LVNqK0SwW285hUwHpPOkae
          package time (time-1.8.0.2) requires Win32-2.6.1.0
          package process (process-1.6.3.0) requires Win32-2.6.1.0
          package ghc (ghc-8.4.2) requires Win32-2.6.1.0
          package directory (directory-1.3.1.5) requires Win32-2.6.1.0
          package process (process-1.6.3.0) requires directory-1.3.1.5
          package hpc (hpc-0.6.0.3) requires directory-1.3.1.5
          package ghc-boot (ghc-boot-8.4.2) requires directory-1.3.1.5
          package ghc (ghc-8.4.2) requires directory-1.3.1.5
          package ghc-exactprint (ghc-exactprint-0.5.6.1) requires directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1
          package ghc-boot (ghc-boot-8.4.2-IjXXYP7XIDA1Af0Wr3EqUE) requires directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1
          package ghci (ghci-8.4.2) requires ghc-boot-8.4.2
          package ghc (ghc-8.4.2) requires ghc-boot-8.4.2
          package ghc-exactprint (ghc-exactprint-0.5.6.1) requires ghc-boot-8.4.2-IjXXYP7XIDA1Af0Wr3EqUE
          package hpc (hpc-0.6.0.3) requires time-1.8.0.2
          package ghc (ghc-8.4.2) requires time-1.8.0.2
          package directory (directory-1.3.1.5) requires time-1.8.0.2
          package directory (directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1) requires time-1.8.0.2-D1fwd9ZaD3eDd2StmPCsSC
    Preprocessing library for ghc-exactprint-0.5.6.1..
    Building library for ghc-exactprint-0.5.6.1..
    [ 1 of 13] Compiling Language.Haskell.GHC.ExactPrint.Types ( src\Language\Haskell\GHC\ExactPrint\Types.hs, .stack-work\dist\7d103d30\build\Language\Haskell\GHC\ExactPrint\Types.o )
    [ 2 of 13] Compiling Language.Haskell.GHC.ExactPrint.Lookup ( src\Language\Haskell\GHC\ExactPrint\Lookup.hs, .stack-work\dist\7d103d30\build\Language\Haskell\GHC\ExactPrint\Lookup.o )
    [ 3 of 13] Compiling Language.Haskell.GHC.ExactPrint.AnnotateTypes ( src\Language\Haskell\GHC\ExactPrint\AnnotateTypes.hs, .stack-work\dist\7d103d30\build\Language\Haskell\GHC\ExactPrint\AnnotateTypes.o )
    GHC runtime linker: fatal error: I found a duplicate definition for symbol
       rgb
    whilst processing object file
       C:\Users\crypt\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.2\lib\Win32-2.6.1.0\HSWin32-2.6.1.0.o
    The symbol was previously defined in
       C:\sr\snapshots\03fa9465\lib\x86_64-windows-ghc-8.4.2\Win32-2.5.4.1-LVNqK0SwW285hUwHpPOkae\HSWin32-2.5.4.1-LVNqK0SwW285hUwHpPOkae.o
    This could be caused by:
       * Loading two different object files which export the same symbol
       * Specifying the same object file twice on the GHCi command line
       * An incorrect `package.conf' entry, causing some object to be
         loaded twice.
    ghc.EXE: panic! (the 'impossible' happened)
      (GHC version 8.4.2 for x86_64-unknown-mingw32):
        loadObj "C:\\Users\\crypt\\AppData\\Local\\Programs\\stack\\x86_64-windows\\ghc-8.4.2\\lib\\Win32-2.6.1.0\\HSWin32-2.6.1.0.o": failed

    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

--  While building custom Setup.hs for package ghc-mod-core-5.9.0.0 using:
      C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_2.2.0.1_ghc-8.4.2.exe --builddir=.stack-work\dist\7d103d30 build lib:ghc-mod-core --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1
    Logs have been written to: C:\projects\personal\haskell-ide-engine\.stack-work\logs\ghc-mod-core-5.9.0.0.log

    Configuring ghc-mod-core-5.9.0.0...
    Warning:
        This package indirectly depends on multiple versions of the same package. This is very likely to cause a compile failure.
          package unix-compat (unix-compat-0.5.0.1-ALLPuaD7J24dL9b6NTbA5) requires Win32-2.5.4.1-LVNqK0SwW285hUwHpPOkae
          package time (time-1.8.0.2-D1fwd9ZaD3eDd2StmPCsSC) requires Win32-2.5.4.1-LVNqK0SwW285hUwHpPOkae
          package process (process-1.6.3.0-FMzG7P7MVAn6mqfwmNuxPP) requires Win32-2.5.4.1-LVNqK0SwW285hUwHpPOkae
          package directory (directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1) requires Win32-2.5.4.1-LVNqK0SwW285hUwHpPOkae
          package ansi-terminal (ansi-terminal-0.8.0.2-AQwelgnwMTFGc4jiARIgzm) requires Win32-2.5.4.1-LVNqK0SwW285hUwHpPOkae
          package Cabal (Cabal-2.2.0.1-FeOI90Zvmr7AkYuby89JJ) requires Win32-2.5.4.1-LVNqK0SwW285hUwHpPOkae
          package time (time-1.8.0.2) requires Win32-2.6.1.0
          package process (process-1.6.3.0) requires Win32-2.6.1.0
          package ghc (ghc-8.4.2) requires Win32-2.6.1.0
          package directory (directory-1.3.1.5) requires Win32-2.6.1.0
          package process (process-1.6.3.0) requires directory-1.3.1.5
          package hpc (hpc-0.6.0.3) requires directory-1.3.1.5
          package ghc-boot (ghc-boot-8.4.2) requires directory-1.3.1.5
          package ghc (ghc-8.4.2) requires directory-1.3.1.5
          package unix-compat (unix-compat-0.5.0.1-ALLPuaD7J24dL9b6NTbA5) requires directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1
          package temporary (temporary-1.2.1.1-8f2WBQRkfsZ9IwRyqpPINq) requires directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1
          package process (process-1.6.3.0-FMzG7P7MVAn6mqfwmNuxPP) requires directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1
          package ghc-mod-core (ghc-mod-core-5.9.0.0) requires directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1
          package ghc-boot (ghc-boot-8.4.2-IjXXYP7XIDA1Af0Wr3EqUE) requires directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1
          package extra (extra-1.6.6-E23jajM052SDJ4GgmArFUp) requires directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1
          package cpphs (cpphs-1.20.8-JKmr2FfpPiI6VediyrxNsH) requires directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1
          package cabal-helper (cabal-helper-0.8.0.3-1xg5DxHt7TJ8aF98p8nk0A) requires directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1
          package Cabal (Cabal-2.2.0.1-FeOI90Zvmr7AkYuby89JJ) requires directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1
          package ghci (ghci-8.4.2) requires ghc-boot-8.4.2
          package ghc (ghc-8.4.2) requires ghc-boot-8.4.2
          package ghc-mod-core (ghc-mod-core-5.9.0.0) requires ghc-boot-8.4.2-IjXXYP7XIDA1Af0Wr3EqUE
          package ghc (ghc-8.4.2) requires process-1.6.3.0
          package optparse-applicative (optparse-applicative-0.14.2.0-2cLHts4ddm62O3ilVqxDVF) requires process-1.6.3.0-FMzG7P7MVAn6mqfwmNuxPP
          package ghc-mod-core (ghc-mod-core-5.9.0.0) requires process-1.6.3.0-FMzG7P7MVAn6mqfwmNuxPP
          package extra (extra-1.6.6-E23jajM052SDJ4GgmArFUp) requires process-1.6.3.0-FMzG7P7MVAn6mqfwmNuxPP
          package cabal-helper (cabal-helper-0.8.0.3-1xg5DxHt7TJ8aF98p8nk0A) requires process-1.6.3.0-FMzG7P7MVAn6mqfwmNuxPP
          package Cabal (Cabal-2.2.0.1-FeOI90Zvmr7AkYuby89JJ) requires process-1.6.3.0-FMzG7P7MVAn6mqfwmNuxPP
          package hpc (hpc-0.6.0.3) requires time-1.8.0.2
          package ghc (ghc-8.4.2) requires time-1.8.0.2
          package directory (directory-1.3.1.5) requires time-1.8.0.2
          package unix-compat (unix-compat-0.5.0.1-ALLPuaD7J24dL9b6NTbA5) requires time-1.8.0.2-D1fwd9ZaD3eDd2StmPCsSC
          package ghc-mod-core (ghc-mod-core-5.9.0.0) requires time-1.8.0.2-D1fwd9ZaD3eDd2StmPCsSC
          package extra (extra-1.6.6-E23jajM052SDJ4GgmArFUp) requires time-1.8.0.2-D1fwd9ZaD3eDd2StmPCsSC
          package directory (directory-1.3.1.5-J5MwWdrFyEn9y6RDLELiL1) requires time-1.8.0.2-D1fwd9ZaD3eDd2StmPCsSC
          package Cabal (Cabal-2.2.0.1-FeOI90Zvmr7AkYuby89JJ) requires time-1.8.0.2-D1fwd9ZaD3eDd2StmPCsSC
    Preprocessing library for ghc-mod-core-5.9.0.0..
    Building library for ghc-mod-core-5.9.0.0..
    [ 1 of 45] Compiling Data.Binary.Generic ( Data\Binary\Generic.hs, .stack-work\dist\7d103d30\build\Data\Binary\Generic.o )
    [ 2 of 45] Compiling GhcMod.DynFlagsTH ( GhcMod\DynFlagsTH.hs, .stack-work\dist\7d103d30\build\GhcMod\DynFlagsTH.o )

    GhcMod\DynFlagsTH.hs:26:1: warning: [-Wunused-imports]
        The import of `GHC.LanguageExtensions' is redundant
          except perhaps to import instances from `GHC.LanguageExtensions'
        To import instances alone, use: import GHC.LanguageExtensions()
       |
    26 | import GHC.LanguageExtensions
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    GhcMod\DynFlagsTH.hs:209:1: warning: [-Wmissing-signatures]
        Top-level binding with no type signature:
          toSet :: (Ord a, Enum a) => E.EnumSet a -> IS.Set a
        |
    209 | toSet es = IS.fromList $ E.toList es
        | ^^^^^
    
    GhcMod\DynFlagsTH.hs:211:1: warning: [-Worphans]
        Orphan instance: instance Ord GeneralFlag
        To avoid this
            move the instance declaration to the module of the class or of the type, or
            wrap the type with a newtype and declare the instance on the new type.
        |
    211 | deriving instance Ord GeneralFlag
        | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    GhcMod\DynFlagsTH.hs:212:1: warning: [-Worphans]
        Orphan instance: instance Ord WarningFlag
        To avoid this
            move the instance declaration to the module of the class or of the type, or
            wrap the type with a newtype and declare the instance on the new type.
        |
    212 | deriving instance Ord DynFlags.WarningFlag
        | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    GhcMod\DynFlagsTH.hs:213:1: warning: [-Worphans]
        Orphan instance: instance Ord DumpFlag
        To avoid this
            move the instance declaration to the module of the class or of the type, or
            wrap the type with a newtype and declare the instance on the new type.
        |
    213 | deriving instance Ord DynFlags.DumpFlag
        | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    GhcMod\DynFlagsTH.hs:214:1: warning: [-Worphans]
        Orphan instance: instance Ord LlvmTarget
        To avoid this
            move the instance declaration to the module of the class or of the type, or
            wrap the type with a newtype and declare the instance on the new type.
        |
    214 | deriving instance Ord DynFlags.LlvmTarget
        | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    GhcMod\DynFlagsTH.hs:215:1: warning: [-Worphans]
        Orphan instance: instance Ord Extension
        To avoid this
            move the instance declaration to the module of the class or of the type, or
            wrap the type with a newtype and declare the instance on the new type.
        |
    215 | deriving instance Ord Extension
        | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    GhcMod\DynFlagsTH.hs:216:1: warning: [-Worphans]
        Orphan instance: instance Eq LlvmTarget
        To avoid this
            move the instance declaration to the module of the class or of the type, or
            wrap the type with a newtype and declare the instance on the new type.
        |
    216 | deriving instance Eq LlvmTarget
        | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [ 3 of 45] Compiling GhcMod.Options.DocUtils ( GhcMod\Options\DocUtils.hs, .stack-work\dist\7d103d30\build\GhcMod\Options\DocUtils.o )
    [ 4 of 45] Compiling GhcMod.Options.Help ( GhcMod\Options\Help.hs, .stack-work\dist\7d103d30\build\GhcMod\Options\Help.o )
    [ 5 of 45] Compiling GhcMod.Read      ( GhcMod\Read.hs, .stack-work\dist\7d103d30\build\GhcMod\Read.o )
    [ 6 of 45] Compiling Paths_ghc_mod_core ( .stack-work\dist\7d103d30\build\autogen\Paths_ghc_mod_core.hs, .stack-work\dist\7d103d30\build\Paths_ghc_mod_core.o )
    [ 7 of 45] Compiling System.Directory.ModTime ( shared\System\Directory\ModTime.hs, .stack-work\dist\7d103d30\build\System\Directory\ModTime.o )
    [ 8 of 45] Compiling Utils            ( shared\Utils.hs, .stack-work\dist\7d103d30\build\Utils.o )
    [ 9 of 45] Compiling GhcMod.Caching.Types ( GhcMod\Caching\Types.hs, .stack-work\dist\7d103d30\build\GhcMod\Caching\Types.o )
    [10 of 45] Compiling GhcMod.Types     ( GhcMod\Types.hs, .stack-work\dist\7d103d30\build\GhcMod\Types.o )
    GHC runtime linker: fatal error: I found a duplicate definition for symbol
       rgb
    whilst processing object file
       C:\Users\crypt\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.2\lib\Win32-2.6.1.0\HSWin32-2.6.1.0.o
    The symbol was previously defined in
       C:\sr\snapshots\03fa9465\lib\x86_64-windows-ghc-8.4.2\Win32-2.5.4.1-LVNqK0SwW285hUwHpPOkae\HSWin32-2.5.4.1-LVNqK0SwW285hUwHpPOkae.o
    This could be caused by:
       * Loading two different object files which export the same symbol
       * Specifying the same object file twice on the GHCi command line
       * An incorrect `package.conf' entry, causing some object to be
         loaded twice.
    ghc.EXE: panic! (the 'impossible' happened)
      (GHC version 8.4.2 for x86_64-unknown-mingw32):
        loadObj "C:\\Users\\crypt\\AppData\\Local\\Programs\\stack\\x86_64-windows\\ghc-8.4.2\\lib\\Win32-2.6.1.0\\HSWin32-2.6.1.0.o": failed

    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
PS C:\projects\personal\haskell-ide-engine>
alanz commented 6 years ago

What version of stack are you using? It needs a fairly recent one, and I recommend the current one (1.7.1).

Any experienced windows users able to help here?

Anrock commented 6 years ago

@alanz latest one available, 1.7.1

alanz commented 6 years ago

The only other thing I can suggest is to delete the .stack-work directory and try again, there may be some old state in it.

On 8 May 2018 at 10:11, Vladislav Shtepin notifications@github.com wrote:

@alanz https://github.com/alanz latest one available, 1.7.1

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/haskell/haskell-ide-engine/issues/550#issuecomment-387321672, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZAB9g5X9IzJc4aRifB0xjuvorQASt6ks5twVNPgaJpZM4T1itx .

Anrock commented 6 years ago

Ok, will try when i get home.

Anrock commented 6 years ago

stack clean --full prior to stack build didn't change anything :(

cryptoquick commented 6 years ago

I'm using the latest also, 1.7.1.

freeman42x commented 6 years ago

@Anrock This won't fix the issue itself but have you considered trying windows subsystem for Linux instead of mingw?

Anrock commented 6 years ago

@razvan-panda yeah, something wasn't working last time i tried, don't remember what. I guess i'll try again sometime.

cryptoquick commented 6 years ago

FWIW, I was using WSL and getting the same issue. I've since switched to Arch, I'll let you know if the problem persists on Linux as a host OS.

johnsonwj commented 6 years ago

Here's an issue in Stack that seems to explain the root cause:

Usually it doesn't matter if stack installs different versions of these packages, but when there is also a dependency on ghc, errors like this will occur.

I wonder if there is a way to fix the project dependencies to make sure that we're only ever compiling against the same version of the ghc package that Stack is using as the compiler (or rather, a Stackage snapshot whose Win32 version is the same as the one that Cabal resolves when building ghc)?

PS: as a last resort, there is also the horrible way: clearing out of ALL of stack's various package repositories (${HOME}/AppData, C:\sr, haskell-ide-engine/.stack-work, etc. etc.) and then running stack build from a completely clean environment. This method sucks.

johnsonwj commented 6 years ago

In fact it looks like Win32-2.6.4.1 has never been in a Stackage snapshot, despite that version being a dependency in GHC 8.4.2:

C:\Users\crypt\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.2\lib\Win32-2.6.1.0\HSWin32-2.6.1.0.o

(from @cryptoquick's error log).

Here's the Win32 dependency for the GHC binary

And a similar dependency for what I think is the ghc package

(TIL: GHC is a very complex project :P)

I wonder if there is a reason that Stackage doesn't pin its package versions to the same ones used in the ghc dependencies?

johnsonwj commented 6 years ago

Oh hello, here's an issue in Stackage for just this problem!

It looks like a fix was attempted but it was reverted, and then implemented in stackage-curator instead.

I think that when stackage-curator gets released next, this should be fixed?

I will try to build it locally, generate a snapshot (probably this is possible?), and confirm whether or not HIE will compile.

Anrock commented 6 years ago

@johnsonwj do i understand correctly that some next stackage nightly will fix this issue? I have no idea what stackage-curator is.

johnsonwj commented 6 years ago

stackage-curator is an executable that generates the snapshot files for each build plan. My comment about it needing to be released wasn't correct, I think; from poking around stackage, it seems that they use the latest master anyway.

Win32 hasn't been explicitly included in a stackage snapshot since nightly-2018-05-02. I suspect that any snapshot after that will work, as well as LTS 11.8 or 11.9.

johnsonwj commented 6 years ago

I will confirm this and PR updates to the stack files if they end up working for me. I am worried that LTS 9 and 10 will be broken for Windows unless for some reason new snapshots are generated for those versions of GHC. However, one possible glimmer of hope is that the version of Win32 in those snapshots lines up with the one that is used in ghc; I will try to find out if that is the case and update the corresponding stack files accordingly.

johnsonwj commented 6 years ago
GHC Version Stackage Snapshot Stackage Win32 GHC Win32 Dependency Should Work?
8.4.2 >= nightly-2018-05-03 n/a 2.6.2.0
8.4.2 < nightly-2018-05-03 2.5.4.1 2.6.2.0
8.4.1 all 2.5.4.1 2.6.2.0
8.2.2 all 2.5.4.1 2.5.4.1
8.2.1 >= nightly-2017-08-17 2.5.4.1 2.5.4.1
8.2.1 < nightly-2017-08-17 2.4.0.0 or 2.3.1.1 2.5.4.1
8.0.2 all 2.3.1.1 2.3.1.1

I based the "GHC Win32 Dependency" column on the most recent version of Win32 that matches the constraints in ghc/compiler/ghc.cabal.in. If there is some subtlety in the way stack/cabal resolve the specific version number based on those constraints, maybe the values in that column are incorrect.

For the problematic setups, I will try a couple things:

If those solutions work I'll PR the changes to the stack-*.yaml files.

Anrock commented 6 years ago

@johnsonwj tried it (nightlies after 2018-05-03 and adding Win32 with speicific version to extra-deps), didn't work for me. Same error. Will check again now, though.

alanz commented 6 years ago

@Anrock, have you tried the most recent nightly for the 8.4.2 build?

Anrock commented 6 years ago

Disregard my previous message, for >= nightly-2018-05-03 actually there was another error:

--  While building custom Setup.hs for package haddock-api-2.19.0.1 using:
      C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_2.2.0.1_ghc-8.4.2.exe --builddir=.stack-work\dist\7d103d30 configure --with-ghc=C:\Users\Anrock\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.2\bin\ghc.EXE --with-ghc-pkg=C:\Users\Anrock\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.2\bin\ghc-pkg.EXE --user --package-db=clear --package-db=global --package-db=C:\sr\snapshots\77071368\pkgdb --package-db=C:\Users\Anrock\projects\haskell-ide-engine\.stack-work\install\21156836\pkgdb --libdir=C:\Users\Anrock\projects\haskell-ide-engine\.stack-work\install\21156836\lib --bindir=C:\Users\Anrock\projects\haskell-ide-engine\.stack-work\install\21156836\bin --datadir=C:\Users\Anrock\projects\haskell-ide-engine\.stack-work\install\21156836\share --libexecdir=C:\Users\Anrock\projects\haskell-ide-engine\.stack-work\install\21156836\libexec --sysconfdir=C:\Users\Anrock\projects\haskell-ide-engine\.stack-work\install\21156836\etc --docdir=C:\Users\Anrock\projects\haskell-ide-engine\.stack-work\install\21156836\doc\haddock-api-2.19.0.1 --htmldir=C:\Users\Anrock\projects\haskell-ide-engine\.stack-work\install\21156836\doc\haddock-api-2.19.0.1 --haddockdir=C:\Users\Anrock\projects\haskell-ide-engine\.stack-work\install\21156836\doc\haddock-api-2.19.0.1 --dependency=Cabal=Cabal-2.2.0.1 --dependency=array=array-0.5.2.0 --dependency=base=base-4.11.1.0 --dependency=bytestring=bytestring-0.10.8.2 --dependency=containers=containers-0.5.11.0 --dependency=deepseq=deepseq-1.4.3.0 --dependency=directory=directory-1.3.1.5 --dependency=filepath=filepath-1.4.2 --dependency=ghc=ghc-8.4.2 --dependency=ghc-boot=ghc-boot-8.4.2 --dependency=ghc-paths=ghc-paths-0.1.0.9-BTJEJFO7ixU1hUjA8BfQ4h --dependency=haddock-library=haddock-library-1.5.0.1-DfHt27RGS18LxLALgHOunK --dependency=transformers=transformers-0.5.5.0 --dependency=xhtml=xhtml-3000.2.2.1 --extra-include-dirs=C:\Users\Anrock\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include --extra-lib-dirs=C:\Users\Anrock\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\bin --extra-lib-dirs=C:\Users\Anrock\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\lib
    Process exited with code: ExitFailure 1
    Logs have been written to: C:\Users\Anrock\projects\haskell-ide-engine\.stack-work\logs\haddock-api-2.19.0.1.log

    Configuring haddock-api-2.19.0.1...
    Error:
        The following packages are broken because other packages they depend on are missing. These broken packages must be rebuilt before they can be used.
    installed package haddock-library-1.5.0.1 is broken due to missing package haddock-library-1.5.0.1-919WkNWGnku6Kvc4vlhbv1-attoparsec

Not sure how to fix this, any advice?

@alanz nightlies from 2018-05-13 have dependency conflict

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for cabal-helper-0.8.0.3:
    temporary-1.3 from stack configuration does not match <1.3 && >=1.2.1  (latest matching version
                  is 1.2.1.1)
needed due to haskell-ide-engine-0.2.0.0 -> cabal-helper-0.8.0.3

In the dependencies for ghc-mod-5.9.0.0:
    temporary-1.3 from stack configuration does not match <1.3 && >=1.2.0.3  (latest matching
                  version is 1.2.1.1)
needed due to haskell-ide-engine-0.2.0.0 -> ghc-mod-5.9.0.0

In the dependencies for ghc-mod-core-5.9.0.0:
    temporary-1.3 from stack configuration does not match <1.3 && >=1.2.0.3  (latest matching
                  version is 1.2.1.1)
needed due to hie-plugin-api-0.2.0.0 -> ghc-mod-core-5.9.0.0

I'm trying to fix it now.

alanz commented 6 years ago

Thanks. We need to bump forward to a current one from time to time.

Anrock commented 6 years ago

Bumped temporary upper bound in all listed places and got same error about broken haddock-api...

alanz commented 6 years ago

With a little help from cabal new-build and the plan.json it generates, I end up with compilation proceeding for

extra-deps:
- apply-refact-0.5.0.0
- constrained-dynamic-0.1.0.0
- haddock-api-2.19.0.1
- haddock-library-1.5.0.1
- haskell-lsp-0.2.2.0
- haskell-lsp-types-0.2.2.0
- syz-0.2.0.0
- temporary-1.2.1.1

On 15 May 2018 at 21:51, Vladislav Shtepin notifications@github.com wrote:

Bumped temporary upper bound in all listed places and got same error about broken haddock-api...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/haskell/haskell-ide-engine/issues/550#issuecomment-389291786, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZAB1f3h8mLwtLZOs7sgdeM24NQTg2_ks5tyzG1gaJpZM4T1itx .

Anrock commented 6 years ago

@alanz nah, tried that too.

Anyway: success! I haven't found a way to properly fix that broken package issue, so i've just deleted whole %STACK_ROOT% and it was gone.

Succesfully built with nightly-2018-05-15!

johnsonwj commented 6 years ago

Is this going to affect everyone who's used a one of the bad snapshots? If manually blowing away STACK_ROOT is the only way to get it to build on Windows it might be useful to put a note in the readme

alanz commented 6 years ago

I know that the latest stack (1.7.1) installs different GHC versions from the prior ones. This may cause issues for snapshot artifacts built with the prior compiler installation, and then mixed in with the new one.

I know that as a precaution I blew away my entire ~/.stack directory to be sure.

Anrock commented 6 years ago

@johnsonwj probably. When i tried to check your table after successful build and used nightly-05-03 without curator fix - broken haddock package appeared again. However i'm not sure that blowing away whole stack root is the right way to recover.

alanz commented 6 years ago

I have a version that builds with the current nightly, and uses an appropriate haddock-api/haddock-library.

See https://github.com/haskell/haskell-ide-engine/pull/571, which I will merge as soon as CI passes.