Compiling on Windows

Neil Mitchell ndmitchell at gmail.com
Mon Sep 15 20:13:23 UTC 2014


Hi,

At ICFP Simon Peyton Jones encouraged me to compile GHC on Windows. I
did so in the past about 5 years ago, and it was a painful experience.
To help improve the path for those who come after me, I kept a log
(which I'll share after I get a working build). My current state is
that I get an error while running make while building stage2:

"inplace/bin/ghc-stage1.exe" -hisuf hi -osuf  o -hcsuf hc -static
-H32m -O    -this-package-key haske_9y30zKcKDr9BxdhpktYrNk
-hide-all-packages -i -ilibraries/haskeline/.
-ilibraries/haskeline/dist-install/build
-ilibraries/haskeline/dist-install/build/autogen
-Ilibraries/haskeline/dist-install/build
-Ilibraries/haskeline/dist-install/build/autogen
-Ilibraries/haskeline/includes   -optP-DUSE_GHC_ENCODINGS -optP-DMINGW
-optP-include -optPlibraries/haskeline/dist-install/build/autogen/cabal_macros.h
-package-key Win32_43THQMouBnk2wpnouztX1X -package-key
base_ESD4aQEEWwsHtYJVc1BwtJ -package-key bytes_Kc0PyaputnzDnBdZW0y2Gv
-package-key conta_ChF4XLXB9JmByIycPzerow -package-key
direc_6qC0tVrFkqbBNeWAGS0s7g -package-key filep_34DFDFT9FVD9pRLLgh8IdQ
-package-key trans_5jw4w9yTgmZ89ByuixDAKP -Wall -XHaskell98
-XForeignFunctionInterface -XRank2Types -XFlexibleInstances
-XTypeSynonymInstances -XFlexibleContexts -XExistentialQuantification
-XScopedTypeVariables -XGeneralizedNewtypeDeriving
-XMultiParamTypeClasses -XOverlappingInstances -XUndecidableInstances
-XCPP -XDeriveDataTypeable -XPatternGuards -O2  -no-user-package-db
-rtsopts      -odir libraries/haskeline/dist-install/build -hidir
libraries/haskeline/dist-install/build -stubdir
libraries/haskeline/dist-install/build -split-objs  -c
libraries/haskeline/dist-install/build/System/Console/Haskeline/Backend/Win32.hs
-o libraries/haskeline/dist-install/build/System/Console/Haskeline/Backend/Win32.o

on the commandline: Warning:
    -XOverlappingInstances is deprecated: instead use per-instance
pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS

librarieshaskelineSystemConsoleHaskelineBackendWin32.hsc:263:15:
    No instance for (Applicative (Draw m))
      arising from the 'deriving' clause of a data type declaration
    Possible fix:
      use a standalone 'deriving instance' declaration,
        so you can specify the instance context yourself
    When deriving the instance for (Monad (Draw m))

librarieshaskelineSystemConsoleHaskelineBackendWin32.hsc:263:21:
    No instance for (Applicative (Draw m))
      arising from the 'deriving' clause of a data type declaration
    Possible fix:
      use a standalone 'deriving instance' declaration,
        so you can specify the instance context yourself
    When deriving the instance for (MonadIO (Draw m))

librarieshaskelineSystemConsoleHaskelineBackendWin32.hsc:263:29:
    No instance for (Applicative (Draw m))
      arising from the 'deriving' clause of a data type declaration
    Possible fix:
      use a standalone 'deriving instance' declaration,
        so you can specify the instance context yourself
    When deriving the instance for (MonadException (Draw m))

librarieshaskelineSystemConsoleHaskelineBackendWin32.hsc:263:45:
    No instance for (Applicative (Draw m))
      arising from the 'deriving' clause of a data type declaration
    Possible fix:
      use a standalone 'deriving instance' declaration,
        so you can specify the instance context yourself
    When deriving the instance for (MonadReader Handles (Draw m))
libraries/haskeline/ghc.mk:4: recipe for target
'libraries/haskeline/dist-install/build/System/Console/Haskeline/Backend/Win32.o'
failed
make[1]: *** [libraries/haskeline/dist-install/build/System/Console/Haskeline/Backend/Win32.o]
Error 1
Makefile:71: recipe for target 'all' failed
make: *** [all] Error 2

Any idea how to overcome that? I note from the weekly update email
that there was an email on Windows last night, but a "./sync-all pull"
doesn't make it go away.

Thanks, Neil


More information about the ghc-devs mailing list