Successful build of GHC HEAD on OS X 10.9 Mavericks

Luke Iannini lukexipd at
Fri Aug 9 09:21:58 CEST 2013

Hi guys,

Just wanted to report on the steps/hacks to a successful build of GHC HEAD
on OS X 10.9 thanks to help from Carter Schonwald and Austin Seipp.

1) I installed LLVM 3.4
brew install llvm --with-clang --HEAD

2) I used this
SPLIT_OBJS         = NO
INTEGER_LIBRARY    = integer-simple

3) Austin let me know I needed to pass "-x assembler-with-cpp" to clang
when in preprocessor mode, so I wrote a wrapper clang.hs, compiled it, put
it in my path, and changed /usr/local/lib/ghc-7.6.2/settings to use it. (it
also passes some flags Carter suggested, along with extra include flags,
which were necessary as of a couple weeks ago but might have been fixed in
the newer DPs)

4) I used
./configure --with-gcc=clang
(where clang is the wrapper script above)

5) "inplace/bin/mkdirhier" bootstrapping/. failed mysteriously, so I
manually created bootstrapping/ in the ghc build dir.

6) DTrace failed with an "unsupported compiler" error during compilation,
so I killed that section in
# if test -n "$DtraceCmd"; then
#   if test "x$TargetOS_CPP-$TargetVendor_CPP" = "xdarwin-apple" -o
"x$TargetOS_CPP-$TargetVendor_CPP" = "xsolaris2-unknown"; then
#     HaveDtrace=YES
#   fi
# fi

7) I got the error:
    Not in scope: '.'

    Not in scope: '.'

I hacked through this by manually find-and-replacing WORD_SIZE_IN_BITS with
64 in Type.hs.

make && make install then ran to completion and some simple test programs
seem to compile and run fine.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list