Code Monkey home page Code Monkey logo

Comments (12)

donya avatar donya commented on August 30, 2024

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//issues/34])

from euterpea2.

ksvanhorn avatar ksvanhorn commented on August 30, 2024

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

from euterpea2.

donya avatar donya commented on August 30, 2024

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.

from euterpea2.

andreatamez avatar andreatamez commented on August 30, 2024

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.

from euterpea2.

donya avatar donya commented on August 30, 2024

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

from euterpea2.

donya avatar donya commented on August 30, 2024

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.

from euterpea2.

ksvanhorn avatar ksvanhorn commented on August 30, 2024

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.

from euterpea2.

ksvanhorn avatar ksvanhorn commented on August 30, 2024

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.

from euterpea2.

donya avatar donya commented on August 30, 2024

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.

from euterpea2.

ksvanhorn avatar ksvanhorn commented on August 30, 2024

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

from euterpea2.

donya avatar donya commented on August 30, 2024

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

from euterpea2.

andreatamez avatar andreatamez commented on August 30, 2024

from euterpea2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.