Building GHC head with clang on Mavericks
Kazu Yamamoto (=?iso-2022-jp?B?GyRCOzNLXE9CSScbKEI=?=)
kazu at iij.ad.jp
Tue Nov 19 01:09:38 UTC 2013
Hi,
I can finally build GHC head on Mavericks. I gave up on clang and
installed GHC 4.8 with MacPorts.
Then, I compiled alex and happy with GHC 7.6.3/GHC 4.8. With this, I
can build GHC head.
This step is a MUST. If alex and happy are complied GHC
7.6.3/clang-wrapper, I cannot build GHC head with GHC 7.6.3/GHC 4.8.
--Kazu
> Hi,
>
> Adding the "-v" option, GHC displays:
>
> ----
> *** Checking old interface for main:Lexer:
> *** Parser:
> *** Renamer/typechecker:
>
> <built-in>:2:2: Not in scope: `#'
> ----
>
> "-keep-tmp-files" keeps generated .hscpp file. The beginning of the
> generated .hscpp is:
>
> ----
> # 1 "utils/genprimopcode/dist/build/Lexer.hs"
> # 1 "<built-in>" 1
> # 1 "utils/genprimopcode/dist/build/Lexer.hs" 2
> {-# LANGUAGE CPP,MagicHash #-}
> {-# LINE 2 "utils/genprimopcode/./Lexer.x" #-}
> ----
>
> "<built-in>:2:2: Not in scope: `#'" in my previous message indicates
> this line 2.
>
> I don't know why Renamer/typechecker cannot handle this .hsccp file.
>
> --Kazu
>
>> Hi,
>>
>> As I wrote in the following blog article, I could build GHC head on
>> Mavericks 20 days ago.
>>
>> http://d.hatena.ne.jp/kazu-yamamoto/20131028/1382921924
>>
>> But I cannot build it recently:
>>
>> ----
>> "/usr/bin/ghc" -hisuf hi -osuf o -hcsuf hc -static -H32m -O -package-db libraries/bootstrapping.conf -i -iutils/genprimopcode/. -iutils/genprimopcode/dist/build -iutils/genprimopcode/dist/build/autogen -Iutils/genprimopcode/dist/build -Iutils/genprimopcode/dist/build/autogen -package array -no-user-package-db -rtsopts -odir utils/genprimopcode/dist/build -hidir utils/genprimopcode/dist/build -stubdir utils/genprimopcode/dist/build -c utils/genprimopcode/dist/build/Lexer.hs -o utils/genprimopcode/dist/build/Lexer.o
>>
>> <built-in>:2:2: Not in scope: `#'
>> make[1]: *** [utils/genprimopcode/dist/build/Lexer.o] Error 1
>> make[1]: *** Waiting for unfinished jobs....
>> shift/reduce conflicts: 46
>> reduce/reduce conflicts: 1
>> make: *** [all] Error 2
>> ----
>>
>> I seems to me that linemarkers generated by GCC(CPP) is not correctly
>> handled when alex is used. Note I can build GHC head on FreeBSD and
>> Linux.
>>
>> I'm using clang with clang-xcode5-wrapper.hs.
>>
>> Any suggestions?
>>
>> --Kazu
More information about the ghc-devs
mailing list