如果我启动一个新项目,添加hfsevents
到.cabal
文件中的依赖项列表,然后运行stack build
,我会收到一个错误(在 Mac OSX Yosemite 上):
-- While building package hfsevents-0.1.6 using:
/Users/Me/.stack/setup-exe-cache/setup-Simple-Cabal-1.22.4.0-x86_64-osx-ghc-7.10.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/ build --ghc-options -hpcdir .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/hpc/.hpc/ -ddump-hi -ddump-to-file
Process exited with code: ExitFailure 1
Logs have been written to: /Users/Me/Desktop/code/haskell/test/.stack-work/logs/hfsevents-0.1.6.log
Configuring hfsevents-0.1.6...
Building hfsevents-0.1.6...
Preprocessing library hfsevents-0.1.6...
[1 of 1] Compiling System.OSX.FSEvents ( System/OSX/FSEvents.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/System/OSX/FSEvents.o )
gcc: error: language objective-c not recognized
gcc: error: language objective-c not recognized
我已经按照调用的建议brew install gcc48 --with-all-languages
卸载了所有 Haskell 版本,只使用了ghc
inside stack
。Xcode 版本为 7.1.1。我还能尝试什么来解决这个问题?