Failed to bootstrap 6.10.4 with itself on Windows (MinGW)

I've just installed 6.10.4 and try to rebuild a minimal version from source, but the rebuild process failed. It stops with message: Capability.c: error converting to pointer type on stage1. configure command: ./configure --prefix=/c/ghc CFLAGS=-O4 LDFLAGS=-s -- View this message in context: http://www.nabble.com/Failed-to-bootstrap-6.10.4-with-itself-on-Windows-%28M... Sent from the Haskell - Glasgow-haskell-users mailing list archive at Nabble.com.

On 22/07/2009 05:10, leledumbo wrote:
I've just installed 6.10.4 and try to rebuild a minimal version from source, but the rebuild process failed. It stops with message: Capability.c: error converting to pointer type
on stage1.
configure command: ./configure --prefix=/c/ghc CFLAGS=-O4 LDFLAGS=-s
I presume you're on Windows? MSYS or Cygwin? Which version of gcc? Cheers, Simon

I presume you're on Windows? MSYS or Cygwin? Which version of gcc?
MSYS 1.0.11 and MinGW GCC 4.4.0. -- View this message in context: http://www.nabble.com/Failed-to-bootstrap-6.10.4-with-itself-on-Windows-%28M... Sent from the Haskell - Glasgow-haskell-users mailing list archive at Nabble.com.

I presume you're on Windows? MSYS or Cygwin? Which version of gcc?
MSYS 1.0.11 and MinGW GCC 4.4.0 (it's installed and on PATH it's put before ghc, but I don't know whether ghc will use this one or the one bundled with it). -- View this message in context: http://www.nabble.com/Failed-to-bootstrap-6.10.4-with-itself-on-Windows-%28M... Sent from the Haskell - Glasgow-haskell-users mailing list archive at Nabble.com.

On 23/07/2009 08:11, leledumbo wrote:
I presume you're on Windows? MSYS or Cygwin? Which version of gcc?
MSYS 1.0.11 and MinGW GCC 4.4.0 (it's installed and on PATH it's put before ghc, but I don't know whether ghc will use this one or the one bundled with it).
We haven't tested with gcc 4.4.0 yet. I've just created a ticket: http://hackage.haskell.org/trac/ghc/ticket/3390 FYI, if you want your GHC build to work on Windows, it is best to use the same tools that we do: http://hackage.haskell.org/trac/ghc/wiki/Building/Preparation/Windows Cheers, Simon

OK, I've tried ghc's supplied gcc, too (not so easy, I need to set some environment variables first) and here are the results: With ghc's gcc: D:/Sources/ghc/ghc-6.10.4/ghc/stage1-inplace/ghc.exe -package rts-1.0 -optc-O2 - odir dist/build -c cbits/longlong.c -o dist/build/cbits/longlong.o (echo dist/build/cbits/longlong.o `find dist/build -name "*_stub.o" -print`; fin d dist/build/GHC/Bool_split dist/build/GHC/Generics_split dist/build/GHC/Orderin g_split dist/build/GHC/PrimopWrappers_split dist/build/GHC/IntWord32_split dist/ build/GHC/IntWord64_split dist/build/GHC/Tuple_split dist/build/GHC/Types_split dist/build/GHC/Unit_split -name '*.o' -print) | xargs c:/ghc/bin/ar.exe q dist/ build/libHSghc-prim-0.1.0.0.a xargs: c:/ghc/bin/ar.exe: Bad file number make[2]: *** [dist/build/libHSghc-prim-0.1.0.0.a] Error 126 make[2]: Leaving directory `/d/Sources/ghc/ghc-6.10.4/libraries/ghc-prim' make[1]: *** [make.library.ghc-prim] Error 2 make[1]: Leaving directory `/d/Sources/ghc/ghc-6.10.4/libraries' make: *** [stage1] Error 2 With gcc 4.4.0: d:/Sources/ghc/ghc-6.10.4/ghc/stage1-inplace/ghc -optc-O -optc-Wall -optc-W -opt c-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc -Winline -optc-Waggregate-return -optc-I../includes -optc-I. -optc-Iparallel -op tc-Ism -optc-DCOMPILING_RTS -optc-fomit-frame-pointer -optc-I../gmp/gmpbuild -op tc-I../libffi/build/include -optc-fno-strict-aliasing -fvia-C -static -I../gmp /gmpbuild -I../libffi/build/include -I. -dcmm-lint -hisuf thr_hi -hcsuf thr_hc -osuf thr_o -optc-DTHREADED_RTS -c Capability.c -o Capability.thr_o Capability.c: In function 'giveCapabilityToTask': Capability.c:257:0: error: cannot convert to a pointer type make[2]: *** [Capability.thr_o] Error 1 make[1]: *** [all] Error 1 make[1]: Leaving directory `/d/Sources/ghc/ghc-6.10.4/rts' make: *** [stage1] Error 2
FYI, if you want your GHC build to work on Windows, it is best to use the same tools that we do
It's the same as using ghc's supplied gcc, right (other requirements from the page already fulfilled)? -- View this message in context: http://www.nabble.com/Failed-to-bootstrap-6.10.4-with-itself-on-Windows-%28M... Sent from the Haskell - Glasgow-haskell-users mailing list archive at Nabble.com.

On 24/07/2009 05:17, leledumbo wrote:
OK, I've tried ghc's supplied gcc, too (not so easy, I need to set some environment variables first) and here are the results:
With ghc's gcc:
D:/Sources/ghc/ghc-6.10.4/ghc/stage1-inplace/ghc.exe -package rts-1.0 -optc-O2 - odir dist/build -c cbits/longlong.c -o dist/build/cbits/longlong.o (echo dist/build/cbits/longlong.o `find dist/build -name "*_stub.o" -print`; fin d dist/build/GHC/Bool_split dist/build/GHC/Generics_split dist/build/GHC/Orderin g_split dist/build/GHC/PrimopWrappers_split dist/build/GHC/IntWord32_split dist/ build/GHC/IntWord64_split dist/build/GHC/Tuple_split dist/build/GHC/Types_split dist/build/GHC/Unit_split -name '*.o' -print) | xargs c:/ghc/bin/ar.exe q dist/ build/libHSghc-prim-0.1.0.0.a xargs: c:/ghc/bin/ar.exe: Bad file number
See this ticket: http://hackage.haskell.org/trac/ghc/ticket/3201 work-aroundable by adding SplitObjs=NO to mk/build.mk
FYI, if you want your GHC build to work on Windows, it is best to use the same tools that we do
It's the same as using ghc's supplied gcc, right (other requirements from the page already fulfilled)?
I think so, yes. Although, as you noticed, using GHC's built-in gcc is not terribly convenient. It will be much easier in 6.12.1, as we've made the layout of the bundled gcc files match the standard MinGW layout. Cheers, Simon
participants (2)
-
leledumbo
-
Simon Marlow