
Hi. Trying to compile ghc-7.7.20130828 on OpenBSD I got an error: rts/HeapStackCheck.cmm:97:18: parse error on input `[' The code is following: 96 if (HpAlloc <= BLOCK_SIZE 97 && bdescr_link(CurrentNursery) != NULL) { which preprocesses to: if (HpAlloc <= (1<<12) && b0[CurrentNursery+15] != (0::bits64)) { This is the first occurrence of b0 in preprocessed file. I believe that it is due to undefined b0. Command that fails is: "inplace/bin/ghc-stage1" -static -H32m -O -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -package-name rts -dcmm-lint -i -irts -irts/dist/build -irts/dist/build/autogen -Irts/dist/build -Irts/dist/build/autogen -O2 -c rts/HeapStackCheck.cmm -o rts/dist/build/HeapStackCheck.o To preprocess do the following: cpp -O -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -Irts/dist/build -Irts/dist/build/autogen rts/HeapStackCheck.cmm | less Can you please find source of b0 in preprocessed file?

are you using clang or gcc? 2013 08 28 is from a while a go, please clone
GHC HEAD from today. If you still have problems, please file a ticket on
ghc track, and/or email ghc-devs
On Mon, Dec 9, 2013 at 5:07 PM, Alexander Pakhomov
Hi. Trying to compile ghc-7.7.20130828 on OpenBSD I got an error: rts/HeapStackCheck.cmm:97:18: parse error on input `[' The code is following: 96 if (HpAlloc <= BLOCK_SIZE 97 && bdescr_link(CurrentNursery) != NULL) { which preprocesses to: if (HpAlloc <= (1<<12) && b0[CurrentNursery+15] != (0::bits64)) { This is the first occurrence of b0 in preprocessed file. I believe that it is due to undefined b0. Command that fails is: "inplace/bin/ghc-stage1" -static -H32m -O -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -package-name rts -dcmm-lint -i -irts -irts/dist/build -irts/dist/build/autogen -Irts/dist/build -Irts/dist/build/autogen -O2 -c rts/HeapStackCheck.cmm -o rts/dist/build/HeapStackCheck.o To preprocess do the following: cpp -O -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -Irts/dist/build -Irts/dist/build/autogen rts/HeapStackCheck.cmm | less
Can you please find source of b0 in preprocessed file? _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

ummm, cmm in 7.6 and HEAD are different languages
please follow the directions here
https://ghc.haskell.org/trac/ghc/wiki/Building
On Mon, Dec 9, 2013 at 5:19 PM, Alexander Pakhomov
I have both. Think it's gcc. It is quite weird if that cpp (preprocessor) differs. AFAIK cmm files are compiled directly by ghc. The problem seem to be in cmm file, since ghc-7.6.3 fails with the same message.
10.12.2013, 02:15, "Carter Schonwald"
: are you using clang or gcc? 2013 08 28 is from a while a go, please clone GHC HEAD from today. If you still have problems, please file a ticket on ghc track, and/or email ghc-devs
On Mon, Dec 9, 2013 at 5:07 PM, Alexander Pakhomov
wrote: Hi. Trying to compile ghc-7.7.20130828 on OpenBSD I got an error: rts/HeapStackCheck.cmm:97:18: parse error on input `[' The code is following: 96 if (HpAlloc <= BLOCK_SIZE 97 && bdescr_link(CurrentNursery) != NULL) { which preprocesses to: if (HpAlloc <= (1<<12) && b0[CurrentNursery+15] != (0::bits64)) { This is the first occurrence of b0 in preprocessed file. I believe that it is due to undefined b0. Command that fails is: "inplace/bin/ghc-stage1" -static -H32m -O -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -package-name rts -dcmm-lint -i -irts -irts/dist/build -irts/dist/build/autogen -Irts/dist/build -Irts/dist/build/autogen -O2 -c rts/HeapStackCheck.cmm -o rts/dist/build/HeapStackCheck.o To preprocess do the following: cpp -O -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -Irts/dist/build -Irts/dist/build/autogen rts/HeapStackCheck.cmm | less
Can you please find source of b0 in preprocessed file? _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

yes, you need a ghc to build ghc.
please follow the build directions, and if you have a build failure with
today's GHC head (rather than the one from ~ 4 months ago), please report
the bug on GHC trac.
On Mon, Dec 9, 2013 at 5:43 PM, Alexander Pakhomov
10.12.2013, 02:39, "Carter Schonwald"
: ummm, cmm in 7.6 and HEAD are different languages
please follow the directions here https://ghc.haskell.org/trac/ghc/wiki/Building
https://ghc.haskell.org/trac/ghc/wiki/Building
Is it OK that ./configure && make runs system (/usr/local/bin/ghc) ghc?
On Mon, Dec 9, 2013 at 5:19 PM, Alexander Pakhomov
wrote: I have both. Think it's gcc. It is quite weird if that cpp (preprocessor) differs. AFAIK cmm files are compiled directly by ghc. The problem seem to be in cmm file, since ghc-7.6.3 fails with the same message.
OK. That was a try to figure out problem.
10.12.2013, 02:15, "Carter Schonwald"
: are you using clang or gcc? 2013 08 28 is from a while a go, please clone GHC HEAD from today. If you still have problems, please file a ticket on ghc track, and/or email ghc-devs
On Mon, Dec 9, 2013 at 5:07 PM, Alexander Pakhomov
wrote: Hi. Trying to compile ghc-7.7.20130828 on OpenBSD I got an error: rts/HeapStackCheck.cmm:97:18: parse error on input `[' The code is following: 96 if (HpAlloc <= BLOCK_SIZE 97 && bdescr_link(CurrentNursery) != NULL) { which preprocesses to: if (HpAlloc <= (1<<12) && b0[CurrentNursery+15] != (0::bits64)) { This is the first occurrence of b0 in preprocessed file. I believe that it is due to undefined b0. Command that fails is: "inplace/bin/ghc-stage1" -static -H32m -O -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -package-name rts -dcmm-lint -i -irts -irts/dist/build -irts/dist/build/autogen -Irts/dist/build -Irts/dist/build/autogen -O2 -c rts/HeapStackCheck.cmm -o rts/dist/build/HeapStackCheck.o To preprocess do the following: cpp -O -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -Irts/dist/build -Irts/dist/build/autogen rts/HeapStackCheck.cmm | less
Can you please find source of b0 in preprocessed file? _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (2)
-
Alexander Pakhomov
-
Carter Schonwald