首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在Mac小牛上安装Fay

无法在Mac小牛上安装Fay
EN

Stack Overflow用户
提问于 2013-12-26 12:55:09
回答 3查看 510关注 0票数 3

我在试着cabal install fay fay-base。但是它失败了,下面是日志:

代码语言:javascript
复制
$ cabal install fay fay-base
Resolving dependencies...
Configuring pretty-show-1.6.3...
Building pretty-show-1.6.3...
Preprocessing library pretty-show-1.6.3...
[1 of 6] Compiling Paths_pretty_show ( dist/build/autogen/Paths_pretty_show.hs, dist/build/Paths_pretty_show.o )
[2 of 6] Compiling Text.Show.Value  ( Text/Show/Value.hs, dist/build/Text/Show/Value.o )
[3 of 6] Compiling Text.Show.PrettyVal ( Text/Show/PrettyVal.hs, dist/build/Text/Show/PrettyVal.o )
[4 of 6] Compiling Text.Show.Html   ( Text/Show/Html.hs, dist/build/Text/Show/Html.o )

Text/Show/Html.hs:106:1: Warning: Defined but not used: `tallTuple'
[5 of 6] Compiling Text.Show.Parser ( dist/build/Text/Show/Parser.hs, dist/build/Text/Show/Parser.o )
[6 of 6] Compiling Text.Show.Pretty ( Text/Show/Pretty.hs, dist/build/Text/Show/Pretty.o )
[1 of 6] Compiling Paths_pretty_show ( dist/build/autogen/Paths_pretty_show.hs, dist/build/Paths_pretty_show.p_o )
clang: warning: argument unused during compilation: '-nodefaultlibs'
[2 of 6] Compiling Text.Show.Value  ( Text/Show/Value.hs, dist/build/Text/Show/Value.p_o )
clang: warning: argument unused during compilation: '-nodefaultlibs'
[3 of 6] Compiling Text.Show.PrettyVal ( Text/Show/PrettyVal.hs, dist/build/Text/Show/PrettyVal.p_o )
clang: warning: argument unused during compilation: '-nodefaultlibs'
[4 of 6] Compiling Text.Show.Html   ( Text/Show/Html.hs, dist/build/Text/Show/Html.p_o )

Text/Show/Html.hs:106:1: Warning: Defined but not used: `tallTuple'
clang: warning: argument unused during compilation: '-nodefaultlibs'
[5 of 6] Compiling Text.Show.Parser ( dist/build/Text/Show/Parser.hs, dist/build/Text/Show/Parser.p_o )
clang: warning: argument unused during compilation: '-nodefaultlibs'
[6 of 6] Compiling Text.Show.Pretty ( Text/Show/Pretty.hs, dist/build/Text/Show/Pretty.p_o )
clang: warning: argument unused during compilation: '-nodefaultlibs'
In-place registering pretty-show-1.6.3...
Preprocessing executable 'ppsh' for pretty-show-1.6.3...
[1 of 1] Compiling Main             ( bin/ppsh.hs, dist/build/ppsh/ppsh-tmp/Main.o )
Linking dist/build/ppsh/ppsh ...
Running Haddock for pretty-show-1.6.3...
Preprocessing library pretty-show-1.6.3...
Haddock coverage:
   0% (  0 /  8) in 'Paths_pretty_show'
 100% (  3 /  3) in 'Text.Show.Value'
  50% (  1 /  2) in 'Text.Show.PrettyVal'

dist/build/tmp-6355/Text/Show/Html.hs:106:1: Warning:
    Defined but not used: `tallTuple'
  71% (  5 /  7) in 'Text.Show.Html'
   0% (  0 /  2) in 'Text.Show.Parser'
  81% ( 21 / 26) in 'Text.Show.Pretty'
Documentation created: dist/doc/html/pretty-show/index.html
Preprocessing executable 'ppsh' for pretty-show-1.6.3...
Installing library in
/Users/arthurfayzrakhmanov/Library/Haskell/ghc-7.6.3/lib/pretty-show-1.6.3/lib
Installing executable(s) in
/Users/arthurfayzrakhmanov/Library/Haskell/ghc-7.6.3/lib/pretty-show-1.6.3/bin
Warning: The directory
/Users/arthurfayzrakhmanov/Library/Haskell/ghc-7.6.3/lib/pretty-show-1.6.3/bin
is not in the system search path.
Registering pretty-show-1.6.3...
Installed pretty-show-1.6.3
Configuring type-eq-0.4...
Building type-eq-0.4...
Preprocessing library type-eq-0.4...
[1 of 7] Compiling Type.Eq.Higher[boot] ( Type/Eq/Higher.hs-boot, dist/build/Type/Eq/Higher.o-boot )
[2 of 7] Compiling Type.Eq[boot]    ( Type/Eq.hs-boot, dist/build/Type/Eq.o-boot )
[3 of 7] Compiling Type.Eq.Unsafe   ( Type/Eq/Unsafe.hs, dist/build/Type/Eq/Unsafe.o )
[4 of 7] Compiling Type.Eq.Higher.Unsafe ( Type/Eq/Higher/Unsafe.hs, dist/build/Type/Eq/Higher/Unsafe.o )
[5 of 7] Compiling Type.Eq          ( Type/Eq.hs, dist/build/Type/Eq.o )
[6 of 7] Compiling Type.Eq.Higher   ( Type/Eq/Higher.hs, dist/build/Type/Eq/Higher.o )

Type/Eq/Higher.hs:72:86:
    Illegal literal in type (use -XDataKinds to enable): 1
Failed to install type-eq-0.4
Updating documentation index
/Users/arthurfayzrakhmanov/Library/Haskell/doc/index.html
cabal: Error: some packages failed to install:
fay-0.18.1.3 depends on type-eq-0.4 which failed to install.
fay-base-0.18.0.0 depends on type-eq-0.4 which failed to install.
haskell-names-0.3.2.4 depends on type-eq-0.4 which failed to install.
type-eq-0.4 failed during the building phase. The exception was:
ExitFailure 1

请帮帮忙。

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2013-12-27 13:45:40

最后,我是这样做的:

  • sudo /Library/Haskell/bin/uninstall-hs (https://stackoverflow.com/a/6996284/1749901)卸载整个平台
  • 然后在本教程之后,首先通过brew install apple-gcc42安装apple-gcc42 42。
  • 然后链接到brew link apple-gcc42
  • 通过brew install haskell-platform安装平台
  • cabal update
  • cabal install cabal-install
  • 添加到PATH $HOME/.cabal/bin中(而不是通过这里通过PKG安装程序安装平台的情况下的$HOME/Library/Haskell/bin,这显然是因为brew的配置略有不同)。
  • source ~/.bash_profile,然后重新启动终端,因此which cabal指向<HOME>/.cabal/bin/cabalcabal --version显示1.18 (而不是1.16)。
  • cabal install happy。此时,我再次重新启动终端,因为which happy指向本地更新(1.19.2)版本,但happy --version显示了1.16.x。
  • cabal install type-eq -- 第一次继承了
  • 最后,cabal install fay fay-base -成功了! 安装fay-0.18.1.3安装fay-基本-0.18.0.0

呼!谢谢大家!

票数 5
EN

Stack Overflow用户

发布于 2013-12-26 15:24:49

这是关于小牛的一个已知的预处理问题。寻找这里的解决方案。

这看起来像是预处理器问题的原因是:

  1. 错误消息中提到的行包含CPP宏。
  2. 关于小牛队,CPP有一个已知的问题
  3. 这个包在Linux上使用GHC 7.6.3 (看起来也像您正在使用的版本)编译得很好
票数 1
EN

Stack Overflow用户

发布于 2014-05-19 06:33:50

您所需要做的就是将安装目录添加到您的路径!只需将此添加到您的.bash_profile:export PATH="$HOME/Library/Haskell/bin:$PATH“

导出PATH="$HOME/Library/Haskell/bin:$PATH“

我正要卸载整个平台,但后来我发现这个在小牛身上很管用。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20785260

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档