我对 Haskell 平台非常陌生,遇到的麻烦比我希望的要多得多。
我想我越来越近了,因为一切都很顺利,直到 cabal 尝试安装shakespeare-css
和派生。
我正在使用Ubuntu 11.10
withghc-7.4.2
和 cabal-install1.16.0.2
当我输入命令
~/.cabal/bin$ ./cabal -v install derive
我得到以下输出
Reading available packages...
Choosing modular solver.
Resolving dependencies...
Ready to install derive-2.5.11
Waiting for install task to finish...
Extracting
/home/tamarin/.cabal/packages/hackage.haskell.org/derive/2.5.11/derive-2.5.11.tar.gz
to /tmp/derive-2.5.11-29920...
Updating derive.cabal with the latest revision from the index.
Configuring derive-2.5.11...
Dependency base ==4.5.1.0: using base-4.5.1.0
Dependency bytestring ==0.9.2.1: using bytestring-0.9.2.1
Dependency containers ==0.4.2.1: using containers-0.4.2.1
Dependency directory ==1.1.0.2: using directory-1.1.0.2
Dependency filepath ==1.3.0.0: using filepath-1.3.0.0
Dependency haskell-src-exts ==1.13.5: using haskell-src-exts-1.13.5
Dependency pretty ==1.1.1.0: using pretty-1.1.1.0
Dependency process ==1.1.0.1: using process-1.1.0.1
Dependency syb ==0.3.7: using syb-0.3.7
Dependency template-haskell ==2.8.0.0: using template-haskell-2.8.0.0
Dependency transformers ==0.2.2.0: using transformers-0.2.2.0
Dependency uniplate ==1.6.10: using uniplate-1.6.10
Using Cabal-1.16.0.3 compiled by ghc-7.0
Using compiler: ghc-7.4.2
Using install prefix: /home/tamarin/.cabal
Binaries installed in: /home/tamarin/.cabal/bin
Libraries installed in: /home/tamarin/.cabal/lib/derive-2.5.11/ghc-7.4.2
Private binaries installed in: /home/tamarin/.cabal/libexec
Data files installed in: /home/tamarin/.cabal/share/derive-2.5.11
Documentation installed in: /home/tamarin/.cabal/share/doc/derive-2.5.11
Using alex version 2.3.5 found on system at: /usr/bin/alex
Using ar found on system at: /usr/bin/ar
No c2hs found
Using cpphs version 1.16 found on system at: /home/tamarin/.cabal/bin/cpphs
No ffihugs found
Using gcc version 4.6.1 found on system at: /usr/bin/gcc
Using ghc version 7.4.2 found on system at: /usr/local/bin/ghc
Using ghc-pkg version 7.4.2 found on system at: /usr/local/bin/ghc-pkg
No greencard found
Using haddock version 2.11.0 found on system at: /usr/local/bin/haddock
Using happy version 1.18.6 found on system at: /usr/bin/happy
No hmake found
Using hpc version 0.6 found on system at: /usr/local/bin/hpc
Using hsc2hs version 0.67 found on system at: /usr/local/bin/hsc2hs
No hscolour found
No hugs found
No jhc found
Using ld found on system at: /usr/bin/ld
No lhc found
No lhc-pkg found
No nhc98 found
Using pkg-config version 0.26 found on system at: /usr/bin/pkg-config
Using ranlib found on system at: /usr/bin/ranlib
Using strip found on system at: /usr/bin/strip
Using tar found on system at: /bin/tar
No uhc found
creating dist/build
creating dist/build/autogen
Building derive-2.5.11...
Preprocessing library derive-2.5.11...
Building library...
creating dist/build
/usr/local/bin/ghc --make -fbuilding-cabal-package -O -odir dist/build -hidir dist/build -stubdir dist/build -i -idist/build -i. -idist/build/autogen -Idist/build/autogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -package-name derive-2.5.11 -hide-all-packages -package-conf dist/package.conf.inplace -package-id base-4.5.1.0-8a237511fef48b8f180babb0282b28e3 -package-id bytestring-0.9.2.1-ac1c20630117630ba32abcac9cdbbce8 -package-id containers-0.4.2.1-59c8844d535e4a3bdd1569d60336e3b7 -package-id directory-1.1.0.2-ef4eca075618605e644c6184b111f96f -package-id filepath-1.3.0.0-954c43b4f109cbd4121f1231c14d5cff -package-id haskell-src-exts-1.13.5-3e91c3c2a4a723d046d79dc6b2b3a8bd -package-id pretty-1.1.1.0-867dcdeb02592f3d2a707618561c7b86 -package-id process-1.1.0.1-bd6d91995b2ae2680669549cb63f15b4 -package-id syb-0.3.7-a269c050536d4890f37a20513844e800 -package-id template-haskell-2.8.0.0-785b225a803e6279a067560929c36633 -package-id transformers-0.2.2.0-7f9cf1f6994d36648f58249fe35d1cf2 -package-id uniplate-1.6.10-e06ac94679c647f08eee64b44109aecc -XHaskell98 Data.DeriveMain Data.DeriveTH Data.DeriveDSL Data.Derive.All Data.Derive.DSL.Apply Data.Derive.DSL.Derive Data.Derive.DSL.DSL Data.Derive.DSL.HSE Data.Derive.DSL.SYB Data.Derive.Instance.Arities Data.Derive.Class.Arities Data.Derive.Class.Default Language.Haskell Language.Haskell.Convert Language.Haskell.TH.All Language.Haskell.TH.Compat Language.Haskell.TH.Data Language.Haskell.TH.ExpandSynonym Language.Haskell.TH.FixedPpr Language.Haskell.TH.Helper Language.Haskell.TH.Peephole Data.Derive.Arbitrary Data.Derive.ArbitraryOld Data.Derive.Arities Data.Derive.Binary Data.Derive.BinaryDefer Data.Derive.Bounded Data.Derive.Data Data.Derive.DataAbstract Data.Derive.Default Data.Derive.Enum Data.Derive.EnumCyclic Data.Derive.Eq Data.Derive.Fold Data.Derive.Foldable Data.Derive.From Data.Derive.Functor Data.Derive.Has Data.Derive.Is Data.Derive.JSON Data.Derive.LazySet Data.Derive.Lens Data.Derive.Monoid Data.Derive.NFData Data.Derive.Ord Data.Derive.Read Data.Derive.Ref Data.Derive.Serial Data.Derive.Serialize Data.Derive.Set Data.Derive.Show Data.Derive.Traversable Data.Derive.Typeable Data.Derive.UniplateDirect Data.Derive.UniplateTypeable Data.Derive.Update Data.Derive.Internal.Derivation Data.Derive.Internal.Instance Data.Derive.Internal.Traversal Derive.Main Derive.Derivation Derive.Flags Derive.Generate Derive.Test Derive.Utils
[ 1 of 65] Compiling Language.Haskell.TH.Compat ( Language/Haskell/TH/Compat.hs, dist/build/Language/Haskell/TH/Compat.o )
[ 2 of 65] Compiling Language.Haskell.TH.Data ( Language/Haskell/TH/Data.hs, dist/build/Language/Haskell/TH/Data.o )
[ 3 of 65] Compiling Language.Haskell.TH.ExpandSynonym ( Language/Haskell/TH/ExpandSynonym.hs, dist/build/Language/Haskell/TH/ExpandSynonym.o )
[ 4 of 65] Compiling Language.Haskell.TH.FixedPpr ( Language/Haskell/TH/FixedPpr.hs, dist/build/Language/Haskell/TH/FixedPpr.o )
Language/Haskell/TH/FixedPpr.hs:404:9:
Not in scope: data constructor `StarK'
Perhaps you meant `StarT' (imported from Language.Haskell.TH.Syntax)
Language/Haskell/TH/FixedPpr.hs:405:10:
Not in scope: data constructor `ArrowK'
Perhaps you meant `ArrowT' (imported from Language.Haskell.TH.Syntax)
Failed to install derive-2.5.11
World file is already up to date.
cabal: Error: some packages failed to install:
derive-2.5.11 failed during the building phase. The exception was:
ExitFailure 1
在我看来,这似乎是一个奇怪的编译错误
至于安装shakespeare-css
./cabal -v install shakespeare-css
我明白了
Reading available packages...
Choosing modular solver.
Resolving dependencies...
Ready to install shakespeare-css-1.0.2
Waiting for install task to finish...
Extracting
/home/tamarin/.cabal/packages/hackage.haskell.org/shakespeare-css/1.0.2/shakespeare-css-1.0.2.tar.gz
to /tmp/shakespeare-css-1.0.2-2963...
Updating shakespeare-css.cabal with the latest revision from the index.
Configuring shakespeare-css-1.0.2...
Dependency base ==4.5.1.0: using base-4.5.1.0
Dependency parsec ==3.1.3: using parsec-3.1.3
Dependency process ==1.1.0.1: using process-1.1.0.1
Dependency shakespeare ==1.0.3: using shakespeare-1.0.3
Dependency template-haskell ==2.8.0.0: using template-haskell-2.8.0.0
Dependency text ==0.11.2.3: using text-0.11.2.3
Dependency transformers ==0.2.2.0: using transformers-0.2.2.0
Using Cabal-1.16.0.3 compiled by ghc-7.0
Using compiler: ghc-7.4.2
Using install prefix: /home/tamarin/.cabal
Binaries installed in: /home/tamarin/.cabal/bin
Libraries installed in:
/home/tamarin/.cabal/lib/shakespeare-css-1.0.2/ghc-7.4.2
Private binaries installed in: /home/tamarin/.cabal/libexec
Data files installed in: /home/tamarin/.cabal/share/shakespeare-css-1.0.2
Documentation installed in:
/home/tamarin/.cabal/share/doc/shakespeare-css-1.0.2
Using alex version 2.3.5 found on system at: /usr/bin/alex
Using ar found on system at: /usr/bin/ar
No c2hs found
Using cpphs version 1.16 found on system at: /home/tamarin/.cabal/bin/cpphs
No ffihugs found
Using gcc version 4.6.1 found on system at: /usr/bin/gcc
Using ghc version 7.4.2 found on system at: /usr/local/bin/ghc
Using ghc-pkg version 7.4.2 found on system at: /usr/local/bin/ghc-pkg
No greencard found
Using haddock version 2.11.0 found on system at: /usr/local/bin/haddock
Using happy version 1.18.6 found on system at: /usr/bin/happy
No hmake found
Using hpc version 0.6 found on system at: /usr/local/bin/hpc
Using hsc2hs version 0.67 found on system at: /usr/local/bin/hsc2hs
No hscolour found
No hugs found
No jhc found
Using ld found on system at: /usr/bin/ld
No lhc found
No lhc-pkg found
No nhc98 found
Using pkg-config version 0.26 found on system at: /usr/bin/pkg-config
Using ranlib found on system at: /usr/bin/ranlib
Using strip found on system at: /usr/bin/strip
Using tar found on system at: /bin/tar
No uhc found
creating dist/build
creating dist/build/autogen
Building shakespeare-css-1.0.2...
Preprocessing library shakespeare-css-1.0.2...
Building library...
creating dist/build
/usr/local/bin/ghc --make -fbuilding-cabal-package -O -odir dist/build -hidir dist/build -stubdir dist/build -i -idist/build -i. -idist/build/autogen -Idist/build/autogen -Idist/build -optP-DGHC_7_4 -optP-include -optPdist/build/autogen/cabal_macros.h -package-name shakespeare-css-1.0.2 -hide-all-packages -package-conf dist/package.conf.inplace -package-id base-4.5.1.0-8a237511fef48b8f180babb0282b28e3 -package-id parsec-3.1.3-f18640e50f9a9d34865e30e42bb377e6 -package-id process-1.1.0.1-bd6d91995b2ae2680669549cb63f15b4 -package-id shakespeare-1.0.3-a36c3be30cdeba4668fd1e4115e40bde -package-id template-haskell-2.8.0.0-785b225a803e6279a067560929c36633 -package-id text-0.11.2.3-7427aa3daf930bd36d392386f0ef5048 -package-id transformers-0.2.2.0-7f9cf1f6994d36648f58249fe35d1cf2 -XHaskell98 Text.Cassius Text.Lucius Text.MkSizeType Text.Css Text.IndentToBrace Text.CssCommon -Wall
[1 of 6] Compiling Text.MkSizeType ( Text/MkSizeType.hs, dist/build/Text/MkSizeType.o )
[2 of 6] Compiling Text.IndentToBrace ( Text/IndentToBrace.hs, dist/build/Text/IndentToBrace.o )
[3 of 6] Compiling Text.Css ( Text/Css.hs, dist/build/Text/Css.o )
[4 of 6] Compiling Text.CssCommon ( Text/CssCommon.hs, dist/build/Text/CssCommon.o )
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package bytestring-0.9.2.1 ... linking ... done.
Loading package transformers-0.2.2.0 ... linking ... done.
Loading package mtl-2.0.1.0 ... linking ... done.
Loading package array-0.4.0.0 ... linking ... done.
Loading package deepseq-1.3.0.0 ... linking ... done.
Loading package text-0.11.2.3 ... linking ... done.
Loading package parsec-3.1.3 ... linking ... done.
Loading package filepath-1.3.0.0 ... linking ... done.
Loading package old-locale-1.0.0.4 ... linking ... done.
Loading package old-time-1.1.0.0 ... linking ... done.
Loading package unix-2.5.1.1 ... linking ... done.
Loading package directory-1.1.0.2 ... linking ... done.
Loading package process-1.1.0.1 ... linking ... done.
Loading package containers-0.4.2.1 ... linking ... done.
Loading package pretty-1.1.1.0 ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package shakespeare-1.0.3 ... linking ... done.
Text/CssCommon.hs:159:1:Failed to install shakespeare-css-1.0.2
World file is already up to date.
cabal: Error: some packages failed to install:
shakespeare-css-1.0.2 failed during the building phase. The exception was:
ExitFailure 11
这里有什么问题?