Created
January 19, 2015 16:06
-
-
Save massysett/9c493db836705578eef5 to your computer and use it in GitHub Desktop.
Fixing Haddock with OS X
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I have had problems getting Haddock to function properly on OSX. | |
See for example: | |
https://github.com/haskell/cabal/issues/1790 | |
Apparently there is an issue with OS X because it uses Clang, and its | |
C preprocessor is doing something funny. Previously people reported fixes | |
by having Haddock pass "-optP-P" to the C compiler, but this has not worked | |
for me. | |
Confusing the whole thing is that on OS X /usr/bin/gcc is actually Clang. | |
Currently the easiest fix is just to make GHC use GCC rather than the | |
Apple-provided Clang. To do this, install gcc with Macports. Be sure | |
to use "port select" to actually activate GCC; otherwise the usual | |
names such as "/opt/local/bin/gcc" will not be present. | |
Then, follow the directions left by Carter Schonwald here: | |
http://stackoverflow.com/a/20352421/1017252 | |
but when editing the file, also change the value for "Haskell CPP command" to | |
"/opt/local/bin/gcc". | |
As of 2015-01-19 that fixed things. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment