Successful build of GHC HEAD on OS X 10.9 Mavericks

Luke Iannini lukexipd at gmail.com
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 build.mk:
HADDOCK_DOCS       = NO
BUILD_DOCBOOK_HTML = NO
BUILD_DOCBOOK_PS   = NO
BUILD_DOCBOOK_PDF  = NO
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)
https://gist.github.com/lukexi/e11668ced04524564a8b

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 configure.ac
# 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:
libraries/integer-simple/GHC/Integer/Type.hs:836:50:
    Not in scope: '.'

libraries/integer-simple/GHC/Integer/Type.hs:847:67:
    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.

Cheers
Luke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20130809/1c73953c/attachment.htm>


More information about the ghc-devs mailing list