new Windows build problem

Simon Peyton Jones simonpj at microsoft.com
Fri Mar 7 22:33:18 UTC 2014


Is anyone able to help me here?  I have no idea how to hunt down a seg-fault in ghc-stage1.exe on Windows.
I thought of using git bisect to try to find the offending commit (though each bisection takes a couple of hours since it has to be a clean build).  But I was defeated by the fact that haddock is a separate repo, and the task of finding the haddock commit that matches the ghc commit defeated me.  There are probably other repos too, but they probably change less often.
In short, I'm stuck.  I can use Linux at work, but when I'm on the move I just have my Windows laptop.  What is frustrating is that GHC used to build on Windows just fine.
Does anyone feel more competent than me feel able to bisect their way to the offending commit?
Thanks
Simon

From: ghc-devs [mailto:ghc-devs-bounces at haskell.org] On Behalf Of Simon Peyton Jones
Sent: 06 March 2014 23:42
To: ghc-devs at haskell.org
Subject: RE: new Windows build problem

Actually, the two problems seem to be the same.  A fresh build from scratch yields

libraries/random/ghc.mk:5: recipe for target 'libraries/random/dist-install/build/System/Random.o' failed

make[1]: *** [libraries/random/dist-install/build/System/Random.o] Segmentation fault
Then sniping the command line that tried to build Random.o yields


"inplace/bin/ghc-stage2.exe" -hisuf hi -osuf  o -hcsuf hc -static  -H32m -O -Werror -Wall -H64m -O0    -package-name random-1.0.1.1 -hide-all-packages -i -ilibraries/random/. -ilibraries/random/dist-install/build -ilibraries/random/dist-install/build/autogen -Ilibraries/random/dist-install/build -Ilibraries/random/dist-install/build/autogen -Ilibraries/random/.    -optP-include -optPlibraries/random/dist-install/build/autogen/cabal_macros.h -package base-4.7.0.0 -package time-1.4.2 -O2 -XHaskell98 -XCPP -O2 -O -dcore-lint -fno-warn-amp  -fno-warn-deprecated-flags -dcore-lint  -no-user-package-db -rtsopts      -odir libraries/random/dist-install/build -hidir libraries/random/dist-install/build -stubdir libraries/random/dist-install/build   -c libraries/random/./System/Random.hs -o libraries/random/dist-install/build/System/Random.o



bash: [6536: 1 (255)] tcsetattr: Inappropriate ioctl for device
io
So this ioctl thing seems to be reported as a seg fault by the make system.
Running the same command from a 'cmd' window does give a seg-fault pop-up window.  Alas.
Running with -dshow-passes shows that it happens during code generation,

*** CorePrep:

Result size of CorePrep = {terms: 1,214, types: 912, coercions: 52}

*** Core Linted result of CorePrep:

*** Stg2Stg:

*** CodeOutput:

*** New CodeGen:

*** CPSZ:

*** CPSZ:
I am totally stuck.
Simon
From: Simon Peyton Jones
Sent: 06 March 2014 22:11
To: ghc-devs at haskell.org<mailto:ghc-devs at haskell.org>
Subject: new Windows build problem

Sigh.  Totally new problem with building GHC (HEAD) on Windows..

"inplace/bin/ghc-stage2.exe" -hisuf hi -osuf  o -hcsuf hc -static  -H32m -O -Werror -Wall -H64m -O0    -package-name haskell98-2.0.0.3 -hide-all-packages -i -ilibraries/haskell98/. -ilibraries/haskell98/dist-install/build -ilibraries/haskell98/dist-install/build/autogen -Ilibraries/haskell98/dist-install/build -Ilibraries/haskell98/dist-install/build/autogen -Ilibraries/haskell98/.    -optP-include -optPlibraries/haskell98/dist-install/build/autogen/cabal_macros.h -package array-0.5.0.0 -package base-4.7.0.0 -package directory-1.2.0.2 -package old-locale-1.0.0.6 -package old-time-1.1.0.2 -package process-1.2.0.0 -package time-1.4.2 -Wall -XHaskell98 -O2 -O -dcore-lint -fno-warn-amp  -fno-warn-deprecated-flags -dcore-lint  -no-user-package-db -rtsopts      -odir libraries/haskell98/dist-install/build -hidir libraries/haskell98/dist-install/build -stubdir libraries/haskell98/dist-install/build   -c libraries/haskell98/./Directory.hs -o libraries/haskell98/dist-install/build/Directory.o

bash: [6536: 1 (255)] tcsetattr: Inappropriate ioctl for device

HEAD $
What on earth is this ioctl stuff?
The above is repeatable; same command line, same result.

But I'm also getting random seg-faults when building libraries with the stage2 compiler

libraries/random/ghc.mk:5: recipe for target 'libraries/random/dist-install/build/System/Random.o' failed

make[1]: *** [libraries/random/dist-install/build/System/Random.o] Segmentation fault
This is NOT repeatable.  Saying 'make' again gets further.
Any ideas?
Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20140307/17401ddd/attachment-0001.html>


More information about the ghc-devs mailing list