I'm trying to resolve the fact that the test suite fails on OS X using the Nix package manager. In looking into this, I came across this bit of code in Config.hs
cpp :: FilePath
cpp = case os of
"darwin" -> "gcc"
_ -> "cpp"
The failure with Nix is due to an assumption of gcc somewhere, while clang is the system C compiler and gcc is actually unavailable in minimal build environments (which Nix users are big fans of). I'm not sure if this instance in the code is the problem, but it is at least a lurking problem.
I'm happy to fix this, but I don't know what the best strategy is. Using the gcc executable on darwin is probably a reasonable option for most people, but I need a way to override this. We could do this with some CPP or a cabal flag, for example.
I expect gcc works on darwin due to the way flags are interpreted, while the cpp executable provided by clang may require different options. But, in any case, some more flexible control over what executable to invoke would help.
I'm trying to resolve the fact that the test suite fails on OS X using the Nix package manager. In looking into this, I came across this bit of code in
Config.hs
The failure with Nix is due to an assumption of
gcc
somewhere, whileclang
is the system C compiler andgcc
is actually unavailable in minimal build environments (which Nix users are big fans of). I'm not sure if this instance in the code is the problem, but it is at least a lurking problem.I'm happy to fix this, but I don't know what the best strategy is. Using the
gcc
executable on darwin is probably a reasonable option for most people, but I need a way to override this. We could do this with some CPP or a cabal flag, for example.I expect
gcc
works on darwin due to the way flags are interpreted, while thecpp
executable provided by clang may require different options. But, in any case, some more flexible control over what executable to invoke would help./cc @peti