Building GHC head with clang on Mavericks

Carter Schonwald carter.schonwald at gmail.com
Tue Nov 19 01:22:36 UTC 2013


Kazu. This is exactly the problem I linked to.  Could you try the proposed
patches to test if they allow builds to succeed with a wrapped clang on
your machine?

On Monday, November 18, 2013, Kazu Yamamoto wrote:

> 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
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org <javascript:;>
> http://www.haskell.org/mailman/listinfo/ghc-devs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20131118/743d167a/attachment.html>


More information about the ghc-devs mailing list