我正试图在mac os上安装GhC 7.8.3,这让我抓狂。
我该怎么做?
我已经从here下载了二进制安装。首先,我需要做sudo make install而不是install。这正常吗?
然后停止,并显示以下错误消息:
/usr/bin/gcc -E -m64 -undef -traditional -Wno-invalid-pp-token -Wno-unicode -
Wno-trigraphs -P -DINSTALLING -DLIB_DIR='"/usr/local/lib/ghc-7.8.3"' -DINCLUDE
_DIR='"/usr/local/lib/ghc-7.8.3/include"' -DPAPI_INCLUDE_DIR="" -DPAPI_LIB_DIR
="" -DFFI_INCLUDE_DIR= -DFFI_LIB_DIR= '-DFFI_LIB="Cffi"' -x c -Iincludes -Iinc
ludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstant
s/header rts/package.conf.in -o rts/dist/package.conf.install.raw
cc1: error: unrecognized command line option "-Wno-invalid-pp-token"
cc1: error: unrecognized command line option "-Wno-unicode"
make[1]: *** [rts/dist/package.conf.install] Error 1我试着下载了ghc-clang-wrapper。但这不会改变任何事情。它抱怨haskell平台没有安装,所以我手动更改了设置文件,但仍然没有结果。
此外,这可能是一个愚蠢的问题,如果它是一个二进制包,为什么要试图编译东西?
发布于 2014-12-05 04:05:01
你遇到的问题是https://ghc.haskell.org/trac/ghc/ticket/9257
一个似乎对我有效的解决办法是编辑mk/config.mk,从RAWCPP_FLAGS中删除两个令人不快的标志。
更新:实际上,这看起来可能还不够努力,因为这导致我的GHC后来失败了。更完整的解决方法是创建一个名为gcc的文件,其中包含以下内容:
#!/usr/bin/python
import sys
import os
os.execv("/usr/bin/gcc", ["/usr/bin/gcc"] + [i for i in sys.argv[1:] if i != "-Wno-invalid-pp-token" and i != "-Wno-unicode"])如果您的GCC处于不寻常的位置,请替换这两个/usr/bin/gcc实例。Chmod它是可执行的。现在,在配置bindist时,传递配置标志--with-gcc=/path/to/your/gcc。这将去掉警告标志并使其正常工作。
https://stackoverflow.com/questions/24979823
复制相似问题