Open donya opened 5 years ago
I somehow ended up with a working install on Euterpea on Windows 10 now. Three observations:
Plain vanilla "cabal update" simply isn't pulling the updated packages list from Hackage (happens on both Mac and Windows). All documentation I have seen says it should still work, but it clearly isn't. This is not just a Euterpea problem: if you try to install any library, it goes for really old versions. It may be that running v2-update fixes it, but I've tried too many things tonight and need to start over from a clean install to verify that v-update is the actual fix before I update the documentation.
Two version bumps are in order in the cabal file: stm >= 2.4 && <2.6, containers>=0.5.5.1 && <0.7. I've made this change on Hackage and will do it on GitHub soon. However, this only becomes relevant after getting the update to succeed and so far it only works on Windows for me.
This new cabal version is really prone to hanging when it encounters a problem rather than giving an error.
I’m not sure, but I suspect that your main problem is ‘build-time: Custom’ in the cabal file. I played around with travis and got some good builds with the ‘cabal v2-*’ methods.
https://travis-ci.org/tonyday567/Euterpea2/builds/469855286?utm_medium=notification&utm_source=email
Let me know if you’d like a PR that adds a .travis.yml. I find travis-ci to be a good way to document build methods and avoid being surprised by changes.
Another observation: when I was testing "cabal update" with 8.6.3 yesterday and some today, It would end very quickly without giving me a message like this (while v2-update was printing a thing like this every time):
To revert to previous state run: cabal update --index-state='2018-12-19T12:36:20Z'
That suggests to me it was simply crashing and not giving an error message.
And now the fun part: after repeating my steps and doing another clean install...regular cabal update worked on one machine. This was right after a different clean install on the same machine observing that regular update failed while v2-update was fine. It is frustrating that this is apparently not a clean cut behavior and that sometimes it will work, sometimes not.
When testing HSoM yesterday, it would also hang trying to install a GLUT-related library. Now it proceeds quickly with either method. I am starting to wonder if there was some sort of server-related issue adding phantom problems to the simple version bumps that were needed.
Both Euterpea and HSoM will clearly build now on Mac and Windows (now that dependency version bumps are on both Hackage and GitHub). It will print warning messages about using out-dated installation methods, but it will work. Pending further investigation of the new-install stuff, which will eventually be a hard requirement with later cabal versions, I am going to updat the recommended installation to the following:
First try "cabal update" and "cabal install Euterpea" (after all, there are many <8.6 users who don't have to worry about this particular issue yet)
If it fails or if using 8.6.3, do "cabal v2-update" then "cabal install Euterpea" and it should succeed.
The cabal issue https://github.com/haskell/cabal/issues/5278 mentions that a project with build-type: Custom
also needs a custom-setup
stanza, or it will implicitly introduce a new constraint of cabal <= 1.25
which is incompatible with Euterpea's cabal >= 1.8
.
This does result in exactly the type of error you mentioned in the issue post and currently keeps me from installing Euterpea with cabal v2-install
.
Why or under what exact circumstances this stops applying so you suddenly can v2-install
Euterpea remains mysterious to me. There's people for whom it works and people with the same cabal versions for whom it doesn't.
I did some further testing with the current github version of Euterpea. It now reliably builds fine with the custom-setup
stanza and reliably errors without. We should add the stanza to the cabal file to fix this.
The newly released Haskell Platform 8.6.3 includes a version of cabal that requires different syntax. Currently the installation instructions will only work with versions up to 8.4.3.
With 8.6.3, this command series will no longer work:
cabal update cabal install Euterpea
You will see a complaint from cabal like this...
Warning: The install command is a part of the legacy v1 style of cabal usage. Please switch to using either the new project style and the new-install command or the legacy v1-install alias as new-style projects will become the default in the next version of cabal-install. Please file a bug if you cannot replicate a working v1- use case with the new-style commands.
...and then it will try to install Euterpea 1.x, which will fail because of problems with the Heap dependency. Attempting to specify the version as Euterpea-2.0.6 also fails, as does downloading Euterpea manually and doing a local cabal install or trying to use runhaskell.
If you try to use new-install, this happens:
_… Euterpea:setup.Cabal-1.4.0.0, Euterpea:setup.Cabal-1.2.4.0, Euterpea:setup.Cabal-1.2.3.0, Euterpea:setup.Cabal-1.2.2.0, Euterpea:setup.Cabal-1.2.1, Euterpea:setup.Cabal-1.1.6, Euterpea:setup.Cabal-1.24.1.0 (constraint from minimum version of Cabal used by Setup.hs requires >=2.4) [_1] fail (backjumping, conflict set: Euterpea, Euterpea:setup.Cabal) After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: Euterpea:setup.Cabal, stm, Euterpea, base
Frustratingly, many cabal-related pages are NOT UP TO DATE with this change in how cabal works even though it's not a hard requirement with the most recent Haskell Platform, so I am having difficulty sorting this out. I am also not quickly finding a guide that shows easily how to transition from the old style to the new style, which is what is needed here.
If anyone happens to be quite familiar with this new cabal version and knows how to do global library installations with it (it does claim v1-style usage should still work...), please describe it here so I can update the instructions and/or Euterpea if it's a library incompatibility and not just an installation syntax issue.