ghcid
ghcid copied to clipboard
cabal and stack install fails on Windows
Hello and thank you for creating ghcid! I want to report an installation error on Windows. I may follow the directions to use MinGW, but I don't believe that should be the user experience on Windows. In a perfect world, the installation should "just work." Thank you.
Cabal error:
C:\Users\olega\Documents\Haskell\Hello>cabal update & cabal install ghcid
Downloading the latest package list from hackage.haskell.org
Package list of hackage.haskell.org is up to date.
The index-state is set to 2023-10-22T19:04:13Z.
Resolving dependencies...
Build profile: -w ghc-9.4.7 -O1
In order, the following will be built (use -v for more details):
- base-orphans-0.9.1 (lib) (requires download & build)
- time-1.12.2 (lib:time) (requires build)
- transformers-base-0.4.6 (lib) (requires build)
- directory-1.3.8.1 (lib:directory) (requires build)
- monad-control-1.0.3.1 (lib) (requires build)
- unix-compat-0.7 (lib) (requires build)
- process-1.6.18.0 (lib:process) (requires build)
- fsnotify-0.4.1.0 (lib) (requires build)
- terminal-size-0.3.4 (lib) (requires build)
- extra-1.7.14 (lib) (requires build)
- cmdargs-0.10.22 (lib) (requires build)
- ghcid-0.8.9 (exe:ghcid) (requires build)
Downloading base-orphans-0.9.1
Starting time-1.12.2 (all, legacy fallback)
Downloaded base-orphans-0.9.1
Starting base-orphans-0.9.1 (lib)
Building base-orphans-0.9.1 (lib)
Installing base-orphans-0.9.1 (lib)
Completed base-orphans-0.9.1 (lib)
Failed to build time-1.12.2. The failure occurred during the configure step.
Build log (
C:\cabal\logs\ghc-9.4.7\time-1.12.2-9f7e265c4b43029f1dc360f09f1573ad42327e9e.log
):
Configuring time-1.12.2...
Error: cabal.exe: The package has a './configure' script. If you are on
Windows, This requires a Unix compatibility toolchain such as MinGW+MSYS or
Cygwin. If you are not on Windows, ensure that an 'sh' command is discoverable
in your path.
Error: cabal.exe: Failed to build time-1.12.2 (which is required by exe:ghcid
from ghcid-0.8.9). See the build log above for details.
Stack error:
C:\Users\olega\Documents\Haskell\Hello>stack update & stack install ghcid
Selected mirror https://hackage.haskell.org/
Downloading timestamp
Waiting to acquire cache lock on C:\/Users/olega/AppData/Roaming/stack/pantry/hackage/hackage-security-lock
Acquired cache lock on C:\/Users/olega/AppData/Roaming/stack/pantry/hackage/hackage-security-lock
Released cache lock on C:\/Users/olega/AppData/Roaming/stack/pantry/hackage/hackage-security-lock
No package index update available and cache up to date
Package index cache populated
Warning: Ignoring ghcid's bounds on Win32 (>=2.13.2.1) and using Win32-2.12.0.1.
Reason: trusting snapshot over Cabal file dependency information.
ghcid> configure
ghcid> Configuring ghcid-0.8.9...
ghcid> build
ghcid> Preprocessing executable 'ghcid' for ghcid-0.8.9..
ghcid> Building executable 'ghcid' for ghcid-0.8.9..
ghcid> [ 1 of 10] Compiling Language.Haskell.Ghcid.Escape
ghcid> [ 2 of 10] Compiling Language.Haskell.Ghcid.Terminal
ghcid>
ghcid> src\Language\Haskell\Ghcid\Terminal.hs:62:21: error:
ghcid> Variable not in scope: wM_SETICON :: WindowMessage
ghcid> Suggested fix:
ghcid> Perhaps use one of these:
ghcid> `wM_GETICON' (line 21),
ghcid> `wM_SETFONT' (imported from Graphics.Win32.Message)
ghcid> |
ghcid> 62 | sendMessage wnd wM_SETICON iCON_SMALL $ fromIntegral $ castPtrToUINTPtr icon
ghcid> | ^^^^^^^^^^
ghcid>
ghcid> src\Language\Haskell\Ghcid\Terminal.hs:62:32: error:
ghcid> Variable not in scope: iCON_SMALL :: WPARAM
ghcid> |
ghcid> 62 | sendMessage wnd wM_SETICON iCON_SMALL $ fromIntegral $ castPtrToUINTPtr icon
ghcid> | ^^^^^^^^^^
ghcid>
ghcid> src\Language\Haskell\Ghcid\Terminal.hs:63:21: error:
ghcid> Variable not in scope: wM_SETICON :: WindowMessage
ghcid> Suggested fix:
ghcid> Perhaps use one of these:
ghcid> `wM_GETICON' (line 21),
ghcid> `wM_SETFONT' (imported from Graphics.Win32.Message)
ghcid> |
ghcid> 63 | sendMessage wnd wM_SETICON iCON_BIG $ fromIntegral $ castPtrToUINTPtr icon
ghcid> | ^^^^^^^^^^
ghcid>
ghcid> src\Language\Haskell\Ghcid\Terminal.hs:63:32: error:
ghcid> Variable not in scope: iCON_BIG :: WPARAM
ghcid> |
ghcid> 63 | sendMessage wnd wM_SETICON iCON_BIG $ fromIntegral $ castPtrToUINTPtr icon
ghcid> | ^^^^^^^^
ghcid>
ghcid> src\Language\Haskell\Ghcid\Terminal.hs:75:42: error:
ghcid> Variable not in scope: iCON_BIG :: WPARAM
ghcid> |
ghcid> 75 | icoBig <- sendMessage wnd wM_GETICON iCON_BIG 0
ghcid> | ^^^^^^^^
ghcid>
ghcid> src\Language\Haskell\Ghcid\Terminal.hs:76:44: error:
ghcid> Variable not in scope: iCON_SMALL :: WPARAM
ghcid> |
ghcid> 76 | icoSmall <- sendMessage wnd wM_GETICON iCON_SMALL 0
ghcid> | ^^^^^^^^^^
ghcid>
ghcid> src\Language\Haskell\Ghcid\Terminal.hs:78:25: error:
ghcid> Variable not in scope: wM_SETICON :: WindowMessage
ghcid> Suggested fix:
ghcid> Perhaps use one of these:
ghcid> `wM_GETICON' (line 21),
ghcid> `wM_SETFONT' (imported from Graphics.Win32.Message)
ghcid> |
ghcid> 78 | sendMessage wnd wM_SETICON iCON_BIG icoBig
ghcid> | ^^^^^^^^^^
ghcid>
ghcid> src\Language\Haskell\Ghcid\Terminal.hs:78:36: error:
ghcid> Variable not in scope: iCON_BIG :: WPARAM
ghcid> |
ghcid> 78 | sendMessage wnd wM_SETICON iCON_BIG icoBig
ghcid> | ^^^^^^^^
ghcid>
ghcid> src\Language\Haskell\Ghcid\Terminal.hs:79:25: error:
ghcid> Variable not in scope: wM_SETICON :: WindowMessage
ghcid> Suggested fix:
ghcid> Perhaps use one of these:
ghcid> `wM_GETICON' (line 21),
ghcid> `wM_SETFONT' (imported from Graphics.Win32.Message)
ghcid> |
ghcid> 79 | sendMessage wnd wM_SETICON iCON_SMALL icoSmall
ghcid> | ^^^^^^^^^^
ghcid>
ghcid> src\Language\Haskell\Ghcid\Terminal.hs:79:36: error:
ghcid> [ 3 of 10] Compiling Language.Haskell.Ghcid.Types
ghcid> Variable not in scope: iCON_SMALL :: WPARAM
ghcid> |
ghcid> 79 | sendMessage wnd wM_SETICON iCON_SMALL icoSmall
ghcid> | ^^^^^^^^^^
ghcid> [ 4 of 10] Compiling Language.Haskell.Ghcid.Parser
ghcid> [ 5 of 10] Compiling Language.Haskell.Ghcid.Util
ghcid> [ 6 of 10] Compiling Language.Haskell.Ghcid
ghcid> [ 7 of 10] Compiling Paths_ghcid
ghcid> [ 8 of 10] Compiling Session
ghcid> [ 9 of 10] Compiling Wait
Error: [S-7282]
Stack failed to execute the build plan.
While executing the build plan, Stack encountered the error:
[S-7011]
While building package ghcid-0.8.9 (scroll up to its section to see the error) using:
C:\Users\olega\AppData\Roaming\stack\setup-exe-cache\x86_64-windows\Cabal-simple_9p6GVs8J_3.8.1.0_ghc-9.4.7.exe --verbose=1 --builddir=.stack-work\dist\22605e11 build --ghc-options " -fdiagnostics-color=always"
Process exited with code: ExitFailure 1
Same behavior on Win11 with GHC 9.4.7, installing with either cabal or stack.