parconc-examples icon indicating copy to clipboard operation
parconc-examples copied to clipboard

parconc build fails on mac

Open sanjitk7 opened this issue 3 years ago • 3 comments

I'm currently looking to run the ping.hs program example under the distrib-ping directory and to that end im trying to build the executables with cabal.

on building parconc as directed in the book by the following (as stated on the book)

The sample code is collected together in the package parconc-examples on Hackage. To download and unpack it, run:

$ cabal unpack parconc-examples

Then, install the dependent packages:

$ cd parconc-examples
$ cabal install --only-dependencies

Next, build all the sample programs:

$ cabal build

The parconc-examples package will be updated as necessary to follow future changes in the Haskell Platform or other APIs.

I have downloaded stack from the official site and cable from here

on building I get the following error

sanjitkumar@Sanjits-MacBook-Air parconc-examples-0.4.8 % cabal install --only-dependencies
cabal: Could not resolve dependencies:
[__0] trying: parconc-examples-0.4.8 (user goal)
[__1] next goal: base (dependency of parconc-examples)
[__1] rejecting: base-4.14.1.0/installed-4.14.1.0 (conflict: parconc-examples
=> base>=4.5 && <4.14)
[__1] skipping: base-4.15.0.0, base-4.14.1.0, base-4.14.0.0 (has the same
characteristics that caused the previous version to fail: excluded by
constraint '>=4.5 && <4.14' from 'parconc-examples')
[__1] rejecting: base-4.13.0.0, base-4.12.0.0, base-4.11.1.0, base-4.11.0.0,
base-4.10.1.0, base-4.10.0.0, base-4.9.1.0, base-4.9.0.0, base-4.8.2.0,
base-4.8.1.0, base-4.8.0.0, base-4.7.0.2, base-4.7.0.1, base-4.7.0.0,
base-4.6.0.1, base-4.6.0.0, base-4.5.1.0, base-4.5.0.0, base-4.4.1.0,
base-4.4.0.0, base-4.3.1.0, base-4.3.0.0, base-4.2.0.2, base-4.2.0.1,
base-4.2.0.0, base-4.1.0.0, base-4.0.0.0, base-3.0.3.2, base-3.0.3.1
(constraint from non-upgradeable package requires installed instance)
[__1] fail (backjumping, conflict set: base, parconc-examples)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, parconc-examples

sanjitk7 avatar Apr 04 '21 05:04 sanjitk7

Check my Pull Request #31

I had the same problem as yours and I fixed it by modifying the project's .cabal file.

danpaldev avatar Apr 18 '21 01:04 danpaldev

So the thing is even after the build I'm unable to find the executable (ping and other distributed program examples) under dist-newstyle/build/x86_64-osx/ghc-8.10.4/parconc-examples-0.4.8/x/

am I looking inside the wrong place or did I miss something?

the rest of the executables seem to be present

image

sanjitk7 avatar May 01 '21 05:05 sanjitk7

Check my Pull Request #31

I had the same problem as yours and I fixed it by modifying the project's .cabal file.

any help would be appreciated

sanjitk7 avatar May 01 '21 05:05 sanjitk7