Euterpea / Euterpea2

Euterpea version 2
zlib License
219 stars 65 forks source link

Installing Euterpea fails on MacOS High Sierra (version 10.13.6) #36

Closed ksvanhorn closed 4 years ago

ksvanhorn commented 4 years ago

Following the instructions on the installation page, after installing ghcup, here's what I did and the result:

mac> source ~/.ghcup/env mac> cabal update Downloading the latest package list from hackage.haskell.org To revert to previous state run: cabal v2-update 'hackage.haskell.org,2019-10-21T00:19:46Z' mac> cabal install Euterpea Resolving dependencies... cabal: Could not resolve dependencies: [0] trying: Euterpea-2.0.7 (user goal) [1] next goal: Euterpea:setup.Cabal (dependency of Euterpea) [1] rejecting: Euterpea:setup.Cabal-2.4.0.1/installed-2.4..., Euterpea:setup.Cabal-3.0.0.0, Euterpea:setup.Cabal-2.4.1.0, Euterpea:setup.Cabal-2.4.0.1, Euterpea:setup.Cabal-2.4.0.0 (conflict: Euterpea => Euterpea:setup.Cabal>=1.8 && <1.25) [1] rejecting: Euterpea:setup.Cabal-2.2.0.1, Euterpea:setup.Cabal-2.2.0.0, Euterpea:setup.Cabal-2.0.1.1, Euterpea:setup.Cabal-2.0.1.0, Euterpea:setup.Cabal-2.0.0.2, Euterpea:setup.Cabal-1.24.2.0, Euterpea:setup.Cabal-1.24.0.0, Euterpea:setup.Cabal-1.22.8.0, Euterpea:setup.Cabal-1.22.7.0, Euterpea:setup.Cabal-1.22.6.0, Euterpea:setup.Cabal-1.22.5.0, Euterpea:setup.Cabal-1.22.4.0, Euterpea:setup.Cabal-1.22.3.0, Euterpea:setup.Cabal-1.22.2.0, Euterpea:setup.Cabal-1.22.1.1, Euterpea:setup.Cabal-1.22.1.0, Euterpea:setup.Cabal-1.22.0.0, Euterpea:setup.Cabal-1.20.0.4, Euterpea:setup.Cabal-1.20.0.3, Euterpea:setup.Cabal-1.20.0.2, Euterpea:setup.Cabal-1.20.0.1, Euterpea:setup.Cabal-1.20.0.0, Euterpea:setup.Cabal-1.18.1.7, Euterpea:setup.Cabal-1.18.1.6, Euterpea:setup.Cabal-1.18.1.5, Euterpea:setup.Cabal-1.18.1.4, Euterpea:setup.Cabal-1.18.1.3, Euterpea:setup.Cabal-1.18.1.2, Euterpea:setup.Cabal-1.18.1.1, Euterpea:setup.Cabal-1.18.1, Euterpea:setup.Cabal-1.18.0, Euterpea:setup.Cabal-1.16.0.3, Euterpea:setup.Cabal-1.16.0.2, Euterpea:setup.Cabal-1.16.0.1, Euterpea:setup.Cabal-1.16.0, Euterpea:setup.Cabal-1.14.0, Euterpea:setup.Cabal-1.12.0, Euterpea:setup.Cabal-1.10.2.0, Euterpea:setup.Cabal-1.10.1.0, Euterpea:setup.Cabal-1.10.0.0, Euterpea:setup.Cabal-1.8.0.6, Euterpea:setup.Cabal-1.8.0.4, Euterpea:setup.Cabal-1.8.0.2, Euterpea:setup.Cabal-1.6.0.3, Euterpea:setup.Cabal-1.6.0.2, Euterpea:setup.Cabal-1.6.0.1, Euterpea:setup.Cabal-1.4.0.2, Euterpea:setup.Cabal-1.4.0.1, 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, Euterpea

donya commented 4 years ago

Run "cabal --version" and see what ghcup installed. It's possible the v1 clause listed in the installation instructions may solve it for you: "Cabal 3.x users: use cabal v1-update and cabal v1-install instead." (also noted here: [https://github.com/Euterpea/Euterpea2/issues/34])

ksvanhorn commented 4 years ago

mac> cabal --version cabal-install version 1.22.6.0 using version 1.22.5.0 of the Cabal library

donya commented 4 years ago

1.22 is a really old cabal version...I haven't seen Euterpea tried with <1.24 in a long time. 1.22 may not work anymore. Make sure you have at least ghc 8.0.2 (check with "ghc --version"). Unless you specifically asked for an old ghc version with ghcup, I'm puzzled as to how you ended up with 1.22 unless you have a competing version from an older, non-ghcup installation. If you have a recent ghc and somehow got an old cabal then try upgrading the cabal version.

andreatamez commented 4 years ago

I have version cabal 3.0.0.0

Failed to build HCodecs-0.5.1. Build log ( /Users/andreatamez/.cabal/logs/ghc-8.8.1/HCdcs-0.5.1-808db70f.log ): Configuring library for HCodecs-0.5.1.. Preprocessing library for HCodecs-0.5.1.. Building library for HCodecs-0.5.1.. [1 of 7] Compiling Codec.ByteString.Builder ( src/Codec/ByteString/Builder.hs, dist/build/Codec/ByteString/Builder.o )

src/Codec/ByteString/Builder.hs:79:1: warning: [-Wunused-imports] The import of ‘Data.Semigroup’ is redundant except perhaps to import instances from ‘Data.Semigroup’ To import instances alone, use: import Data.Semigroup() | 79 | import Data.Semigroup | ^^^^^^^^^^^^^^^^^^^^^ [2 of 7] Compiling Codec.ByteString.Parser ( src/Codec/ByteString/Parser.hs, dist/build/Codec/ByteString/Parser.o )

src/Codec/ByteString/Parser.hs:143:5: error: ‘fail’ is not a (visible) method of class ‘Monad’ | 143 | fail err = Parser $ (S bytes) -> | ^^^^ cabal: Failed to build HCodecs-0.5.1 (which is required by Euterpea-2.0.8). See the build log above for details.

donya commented 4 years ago

This HCodecs issue doesn't seem to be the same thing as originally posted by ksvanhorn. GHC version? Also I need to see the command that ultimately resulted in the failure, not just the error at the end (complete transcripts from start to finish are most helpful; in this case the cabal install syntax is likely important since it's 3.x).

donya commented 4 years ago

So far I am unable to reproduce either of these issues with ghc 8.6.5 (via ghcup) and cabal 3.0.0.0 on Mojave (OS X 10.14). The Euterpea install succeeds without issue when using v1-style commands:

cabal v1-update cabal v1-install Euterpea (which fetches 2.0.7 from Hackage)

Similarly, GitHub installations succeed with Euterpea 2.0.8 on GitHub using "cabal v1-install" from the local repo copy.

I am no longer able to test on High Sierra, but I also somewhat doubt that the reported problems in this thread are a 10.13 vs 10.14 issue.

ksvanhorn commented 4 years ago

ghc --version gives 8.6.5.

I already have stack on my system. Could stack and ghcup be getting in each other's way? Note that I did "source ~/.ghcup/env" to ensure that ghcup would find things in the right places. When I check my $PATH variable, ~/.cabal/bin and ~/.ghcup/bin are first on the list. There is a different cabal in ~/.local/bin, installed there by stack, but that ~/.local/bin is much later in $PATH.

ksvanhorn commented 4 years ago

OK, this is weird. I just ran "cabal --version" again and got "cabal-install version 3.0.0.0". When I run "cabal install Euterpea" it still fails with the same error message about not being able to resolve dependencies.

donya commented 4 years ago

If you have cabal 3.x then you need to do "cabal v1-update" and then "cabal v1-install Euterpea" for it to work. Despite the other cabal verion you saw before, the errors you got about resolving dependencies do look to me like those coming from cabal 3. So, if cabal 3 is really what's being invoked then switching to v1-update and v1-install should to it.

I have seen some weirdness in the past with multiple ghc and/or cabal versions where they shouldn't be conflicting in theory but do in practice. If the v1- command trick doesn't work then I unfortunately don't have a good recommendation there beyond trying "ghcup set 8.6.5" if you didn't already run that and then, if that doesn't resolve it, seeing what happens if you remove the path entry for the older cabal version.

ksvanhorn commented 4 years ago

OK, that worked. I assume I also need to do "cabal v1-install HSoM" instead of "cabal install HSoM"?

donya commented 4 years ago

Yes, you'll need to use v1-install for HSoM as well. The same goes any other libraries that you want installed the traditional way (which is to say always available when you load up GHCi).

andreatamez commented 4 years ago

Hello I fixed by downgrading my GHCI to 8.5.6 when downgrading this it worked perfectly fine. Combining stack + cabal is not a good idea.

Andrea Tamez


From: Donya Quick notifications@github.com Sent: Thursday, October 24, 2019 6:50:11 AM To: Euterpea/Euterpea2 Euterpea2@noreply.github.com Cc: Andrea Tamez fabiolatamez@outlook.com; Comment comment@noreply.github.com Subject: Re: [Euterpea/Euterpea2] Installing Euterpea fails on MacOS High Sierra (version 10.13.6) (#36)

Yes, you'll need to use v1-install for HSoM as well. The same goes any other libraries that you want installed the traditional way (which is to say always available when you load up GHCi).

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FEuterpea%2FEuterpea2%2Fissues%2F36%3Femail_source%3Dnotifications%26email_token%3DADZN5NTEONEPY5K7ZFZHDQTQQGRZHA5CNFSM4JCW45HKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECFDBOQ%23issuecomment-545927354&data=02%7C01%7C%7C7a0303b8bc9845b52c3308d758891799%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637075218134114675&sdata=uHHzRyCfaf9mRpHzb6RjACKXHJJddHLYYcWSu%2B0iPGs%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADZN5NRDX5RBVALCXGQTRYDQQGRZHANCNFSM4JCW45HA&data=02%7C01%7C%7C7a0303b8bc9845b52c3308d758891799%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637075218134124686&sdata=0Oj55hZzerbMSE%2FZQOnnkwCTlmH0Epp5oOVHXGi7hGQ%3D&reserved=0.