Windows build failure

Simon Peyton-Jones simonpj at microsoft.com
Tue Sep 9 10:32:36 EDT 2008


Thanks very much Neil; we (well Ian!) will digest your efforts.

Simon

| -----Original Message-----
| From: glasgow-haskell-users-bounces at haskell.org [mailto:glasgow-haskell-users-
| bounces at haskell.org] On Behalf Of Mitchell, Neil
| Sent: 09 September 2008 14:56
| To: glasgow-haskell-users at haskell.org
| Subject: RE: Windows build failure
|
| Hi
|
| I've now got a build of GHC, and a binary distribution. The compilation
| succeeded after the hacks detailed in the previous message.
|
| There are now two issues:
|
| * runhaskell isn't in ghc/bin - but runghc is. I guess something forgot
| to get copied or created. This issue is very minor to me, but will be of
| great significance if it was missing in a release.
|
| * The ghc API package hasn't been installed. "ghc-pkg list" gives:
|
| C:\Neil\haddock>ghc-pkg list
| C:/ghc/ghc-6.9.20080905\package.conf:
|     Cabal-1.5.4, Win32-2.1, array-0.1, base-3.0.3.0, base-4.0,
|     bytestring-0.9, containers-0.1, directory-1.0, filepath-1.1,
|     ghc-prim-0.1, {haddock-2.2.2}, haskell98-1.0.1, hpc-0.5,
|     integer-0.1, old-locale-1.0, old-time-1.0, packedstring-0.1,
|     pretty-1.0, process-1.0.1, random-1.0, rts-1.0, syb-0.1,
|     template-haskell-2.2
|
| My aim of building GHC was to run haddock (and eventually hoogle), so
| not having the ghc library available is a problem. Does something have
| to be configured to get the library? Is it hiding somewhere, just not
| exposed? How did haddock-2.2.2 get installed and compiled without a ghc
| library?
|
| Thanks
|
| Neil
|
| -----Original Message-----
| From: Mitchell, Neil
| Sent: 09 September 2008 12:08 pm
| To: 'glasgow-haskell-users at haskell.org'
| Subject: RE: Windows build failure
|
| Hi,
|
| I worked around the first problem, lacking cc1, by following the
| instructions here: http://www.nabble.com/cc1-not-found-td9742088.html -
| adding c:\mingw\libexec\gcc\mingw32\3.4.5 to the $PATH. Then I get a
| shorter error:
|
| cd hpc    && c:/ghc-build/ghc/libraries/cabal-bin
| c:/ghc/ghc-6.8.3/bin/ghc c:/gh
| c-build/ghc/libraries/bootstrapping.conf configure
| --distpref=dist-bootstrapping  --with-compiler=c:/ghc/ghc-6.8.3/bin/ghc
| --with-hc-pkg=c:/ghc/ghc-6.8.3/bin/ghc
| -pkg --package-db=c:/ghc-build/ghc/libraries/bootstrapping.conf.tmp
| Configuring hpc-0.5...
| cd hpc    && c:/ghc-build/ghc/libraries/cabal-bin
| c:/ghc/ghc-6.8.3/bin/ghc c:/gh
| c-build/ghc/libraries/bootstrapping.conf build
| --distpref=dist-bootstrapping
|
| Preprocessing library hpc-0.5...
| In file included from
| /mingw/lib/gcc/mingw32/3.4.5/../../../../include/float.h:1
| 9,
|                  from c:/ghc/ghc-6.8.3/include/mingw/float.h:19,
|                  from c:/ghc/ghc-6.8.3/include/HsFFI.h:69,
|                  from c:/ghc/ghc-6.8.3/template-hsc.h:4,
|                  from
| dist-bootstrapping\build\Trace\Hpc\Reflect_hsc_make.c:1:
| /mingw/include/float.h:102: error: syntax error before "_controlfp"
| /mingw/include/float.h:103: error: syntax error before "_control87"
| /mingw/include/float.h:106: error: syntax error before "_clearfp"
| /mingw/include/float.h:107: error: syntax error before "_statusfp"
| /mingw/include/float.h:121: error: syntax error before "_fpreset"
| /mingw/include/float.h:122: error: syntax error before "fpreset"
| /mingw/include/float.h:125: error: syntax error before "__fpecode"
| /mingw/include/float.h:133: error: syntax error before "_chgsign"
| /mingw/include/float.h:134: error: syntax error before "_copysign"
| /mingw/include/float.h:135: error: syntax error before "_logb"
| /mingw/include/float.h:136: error: syntax error before "_nextafter"
| /mingw/include/float.h:137: error: syntax error before "_scalb"
| /mingw/include/float.h:139: error: syntax error before "_finite"
| /mingw/include/float.h:140: error: syntax error before "_fpclass"
| /mingw/include/float.h:141: error: syntax error before "_isnan"
| compiling dist-bootstrapping\build\Trace\Hpc\Reflect_hsc_make.c failed
| command was: c:\ghc\ghc-6.8.3\gcc.exe -c -D__GLASGOW_HASKELL__=608
| -Ic:\ghc\ghc- 6.8.3/lib\directory-1.0.0.1\include
| -Ic:\ghc\ghc-6.8.3/lib\old-time-1.0.0.0\incl
| ude -Ic:\ghc\ghc-6.8.3/lib\base-3.0.2.0\include
| -Ic:\ghc\ghc-6.8.3/include -Ic:\ ghc\ghc-6.8.3/include/mingw
| dist-bootstrapping\build\Trace\Hpc\Reflect_hsc_make.
| c -o dist-bootstrapping\build\Trace\Hpc\Reflect_hsc_make.o
| make[1]: *** [bootstrapping.conf] Error 1
| make[1]: Leaving directory `/cygdrive/c/ghc-build/ghc/libraries'
| make: *** [stage1] Error 2
|
| An example of the first error:
|
| _CRTIMP unsigned int __cdecl __MINGW_NOTHROW _controlfp (unsigned int
| unNew, unsigned int unMask);
|
| And all the error lines seem to have _MINGW_NOTHROW just before the
| syntax error. I therefore added:
|
| #define __MINGW_NOTHROW
|
| To the mingw\include\float.h header - which is clearly not a good idea
| to do in general, but may hack it enough until a build expert can give
| me the right fix.
|
| The next error I got was:
|
| cd hpc    && c:/ghc-build/ghc/libraries/cabal-bin
| c:/ghc/ghc-6.8.3/bin/ghc c:/gh
| c-build/ghc/libraries/bootstrapping.conf build
| --distpref=dist-bootstrapping
|
| Preprocessing library hpc-0.5...
| \mingw\lib\gcc\mingw32\..\..\..\mingw32\bin\ld.exe: crtbegin.o: No such
| file: No  such file or directory linking
| dist-bootstrapping\build\Trace\Hpc\Reflect_hsc_make.o failed command
| was: c:\ghc\ghc-6.8.3\gcc.exe -Lc:\ghc\ghc-6.8.3/lib\directory-1.0.0.1 -
| Lc:\ghc\ghc-6.8.3/lib\filepath-1.1.0.0
| -Lc:\ghc\ghc-6.8.3/lib\old-time-1.0.0.0 -
| Lc:\ghc\ghc-6.8.3/lib\old-locale-1.0.0.0
| -Lc:\ghc\ghc-6.8.3/lib\containers-0.1.0
| .2 -Lc:\ghc\ghc-6.8.3/lib\array-0.1.0.0
| -Lc:\ghc\ghc-6.8.3/lib\base-3.0.2.0 -lws
| ock32 -lmsvcrt -lkernel32 -luser32 -lshell32 -Lc:\ghc\ghc-6.8.3
| -Lc:\ghc\ghc-6.8 .3/gcc-lib -lm -lgmp -lwsock32
| dist-bootstrapping\build\Trace\Hpc\Reflect_hsc_ma
| ke.o -o dist-bootstrapping\build\Trace\Hpc\Reflect_hsc_make.exe
| make[1]: *** [bootstrapping.conf] Error 1
| make[1]: Leaving directory `/cygdrive/c/ghc-build/ghc/libraries'
| make: *** [stage1] Error 2
|
| So I added c:\mingw\lib\gcc\mingw32\3.4.5 to the $PATH, where I found a
| copy of crtbegin.o. That didn't work. So I then copied crtbegin.o and
| crtend.o into c:\mingw\lib. That seemed to be enough to get past hpc,
| but again is just a short-term hack.
|
| My build is still going, and I'll report back once it either fails or
| succeeds. However, a general fix does need to be developed for the two
| issues above. Adding cc1 to the path can probably go in as an
| instruction for setting up the build environment.
|
| It would be incredibly useful if someone wrote a windows-build.sh
| command that automated as many steps as possible in the list Claus made,
| and checked for all the others - i.e. checking darcs is on the path,
| checking appropriate versions where possible, checking mingw gcc is
| first etc. If no one else does, I probably will when I install Windows
| on my home machine.
|
| Thanks
|
| Neil
|
| -----Original Message-----
| From: Mitchell, Neil
| Sent: 08 September 2008 9:41 am
| To: 'glasgow-haskell-users at haskell.org'
| Subject: Windows build failure
|
| Hi,
|
| I've just tried building GHC HEAD using GHC 6.8.3 on Windows following
| the instructions on the wiki
| (http://hackage.haskell.org/trac/ghc/wiki/Building/Windows)
|
| I initially got a failure about cc1 not being found when executing
| 6.8.3's gcc, which I worked around by adding c:/ghc/ghc-6.8.3/gcc-lib at
| the end of the path (i.e. last priority)
|
| After this error I get a problem with include files, see the attached
| log file. It looks like include files are going wrong between Mingw and
| 6.8.3. My current $PATH variable is:
|
| /cygdrive/c/mingw/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdr
| ive/c/WI
| NNT/Microsoft.NET/Framework/v2.0.50727:/cygdrive/c/local/MikTex/texmf/mi
| ktex/bin
| :/cygdrive/c/Perl/site/bin:/cygdrive/c/Utils/mks/MKSNT:/cygdrive/c/WINNT
| /system3
| 2:/cygdrive/c/WINNT:/cygdrive/c/WINNT/System32/Wbem:/cygdrive/c/CSsystem
| :/cygdri
| ve/c/Utils:/cygdrive/c/Program
| Files/Sybase.12/OCS-12_0/bin:/cygdrive/c/ghc/ghc-
| 6.8.3:/cygdrive/c/ghc/ghc-6.8.3/bin:/cygdrive/c/bin:/cygdrive/c/Program
| Files/Ha
| skell/bin:/cygdrive/f/ImslNT.30/CNL/Bin:/cygdrive/c/Utils/mks/mksnt:/cyg
| drive/f/
| Fame/76:/cygdrive/c/Utils/mks/MKSNT:/cygdrive/c/ghc/ghc-6.8.3/gcc-lib
|
| Thanks
|
| Neil
|
| ==============================================================================
| Please access the attached hyperlink for an important electronic communications disclaimer:
|
| http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
| ==============================================================================
|
| _______________________________________________
| Glasgow-haskell-users mailing list
| Glasgow-haskell-users at haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



More information about the Glasgow-haskell-users mailing list