堆栈-GCC ISO C99编译器支持缺失

时间:2018-07-29 11:16:40

标签: haskell gcc ghc haskell-stack

将旧计算机的内容移动到新计算机后,我尝试继续使用Stack处理haskell项目,但是堆栈构建命令不再起作用。最初的问题是用户目录中有空格,我已对其进行了修复。现在的问题似乎是gcc编译器声称不支持ISO C99。我尝试通过按照建议的方式删除堆栈目录并重新安装来进行卸载,但是会发生相同的错误。

这就是我得到的:

$ stack build --verbose

.......................
@(src/Stack/Setup.hs:1097:54)
2018-07-29 18:51:14.540986: [debug] GHC build  : x86_64-apple-darwin
@(src/Stack/Setup.hs:1097:54)
2018-07-29 18:51:14.541096: [debug] GHC host   : x86_64-apple-darwin
@(src/Stack/Setup.hs:1097:54)
2018-07-29 18:51:14.541205: [debug] GHC target : x86_64-apple-darwin
@(src/Stack/Setup.hs:1097:54)
2018-07-29 18:51:14.541270: [debug] LLVM target: x86_64-apple-darwin
@(src/Stack/Setup.hs:1097:54)
2018-07-29 18:51:14.545717: [debug] checking for path to top of build tree... /Users/derekmaffett/.stack/programs/x86_64-osx/ghc-8.4.3.temp/ghc-8.4.3
@(src/Stack/Setup.hs:1097:54)
2018-07-29 18:51:14.546706: [debug] checking for perl... /usr/bin/perl
@(src/Stack/Setup.hs:1097:54)
2018-07-29 18:51:14.559229: [debug] checking for a BSD-compatible install... /usr/local/bin/ginstall -c
@(src/Stack/Setup.hs:1097:54)
2018-07-29 18:51:14.560560: [debug] checking for gfind... no
@(src/Stack/Setup.hs:1097:54)
2018-07-29 18:51:14.561585: [debug] checking for find... /usr/bin/find
@(src/Stack/Setup.hs:1097:54)
2018-07-29 18:51:14.569598: [debug] checking whether ln -s works... yes
@(src/Stack/Setup.hs:1097:54)
2018-07-29 18:51:14.571630: [debug] checking for gsed... /usr/local/bin/gsed
@(src/Stack/Setup.hs:1097:54)
2018-07-29 18:51:14.663057: [debug] checking XCode version... 9.4.1
@(src/Stack/Setup.hs:1097:54)
2018-07-29 18:51:14.669808: [debug] configure: XCode version component 1: 9
@(src/Stack/Setup.hs:1097:54)
2018-07-29 18:51:14.669935: [debug] configure: XCode version component 2: 4
@(src/Stack/Setup.hs:1097:54)
2018-07-29 18:51:14.671086: [debug] checking for gcc... gcc
@(src/Stack/Setup.hs:1097:54)
2018-07-29 18:51:14.836599: [debug] checking whether the C compiler works... yes
@(src/Stack/Setup.hs:1097:54)
2018-07-29 18:51:14.836730: [debug] checking for C compiler default output file name... a.out
@(src/Stack/Setup.hs:1097:54)
2018-07-29 18:51:14.879977: [debug] checking for suffix of executables...
@(src/Stack/Setup.hs:1097:54)
2018-07-29 18:51:14.940808: [debug] checking whether we are cross compiling... no
@(src/Stack/Setup.hs:1097:54)
2018-07-29 18:51:14.980289: [debug] checking for suffix of object files... o
@(src/Stack/Setup.hs:1097:54)
2018-07-29 18:51:15.015762: [debug] checking whether we are using the GNU C compiler... yes
@(src/Stack/Setup.hs:1097:54)
2018-07-29 18:51:15.053195: [debug] checking whether gcc accepts -g... yes
@(src/Stack/Setup.hs:1097:54)
2018-07-29 18:51:15.112028: [debug] checking for gcc option to accept ISO C89... none needed
@(src/Stack/Setup.hs:1097:54)
2018-07-29 18:51:15.181570: [debug] checking how to run the C preprocessor... gcc -E
@(src/Stack/Setup.hs:1097:54)
2018-07-29 18:51:15.785414: [debug] checking for gcc option to accept ISO C99... unsupported
@(src/Stack/Setup.hs:1097:54)
2018-07-29 18:51:15.785615: [debug] configure: error: C99-compatible compiler needed
@(src/Stack/Setup.hs:1097:54)
Configuring GHC ...
Received ExitFailure 1 when running
Raw command: /Users/docr/.stack/programs/x86_64-osx/ghc-8.2.2.temp/ghc-8.2.2/configure --prefix=/Users/docr/.stack/programs/x86_64-osx/ghc-8.2.2/
Run from: /Users/docr/.stack/programs/x86_64-osx/ghc-8.2.2.temp/ghc-8.2.2/

堆栈版本

$ stack --version
Version 1.7.1, Git revision 681c800873816c022739ca7ed14755e85a579565 (5807 commits) x86_64 hpack-0.28.2

$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.1.0 (clang-902.0.39.2)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

我按照建议的以下方法安装了Stack。

curl -sSL https://get.haskellstack.org/ | sh

0 个答案:

没有答案