Code Monkey home page Code Monkey logo

Comments (14)

sternenseemann avatar sternenseemann commented on August 30, 2024 1

@Mokosha I don't believe there is an issue with 0.5.2 anymore, hence I suggested upgrading. The build failure in the original issue is related to HCodecs 0.5.1 not compiling with the changes brought by the MonadFail proposal if I'm not mistaken.

from euterpea2.

pauloud avatar pauloud commented on August 30, 2024

I haven't seen that the installation tutorial tells not to use latest version of ghc, and I've eventually managed to downgrade ghc and install Euterpea, so the topic can be locked

from euterpea2.

carlca avatar carlca commented on August 30, 2024

Hi, @pauloud I'm getting exactly the same error on macOS 10.14.6. Can you tell me which version of GHCI you downgraded to and what steps did it take to do this? Did you have to uninstall the current version of GHCI first?

from euterpea2.

pauloud avatar pauloud commented on August 30, 2024

Yes, I have uninstalled GHC following the instructions here https://gist.github.com/begriffs/6408415
Then I've easily install the 8.4.3 version (but according Euterpea site 8.6.3 version "provides the simplest setup" and I haven't had problems using cabal v1 commands.

from euterpea2.

carlca avatar carlca commented on August 30, 2024

Cool! I'll give that a go! Thanks for the swift reply!

from euterpea2.

carlca avatar carlca commented on August 30, 2024

I uninstalled GHC using those instructions but I am stuck on the installation of 8.4.3, because I installed 8.8.3 using brew install ghc - I cannot work out how to get Homebrew to get an ealier version. Similarly, if I use the Euterpea website, all that is available there is 8.8.3. How did you get 8.4.3?

from euterpea2.

carlca avatar carlca commented on August 30, 2024

Don't worry, I found it!

from euterpea2.

tallpeak avatar tallpeak commented on August 30, 2024

FYI: I was able to "stack install" using ghc 8.10.1 with this stack.yaml. (I haven't figured out how to get a software synthesizer working on my Macbook, so I don't know if it works. But the play function is available for execution, just can't find a midi output. (Does Surge work? I installed it, but maybe it needs configuration? No support for AU/VST3?) )

Here's my stack.yaml, after running stack init in an empty directory and some editing (the package requests HCodecs == 0.5.1, hence the allow-newer: true) :

euterpea-install % cat stack.yaml | grep -v ^#
resolver: nightly-2020-06-27
packages: []
allow-newer: true
extra-deps:
- HCodecs-0.5.2
- PortMidi-0.2.0.0@sha256:0671e36ec72e95138bf396234b205864a8a6d0ee353e09e01cbfd57004c56f40,2383
- arrows-0.4.4.2@sha256:a260222b766da922657e302aa7c0409451913e1e503798a47a213a61ba382460,1235
- bytestring-0.10.8.2@sha256:0a58355cb91bc9930f951a6d14f5fb4a6022647c3aab2b7223e888843bb6a832,8921
- Stream-0.4.7.2@sha256:ed78165aa34c4e23dc53c9072f8715d414a585037f2145ea0eb2b38300354c53,1009
- lazysmallcheck-0.6@sha256:dac7a1e4877681f1260309e863e896674dd6efc1159897b7945893e693f2a6bc,1696

from euterpea2.

sternenseemann avatar sternenseemann commented on August 30, 2024

@pauloud This is an issue with HCodecs, try reproducing it with their latest version (0.5.2) and reporting it to their maintainer.

from euterpea2.

Mokosha avatar Mokosha commented on August 30, 2024

Hi -- going through my notifications. What exactly is the issue with HCodecs?

from euterpea2.

nxg avatar nxg commented on August 30, 2024

I think there is still some issue with recent Platform versions and HCodecs, but it might be merely a question of correctly specifying a dependency.

If I download using GHCup (onto macOS 11.6) I am given

% ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.10.7
% cabal --version
cabal-install version 3.6.2.0
compiled using version 3.6.2.0 of the Cabal library 

I then try to install Euterpea (after cabal update):

% cabal v1-install Euterpea
Resolving dependencies...
Downloading  PortMidi-0.2.0.0
Downloading  bytestring-0.10.8.2
Downloaded   bytestring-0.10.8.2
Downloading  heap-1.0.4
Starting     bytestring-0.10.8.2
Downloaded   PortMidi-0.2.0.0
Downloading  random-1.1
Starting     PortMidi-0.2.0.0
Downloaded   heap-1.0.4
Downloading  semigroups-0.20
Starting     heap-1.0.4
Downloaded   random-1.1
Downloading  splitmix-0.1.0.4
Starting     random-1.1
Downloaded   semigroups-0.20
Downloading  lazysmallcheck-0.6
Starting     semigroups-0.20
Downloaded   splitmix-0.1.0.4
Starting     splitmix-0.1.0.4
Building     bytestring-0.10.8.2
Downloaded   lazysmallcheck-0.6
Starting     lazysmallcheck-0.6
Building     PortMidi-0.2.0.0
Building     heap-1.0.4
Building     random-1.1
Building     semigroups-0.20
Building     splitmix-0.1.0.4
Building     lazysmallcheck-0.6
Completed    heap-1.0.4
Completed    lazysmallcheck-0.6
Completed    semigroups-0.20
Completed    splitmix-0.1.0.4
Completed    random-1.1
Downloading  QuickCheck-2.14.2
Downloaded   QuickCheck-2.14.2
Starting     QuickCheck-2.14.2
Completed    PortMidi-0.2.0.0
Building     QuickCheck-2.14.2
Completed    bytestring-0.10.8.2
Completed    QuickCheck-2.14.2
Downloading  Stream-0.4.7.2
Downloading  HCodecs-0.5.1
Downloaded   Stream-0.4.7.2
Starting     Stream-0.4.7.2
Downloaded   HCodecs-0.5.1
Starting     HCodecs-0.5.1
Building     Stream-0.4.7.2
Building     HCodecs-0.5.1
Failed to install HCodecs-0.5.1
Build log ( /Users/norman/.cabal/logs/ghc-8.10.7/HCodecs-0.5.1-LR40TMwtcYApNXi3bo5eI.log ):
cabal: Entering directory '/var/folders/cq/46x6_ygx48g4fvtvtt_t4yjr0000gn/T/cabal-tmp-47541/HCodecs-0.5.1'
Configuring 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, dist/build/Codec/ByteString/Builder.dyn_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, dist/build/Codec/ByteString/Parser.dyn_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: Leaving directory '/var/folders/cq/46x6_ygx48g4fvtvtt_t4yjr0000gn/T/cabal-tmp-47541/HCodecs-0.5.1'
Completed    Stream-0.4.7.2
cabal: Error: some packages failed to install:
Euterpea-2.0.7-KdKX1MNm6oAIS9wE6s5abl depends on Euterpea-2.0.7 which failed
to install.
HCodecs-0.5.1-LR40TMwtcYApNXi3bo5eI failed during the building phase. The
exception was:
ExitFailure 1

I note that this is still trying to compile the failing HCodecs version 0.5.1, so it might be that this is now merely a an issue of correctly specifying dependencies.

Parenthetically, and for what it's worth, cabal v2-install Euterpea fails with a different error which doesn't mention HCodecs (I'm not sure if that's relevant), and the Nix build of Euterpea-2.0.7 fails because it can't build alsa (and I'm confused about whether that's a bug, or quite whose).

I do notice that the getting started instructions (a) mention an ALSA install as part of the Linux recommendations, so there's clearly an ALSA story here, and (b) recommend specifically the 8.6.3 .pkg at https://downloads.haskell.org/platform/8.6.3/ (broken link, by the way!), but that package installs to a fixed path, which I'd rather avoid if I can, hence the attempt to do the install using the current (relocatable) version.

Sorry if the remarks here are naive about ghc/cabal/stack: I'm using Euterpea as my most recent attempt to get to Hello World with Haskell (!), hence a fair amount of blundering around.

from euterpea2.

sternenseemann avatar sternenseemann commented on August 30, 2024

I think there is still some issue with recent Platform versions and HCodecs, but it might be merely a question of correctly specifying a dependency.

HCodecs is fine, the problem is that Euterpea pins a too old version. Try configuring with --allow-newer.

from euterpea2.

nxg avatar nxg commented on August 30, 2024

Gah -- that works! It even says that on the getting-started page! I must be blind....

from euterpea2.

nik312123 avatar nik312123 commented on August 30, 2024

How does this differ if you are using stack (e.g. stack ghci)? Is there a way to do --allow-newer with Stack?

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.