Error building GHC 6.8.3 with MinGW 4.2.1-2 dw2

leledumbo leledumbo_cool at yahoo.co.id
Mon Jun 30 03:35:14 EDT 2008


I try to build a lite version (e.g. no extra libs) of GHC 6.8.3, I'm using
MinGW GCC 4.2.1-2 with dwarf-2 exception and pre-compiled GHC 6.8.3. Here's
my configure:
sh configure --prefix=/c/ghc-new CFLAGS='-s -O2' LDFLAGS='-s -O2'
--with-gmp-includes=/usr/local/gmp/include
--with-gmp-libraries=/usr/local/gmp/lib
And my make:
make bootstrap3

But in the middle, I got this:
Preprocessing library hpc-0.5.0.1...
In file included from D:/Sources/ghc/ghc-6.8.3-lite/includes/Stg.h:183,
                 from D:/Sources/ghc/ghc-6.8.3-lite/includes/Rts.h:19,
                 from Trace\Hpc\Reflect.hsc:18:
D:/Sources/ghc/ghc-6.8.3-lite/includes/Regs.h:28:17: error: gmp.h: No such
file
or directory
In file included from D:/Sources/ghc/ghc-6.8.3-lite/includes/Stg.h:183,
                 from D:/Sources/ghc/ghc-6.8.3-lite/includes/Rts.h:19,
                 from Trace\Hpc\Reflect.hsc:18:
D:/Sources/ghc/ghc-6.8.3-lite/includes/Regs.h:121: error: expected
specifier-qua
lifier-list before 'MP_INT'
In file included from Trace\Hpc\Reflect.hsc:18:
D:/Sources/ghc/ghc-6.8.3-lite/includes/Rts.h:203: error: expected ')' before
'*'
 token
D:/Sources/ghc/ghc-6.8.3-lite/includes/Rts.h:204: error: expected ')' before
'*'
 token
compiling dist\build\Trace\Hpc\Reflect_hsc_make.c failed
command was: gcc -c -mno-cygwin -D__GLASGOW_HASKELL__=608
-ID:/Sources/ghc/ghc-6
.8.3-lite/includes -ID:/Sources/ghc/ghc-6.8.3-lite/gmp/gmpbuild
-I/usr/local/gmp
/include -D__GLASGOW_HASKELL__=608 dist\build\Trace\Hpc\Reflect_hsc_make.c
-o di
st\build\Trace\Hpc\Reflect_hsc_make.o
make[2]: Entering directory `/d/Sources/ghc/ghc-6.8.3-lite/libraries/hpc'
make[2]: *** No targets specified and no makefile found.  Stop.
make[2]: Leaving directory `/d/Sources/ghc/ghc-6.8.3-lite/libraries/hpc'
make[1]: *** [make.library.hpc] Error 2
make[1]: Leaving directory `/d/Sources/ghc/ghc-6.8.3-lite/libraries'
make: *** [stage1] Error 2

As you can see above, I have gmp installed under /usr/local/gmp. However,
this is not the gmp that comes with GHC (version 4.2.1, mine is 4.2.2).

PS:
I must comment these two lines in IOManager.h:
12: extern void* GetCurrentFiber ( void );
13: extern void* GetFiberData ( void );
or an error about "static declaration follows non-static declaration" will
come up.
-- 
View this message in context: http://www.nabble.com/Error-building-GHC-6.8.3-with-MinGW-4.2.1-2-dw2-tp18190163p18190163.html
Sent from the Haskell - Glasgow-haskell-users mailing list archive at Nabble.com.



More information about the Glasgow-haskell-users mailing list