Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 10, Compilation with Stack fails for 8.4.2 version #4020

Closed
fpanahi opened this issue May 10, 2018 · 3 comments
Closed

Windows 10, Compilation with Stack fails for 8.4.2 version #4020

fpanahi opened this issue May 10, 2018 · 3 comments

Comments

@fpanahi
Copy link

fpanahi commented May 10, 2018

I am using the latest release of stack (1.7.1) on the latest version of Windows 10.

Compilation with Stack fails for 8.4.2 version.

I went through the following steps:

  1. I installed Stack: OK.
  2. I cloned https://github.com/haskell/haskell-ide-engine : OK.
  3. I ran the command Stack Install : crashed, with the following error message

Microsoft Windows [version 10.0.16299.431]
(c) 2017 Microsoft Corporation. Tous droits réservés.

C:\Users\Farhad>cd c:\hie

c:\hie>stack install
�[0mNo packages found in snapshot which provide a "cabal" executable, which is a build-tool dependency of "cabal-helper"�[0m
�[0mghc-mod-core-5.9.0.0: configure (lib)�[0m
�[0msorted-list-0.2.1.0: configure�[0m
�[0mghc-mod-core-5.9.0.0: build (lib)�[0m
�[0msorted-list-0.2.1.0: build�[0m
�[0mhaskell-lsp-types-0.2.1.0: configure�[0m
�[0msorted-list-0.2.1.0: copy/register�[0m
�[0mhaskell-lsp-types-0.2.1.0: build�[0m
�[0mghc-exactprint-0.5.6.1: configure�[0m
�[0mghc-exactprint-0.5.6.1: build�[0m
�[0msyz-0.2.0.0: configure�[0m
�[0msyz-0.2.0.0: build�[0m
�[0msyz-0.2.0.0: copy/register�[0m
�[0mhaskell-lsp-types-0.2.1.0: copy/register�[0m
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:\hie.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\Farhad\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\\Farhad\\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:\hie.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-IrSuTRa7k3C5ik5GHoMOlo) 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-IrSuTRa7k3C5ik5GHoMOlo) 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..
[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\Farhad\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\\Farhad\\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

c:\hie>

@fpanahi
Copy link
Author

fpanahi commented May 24, 2018

Please help!

@Anrock
Copy link

Anrock commented May 25, 2018

That's looks like a dupe of haskell/haskell-ide-engine#550. Try

  1. pull hie master just in case your head is before fix was commited
  2. delete C:\sr\snapshots\03fa9465
  3. build again

If that wouldn't help - blow whole %STACK_ROOT% (C:\sr in your case) before build.

@snoyberg
Copy link
Contributor

Closing as upstream issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants