Haskell 安装音乐套件时遇到的问题

Haskell 安装音乐套件时遇到的问题,haskell,installation,cabal,lilypond,Haskell,Installation,Cabal,Lilypond,我正试图通过阴谋集团安装音乐套件供Haskell使用。按照这里建议下载Lilypond的说明,我进入了cabal安装Lilypond,并成功下载了它 当我试图通过阴谋集团安装音乐套件时,问题开始了。发生的情况如下: mm$ cabal install music-suite clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument] Resolving dependen

我正试图通过阴谋集团安装音乐套件供Haskell使用。按照这里建议下载Lilypond的说明,我进入了
cabal安装Lilypond
,并成功下载了它

当我试图通过阴谋集团安装音乐套件时,问题开始了。发生的情况如下:

mm$ cabal install music-suite
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: music-suite-1.9.0 (user goal)
[__1] trying: musicxml2-1.9.0 (dependency of music-suite)
[__2] trying: base-4.11.1.0/installed-4.1... (dependency of musicxml2)
[__3] trying: music-score-1.9.0 (dependency of music-suite)
[__4] trying: vector-space-points-0.2.1.2 (dependency of music-score)
[__5] next goal: transformers (dependency of music-score)
[__5] rejecting: transformers-0.5.5.0/installed-0.5..., transformers-0.5.6.2,
transformers-0.5.5.0, transformers-0.5.4.0, transformers-0.5.2.0,
transformers-0.5.1.0, transformers-0.5.0.1, transformers-0.5.0.0 (conflict:
music-score => transformers>=0.4.3.0 && <0.5)
[__5] rejecting: transformers-0.4.3.0 (conflict:
base==4.11.1.0/installed-4.1..., transformers => base>=2 && <4.9)
[__5] rejecting: transformers-0.4.2.0, transformers-0.4.1.0,
transformers-0.3.0.0, transformers-0.2.2.1, transformers-0.2.1.0,
transformers-0.2.0.0, transformers-0.1.4.0, transformers-0.1.3.0,
transformers-0.1.1.0, transformers-0.1.0.1, transformers-0.0.1.0,
transformers-0.0.0.0, transformers-0.5.6.1, transformers-0.5.6.0,
transformers-0.5.3.1, transformers-0.5.3.0, transformers-0.5.0.2,
transformers-0.4.0.0, transformers-0.2.2.0, transformers-0.1.0.0 (conflict:
music-score => transformers>=0.4.3.0 && <0.5)
[__5] fail (backjumping, conflict set: base, music-score, transformers)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: music-score, base, transformers,
music-suite, musicxml2, vector-space-points
然而,我已经添加了所有这些依赖项(这里也列出了它们) I receive
在多个本地包中使用了相同的包名base孤儿用于:
-PLIndex“基准-0.8”
-当我在终端上键入
stack install music suite
时,PLIndex“base-孤儿-0.3.3”

当我删除其中一个依赖项时,会收到一条消息,要求恢复这些依赖项,并且还会出现以下错误:

错误:构造生成计划时,遇到以下异常:

 In the dependencies for cassava-0.4.4.0:
base-4.12.0.0 from stack configuration does not match >=4.5 && <4.9  (latest matching version is 4.8.2.0)
 needed due to music-suite-1.9.0 -> cassava-0.4.4.0

  In the dependencies for comonad-4.3:
base-4.12.0.0 from stack configuration does not match >=0 && <0 
 needed due to music-suite-1.9.0 -> comonad-4.3

 In the dependencies for directory-1.2.7.1:
base-4.12.0.0 from stack configuration does not match >=4.5 && <4.11  (latest matching version is 4.10.1.0)
 needed due to music-suite-1.9.0 -> directory-1.2.7.1

 In the dependencies for monadplus-1.4.2:
base-4.12.0.0 from stack configuration does not match >=4 && <4.11  (latest matching version is 4.10.1.0)
 needed due to music-suite-1.9.0 -> monadplus-1.4.2

 In the dependencies for music-score-1.9.0:
base-orphans-0.8 from stack configuration does not match >=0.1 && <0.4  (latest matching version is 0.3.3)
 needed due to music-suite-1.9.0 -> music-score-1.9.0

 In the dependencies for process-1.2.3.0:
base-4.12.0.0 from stack configuration does not match >=4.4 && <4.9  (latest matching version is 4.8.2.0)
 needed due to music-suite-1.9.0 -> process-1.2.3.0

 In the dependencies for transformers-0.4.3.0:
base-4.12.0.0 from stack configuration does not match >=2 && <4.9  (latest matching version is 4.8.2.0)
 needed due to music-suite-1.9.0 -> transformers-0.4.3.0

 In the dependencies for vector-space-points-0.2.1.2:
base-4.12.0.0 from stack configuration does not match >=4.0 && <4.12  (latest matching version is 4.11.1.0)
 needed due to music-suite-1.9.0 -> vector-space-points-0.2.1.2

 Some different approaches to resolving this:

   * Set 'allow-newer: true' to ignore all version constraints and build anyway.

   * Consider trying 'stack solver', which uses the cabal-install solver to attempt to find some working build
configuration. This can be convenient when dealing with many complicated constraint errors, but results may be
unpredictable.
木薯-0.4.4.0依赖项中的
:
堆栈配置中的base-4.12.0.0不匹配>=4.5&&cassava-0.4.4.0
在comonad-4.3的依赖项中:
堆栈配置中的base-4.12.0.0不匹配>=0&&comonad-4.3
在目录-1.2.7.1的依赖项中:
堆栈配置中的base-4.12.0.0不匹配>=4.5&&directory-1.2.7.1
在monadplus-1.4.2的依赖项中:
堆栈配置中的base-4.12.0.0不匹配>=4&&monadplus-1.4.2
在music-score-1.9.0的依赖项中:
堆栈配置中的base-孤儿-0.8不匹配>=0.1&&music-score-1.9.0
在process-1.2.3.0的依赖项中:
堆栈配置中的base-4.12.0.0不匹配>=4.4&&process-1.2.3.0
在变压器的依赖项-0.4.3.0中:
堆栈配置中的base-4.12.0.0不匹配>=2和&transformers-0.4.3.0
在vector-space-points-0.2.1.2的相关性中:
堆栈配置中的base-4.12.0.0不匹配>=4.0&&vector-space-points-0.2.1.2
解决此问题的一些不同方法:
*设置“allow newer:true”忽略所有版本约束并无论如何生成。
*考虑尝试“堆栈求解器”,它使用CabalSo安装解决方案试图找到一些工作构建。
配置在处理许多复杂的约束错误时,这可能很方便,但结果可能会比较复杂
不可预知的

问题在于,music suite已经有几年没有更新了,无法直接使用最新的GHC版本构建

希望我们可以使用“stack”,这是一个允许您指定要使用哪些GHC和哪些包的工具。然而,我还没有找到一个在Hackage上使用音乐套件包的构建计划,所以让我们从以下来源构建它们:

1) 安装堆栈(上有说明)

2) 可选:使用
stack new mypackage
创建一个新包(或者您可以使用自己的包)

3) 在软件包文件夹中,创建或编辑“stack.yaml”文件,使其包含:

resolver: lts-13.8

packages:
- .
- music-suite
- music-parts
- music-score
- music-articulation
- music-pitch
- music-dynamics
- lilypond
- musicxml2
- monadplus

extra-deps:
- average-0.6.1
- prettify-1.0
- data-interval-1.3.0
- extended-reals-0.2.3.0
- positive-0.4.1
- type-unary-0.3.2
- vector-space-points-0.2.1.2
- applicative-numbers-0.1.3
- ty-0.1.7
- reverse-apply-2.0.1
- roman-numerals-0.5.1.5

allow-newer: true

ghc-options:
   "music-score": -XUndecidableInstances
4) 在软件包文件夹中,使用以下命令获取并修复music suite:

git克隆https://github.com/music-suite/lilypond
git克隆https://github.com/music-suite/music-suite
git克隆https://github.com/music-suite/music-score
git克隆https://github.com/music-suite/music-dynamics
git克隆https://github.com/music-suite/music-parts
git克隆https://github.com/music-suite/music-pitch
git克隆https://github.com/music-suite/music-articulation
git克隆https://github.com/music-suite/musicxml2
git克隆https://github.com/hanshoglund/monadplus
echo“实例半组(部分AB),其中()=mplus”>>monadplus/src/Control/Monad/Plus.hs
echo“instance Semigroup hyrthmcontext where()=mappend”>>music score/src/music/score/Internal/Quantize.hs
echo“instance Semigroup CrescDim where()=mappend”>>music score/src/music/score/Export/dynamicontation.hs
echo“instance Semigroup dynamicontation where()=mappend”>>music score/src/music/score/Export/dynamicontation.hs
echo“instance Semigroup Slur where()=mappend”>>music score/src/music/score/Export/ArticulationNotation.hs
echo“instance Semigroup Mark where()=mappend”>>music score/src/music/score/Export/ArticulationNotation.hs
echo“instance Semigroup ArticulationNotation where()=mappend”>>music score/src/music/score/Export/ArticulationNotation.hs
echo“实例半组(ScScore a),其中()=mappend”>>music score/src/music/score/Export/supercellider.hs
echo“instance Semigroup SystemBar where()=mappend”>>music score/src/music/score/Export2/StandardNotation.hs
echo“instance Semigroup StaffInfo where()=mappend”>>music score/src/music/score/Export2/StandardNotation.hs
echo“instance Semigroup Chord where()=mappend”>>music score/src/music/score/Export2/StandardNotation.hs
echo“instance Semigroup MovementInfo where()=mappend”>>music score/src/music/score/Export2/StandardNotation.hs
echo“instance Semigroup WorkInfo where()=mappend”>>music score/src/music/score/Export2/StandardNotation.hs
5) 现在,您可以使用
stack build



一个更简单的解决方案是要求在Hackage上发布更新的音乐套件包。

你的阴谋集团错误的有效载荷在这里(我已经编辑了一些,用
替换了一些非常重复的东西):


例如,通过使用
stack
而不是
cabal
。@Bartek Banachewicz:我已经编辑了这个问题。我尝试通过堆栈,但它不起作用,我不明白建议的操作要求我做什么。它只是要求在堆栈中添加这些依赖项。yaml@Lorenzo:我尝试添加这些依赖项,然后,当我编写
stack install music suite
时,我得到
在多个本地包中使用了相同的包名base-origins,这些本地包用于:-PLIndex“base-origins-0.8”-PLIndex“base-origins-0.3.3”
。我该扔掉哪一个?我会说最老的一个-0.3.3(?)谢谢。我尝试了您的步骤1)-4),但当我尝试
堆栈构建时,我得到了
$stack build Error parsi
resolver: lts-13.8

packages:
- .
- music-suite
- music-parts
- music-score
- music-articulation
- music-pitch
- music-dynamics
- lilypond
- musicxml2
- monadplus

extra-deps:
- average-0.6.1
- prettify-1.0
- data-interval-1.3.0
- extended-reals-0.2.3.0
- positive-0.4.1
- type-unary-0.3.2
- vector-space-points-0.2.1.2
- applicative-numbers-0.1.3
- ty-0.1.7
- reverse-apply-2.0.1
- roman-numerals-0.5.1.5

allow-newer: true

ghc-options:
   "music-score": -XUndecidableInstances
[__5] next goal: transformers (dependency of music-score)
[__5] rejecting: transformers-0.5.5.0, <...> (conflict: music-score => transformers>=0.4.3.0 && <0.5)
[__5] rejecting: transformers-0.4.3.0 (conflict: base==4.11.1.0/installed-4.1..., transformers => base>=2 && <4.9)
[__5] rejecting: transformers-0.4.2.0, <...> (conflict: music-score => transformers>=0.4.3.0 && <0.5)
cabal install music-suite -w ghc-7.10.3