| | 8 | |
| | 9 | === All binaries crash (Windows only) === |
| | 10 | |
| | 11 | On Windows you may see this |
| | 12 | {{{ |
| | 13 | "inplace/bin/hsc2hs.exe" --cc=gcc --ld=gcc --cflag=-g --cflag=-O2 |
| | 14 | --cflag=-D__GLASGOW_HASKELL__=611 '--cflag=-O' '--cflag=-g' |
| | 15 | '--cflag=-O2' '--cflag=-Ilibraries/hpc/.' |
| | 16 | '--cflag=-isystemc:/ghc/ghc-6.10.3\directory-1.0.0.3\include' |
| | 17 | '--cflag=-isystemc:/ghc/ghc-6.10.3\old-time-1.0.0.2\include' |
| | 18 | '--cflag=-isystemc:/ghc/ghc-6.10.3\Win32-2.2.0.0\include' |
| | 19 | '--cflag=-isystemc:/ghc/ghc-6.10.3\bytestring-0.9.1.4\include' |
| | 20 | '--cflag=-isystemc:/ghc/ghc-6.10.3\base-4.1.0.0\include' |
| | 21 | '--cflag=-isystemc:/ghc/ghc-6.10.3/include' |
| | 22 | '--cflag=-isystemPAPI_INCLUDE_DIR' |
| | 23 | '--lflag=-Lc:/ghc/ghc-6.10.3\directory-1.0.0.3' |
| | 24 | '--lflag=-Lc:/ghc/ghc-6.10.3\old-time-1.0.0.2' |
| | 25 | '--lflag=-Lc:/ghc/ghc-6.10.3\old-locale-1.0.0.1' |
| | 26 | '--lflag=-Lc:/ghc/ghc-6.10.3\filepath-1.1.0.2' |
| | 27 | '--lflag=-Lc:/ghc/ghc-6.10.3\containers-0.2.0.1' |
| | 28 | '--lflag=-Lc:/ghc/ghc-6.10.3\array-0.2.0.0' |
| | 29 | '--lflag=-Lc:/ghc/ghc-6.10.3\syb-0.1.0.1' |
| | 30 | '--lflag=-Lc:/ghc/ghc-6.10.3\Win32-2.2.0.0' |
| | 31 | '--lflag=-Lc:/ghc/ghc-6.10.3\bytestring-0.9.1.4' |
| | 32 | '--lflag=-Lc:/ghc/ghc-6.10.3\base-4.1.0.0' |
| | 33 | '--lflag=-Lc:/ghc/ghc-6.10.3\integer-0.1.0.1' |
| | 34 | '--lflag=-Lc:/ghc/ghc-6.10.3\ghc-prim-0.1.0.0' |
| | 35 | '--lflag=-Lc:/ghc/ghc-6.10.3' '--lflag=-Lc:/ghc/ghc-6.10.3/gcc-lib' |
| | 36 | '--lflag=-luser32' '--lflag=-lgdi32' '--lflag=-lwinmm' |
| | 37 | '--lflag=-lkernel32' '--lflag=-ladvapi32' '--lflag=-lwsock32' |
| | 38 | '--lflag=-lmsvcrt' '--lflag=-lkernel32' '--lflag=-luser32' |
| | 39 | '--lflag=-lshell32' '--lflag=-lm' '--lflag=-lffi' '--lflag=-lgmp' |
| | 40 | '--lflag=-lwsock32' libraries/hpc/./Trace/Hpc/Reflect.hsc -o |
| | 41 | libraries/hpc/dist-boot/build/Trace/Hpc/Reflect.hs |
| | 42 | |
| | 43 | running libraries/hpc/dist-boot/build/Trace/Hpc/Reflect_hsc_make.exe failed |
| | 44 | command was: libraries/hpc/dist-boot/build/Trace/Hpc/Reflect_hsc_make.exe |
| | 45 | >libraries/hpc/dist-boot/build/Trace/Hpc/Reflect.hs |
| | 46 | make[1]: *** [libraries/hpc/dist-boot/build/Trace/Hpc/Reflect.hs] Error 1 |
| | 47 | make: *** [all] Error 2 |
| | 48 | }}} |
| | 49 | A dialog pops up: “Reflect_hsc_make.exe has stopped working”, with the buttons “Debug” and “Close program”. |
| | 50 | |
| | 51 | This signals an obscure problem whose source is still unknown: |
| | 52 | if GHC links in certain Windows libraries, `kernel32` and `msvcrt`, the resulting program crashes. |
| | 53 | See [http://www.haskell.org/pipermail/glasgow-haskell-bugs/2009-April/018643.html Sigbjorn's email]. We wish we knew why! |
| | 54 | |
| | 55 | We've worked around this in GHC 6.10.4 (and later) so that the problem shouldn't arise if you use that to build GHC with. But if you have an earlier GHC on your machine you can still work around it as follows: |
| | 56 | |
| | 57 | '''Simon to fill in''' |
| | 58 | |