Skip to content

GHC 8.0.2 fails to build on macOS 10.13/Xcode 9 - preprocessor error in ghc-pkg

Building GHC 8.0.2 on macOS 10.13 fails with the following error when building

utils/ghc-pkg/Main.hs:1269:40: error:
     error: editor placeholder in source file
               then termText (location db) <#> termText "\n    (no packages)\n"
                                           ^

I'm not very familiar with Haskell, but it looks to me like the C preprocessor is mistaking <#> for an invalid cpp directive instead of Haskell syntax.

This is using the Xcode 9 beta (and its associated CLT), which ships "Apple LLVM version 9.0.0 (clang-900.0.22.8)". The same version should be available in the Xcode 9 beta for 10.12, but I haven't tested.

The full build logs are available here: https://gist.github.com/anonymous/dc5f0c9d087f5d299f71393805c5d611

Trac metadata
Trac field Value
Version 8.0.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component ghc-pkg
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information