Кабала проблемы с установкой Music-Suite - PullRequest
0 голосов
/ 19 февраля 2019

Я пытаюсь установить music-suite для использования с Haskell через cabal.Следуя инструкциям, здесь http://music -suite.github.io / docs / ref / , в которых предлагается загрузить Lilypond, я ввел cabal install lilypond и успешно его загрузил.

Проблемы начались, когдаЯ пытался установить music-suite через cabal.Вот что произошло:

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

Что именно пошло не так?Как я могу решить эту проблему?

Я пытался установить его через стек, но появилось это сообщение:

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for music-suite-1.9.0:
abcnotation must match ==1.9.0, but the stack configuration has no specified version  (latest matching version
            is 1.9.0)
lilypond must match ==1.9.0, but the stack configuration has no specified version  (latest matching version
         is 1.9.0)
music-articulation must match ==1.9.0, but the stack configuration has no specified version  (latest matching
                   version is 1.9.0)
music-dynamics must match ==1.9.0, but the stack configuration has no specified version  (latest matching version
               is 1.9.0)
music-dynamics-literal must match ==1.9.0, but the stack configuration has no specified version  (latest matching
                       version is 1.9.0)
music-parts must match ==1.9.0, but the stack configuration has no specified version  (latest matching version
            is 1.9.0)
music-pitch must match ==1.9.0, but the stack configuration has no specified version  (latest matching version
            is 1.9.0)
music-pitch-literal must match ==1.9.0, but the stack configuration has no specified version  (latest matching
                    version is 1.9.0)
music-preludes must match ==1.9.0, but the stack configuration has no specified version  (latest matching version
               is 1.9.0)
music-score must match ==1.9.0, but the stack configuration has no specified version  (latest matching version
            is 1.9.0)
musicxml2 must match ==1.9.0, but the stack configuration has no specified version  (latest matching version
          is 1.9.0)
needed since music-suite is a build target.

Some different approaches to resolving this:

  * 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.

  * Recommended action: try adding the following to your extra-deps
in /Users/mm/.stack/global-project/stack.yaml:

- abcnotation-1.9.0
- lilypond-1.9.0
- music-articulation-1.9.0
- music-dynamics-1.9.0
- music-dynamics-literal-1.9.0
- music-parts-1.9.0
- music-pitch-1.9.0
- music-pitch-literal-1.9.0
- music-preludes-1.9.0
- music-score-1.9.0
- musicxml2-1.9.0

Я добавил все эти зависимости (которые также перечислены здесь http://hackage.haskell.org/package/music-suite-1.9.0/dependencies), однако я получаю The same package name is used in multiple local packagesbase-orphans used in: - PLIndex "base-orphans-0.8" - PLIndex "base-orphans-0.3.3", когда набираю stack install music-suite на терминале.

Когда я удаляю одну из этих зависимостей, я получаю сообщение с просьбой восстановить их, а также я получаюследующие ошибки:

Ошибка: при построении плана сборки возникли следующие исключения:

 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.

Ответы [ 2 ]

0 голосов
/ 23 февраля 2019

Полезная нагрузка в вашей ошибке клики здесь (я немного отредактировал, заменив некоторые очень повторяющиеся вещи на <...>):

[__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)

Строки 2 и 4 вместе говорят, что из всех возможныхдоступные версии пакета transformers, только версия 0.4.3.0 соответствует ограничениям версии в ограничениях music-core.Строка 3 говорит, что transformers-0.4.3.0 требует base <4.9, а ваша версия base слишком нова, чтобы соответствовать этому ограничению.

Пока все хорошо, просто стандартное решение ограничений и краткое изложение того, что было сделанонеправильно в ограничении, установленном кликой.Теперь для некоторого высокоуровневого толкования, которое Кабала не может дать вам.

base - самая глубокая, самая зашитая библиотека;он поставляется с GHC и не может быть заменен, поэтому ваш единственный выбор для изменения base версий - это установка другой версии GHC.К сожалению, между base номером версии и номером версии GHC нет принципиальной связи, хотя здесь есть таблица .Изучив эту таблицу, мы видим, что GHC 7.10.3 был последним, кто поставил base версию под 4.9.

Поэтому, чтобы обойти эту проблему и перейти к следующей проблеме, вы должны установить версиюGHC, который по крайней мере так же стара, как 7.10.3, а затем сказать Cabal использовать его при выполнении решения ограничений.Последнее, что вы можете сделать, либо сделав новый (старый) GHC первым в вашем PATH, либо используя флаг -w cabal, чтобы точно указать, какой компилятор использовать, например:

cabal install music-suite -w ghc-7.10.3
0 голосов
/ 22 февраля 2019

Проблема в том, что музыкальный пакет не обновлялся в течение нескольких лет и не может быть непосредственно собран с последними выпусками GHC.

Надеемся, мы можем использовать «стек», который является инструментом, которыйпозволяет указать, какой GHC и какие пакеты использовать.Однако я не смог найти план сборки, работающий с пакетами music-suite на Hackage, поэтому давайте скомпилируем их из источников:

1) Установочный стек (инструкции на https://haskellstack.org)

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) В папке вашего пакета извлеките и исправьте набор музыки с помощью следующих команд:

git clone https://github.com/music-suite/lilypond
git clone https://github.com/music-suite/music-suite
git clone https://github.com/music-suite/music-score
git clone https://github.com/music-suite/music-dynamics
git clone https://github.com/music-suite/music-parts
git clone https://github.com/music-suite/music-pitch
git clone https://github.com/music-suite/music-articulation
git clone https://github.com/music-suite/musicxml2
git clone https://github.com/hanshoglund/monadplus

echo "instance Semigroup (Partial a b) where (<>) = mplus" >> monadplus/src/Control/Monad/Plus.hs

echo "instance Semigroup RhythmContext where (<>) = mappend" >> music-score/src/Music/Score/Internal/Quantize.hs
echo "instance Semigroup CrescDim where (<>) = mappend" >> music-score/src/Music/Score/Export/DynamicNotation.hs
echo "instance Semigroup DynamicNotation where (<>) = mappend" >> music-score/src/Music/Score/Export/DynamicNotation.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 "instance Semigroup (ScScore a) where (<>) = mappend" >> music-score/src/Music/Score/Export/SuperCollider.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


Более простым решением было бы запросить выпуск более новых пакетов music-suite в Hackage.

...