GHC 8.8.1 Fails to Build on macOS with Native clang 11.0.0

Steven Smith steve.t.smith at gmail.com
Mon Dec 23 21:48:46 UTC 2019


I’m trying to update the MacPorts ghc port. The build isn’t getting the TAG_MASK #define for some reason, which breaks the build. The previous release ghc 8.6.5 builds successfully.

I’m following the simple build instructions here: https://github.com/ghc/ghc#building--installing <https://github.com/ghc/ghc#building--installing>

# Use prebuilt bootstrap ghc binary
export GHC='/opt/local/var/macports/build/_opt_local_ports_lang_ghc/ghc/work/bootstrap/bin/ghc’
./boot
./configure
make -j7

Error:

> Creating compiler/stage2/build/Config.hs ... 
> 
> In file included from compiler/parser/cutils.c:6:0: error: 
> 
> In file included from includes/Rts.h:191:0: error: 
> 
> includes/rts/storage/ClosureMacros.h:211:25: error:
>      error: use of undeclared identifier 'TAG_MASK'
>         return (StgWord)p & TAG_MASK;
>                             ^
>     |
> 211 |     return (StgWord)p & TAG_MASK;
>     |                         ^
> 
…
> make[1]: *** [compiler/stage1/build/cbits/genSym.o] Error 1
> <<ghc: 5147183728 bytes, 749 GCs, 27001343/62810440 avg/max bytes residency (18 samples), 150M in use, 0.001 INIT (0.004 elapsed), 2.217 MUT (2.637 elapsed), 1.677 GC (1.738 elapsed) :ghc>>
> make: *** [all] Error 2


I’m using the macOS native clang:

$ which clang
/usr/bin/clang
$ clang --version
Apple clang version 11.0.0 (clang-1100.0.33.16)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/glasgow-haskell-users/attachments/20191223/fc36966c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3898 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/glasgow-haskell-users/attachments/20191223/fc36966c/attachment.bin>


More information about the Glasgow-haskell-users mailing list