0

Having trouble building the starter-template: https://github.com/input-output-hk/plutus-starter

$ cabal build
Warning: Requested index-state 2021-08-14T00:00:00Z is newer than
'hackage.haskell.org'! Falling back to older state (2021-08-13T22:58:51Z).
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] next goal: cardano-crypto-class (user goal)
[__0] rejecting: cardano-crypto-class-2.0.0 (conflict: pkg-config package
libsodium-any, not found in the pkg-config database)
[__0] fail (backjumping, conflict set: cardano-crypto-class)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: cardano-crypto-class
1
  • Not too much information to go off. However, the warning is fairly explicit insofar as telling you what the problem is. Since the plutus-starter repo does suggest trying to run cabal update if you get issues resolving dependencies, I assume you have tried that?
    – Dilworth
    Jan 14 at 20:02
1

Okay, so I tried to replicate your issue (I'm using nix+cabal), but my cabal build works fine (I got some warnings, but everything compiled). Thus, all I can suggest is that you reclone the repo and try again, I've outlined the steps below, but they can be found in the plutus and plutus-starter repo:

Check your /etc/nix/nix.conf and ensure that you've followed the procedure to set up the binary cache, which it looks like you've already done. At the very least perhaps check to ensure that the /etc/nix/nix.conf matches the config found in the Plutus README.

Clone the plutus-starter repo:

git clone git@github.com:input-output-hk/plutus-starter.git

Change directory into it:

cd plutus-starter

Run a Nix Shell (pretty important, nix manages your environment, not just your cached packages):

nix-shell

Update cabal:

cabal update

Try again:

cabal build

If you're still having issues, then it would seem to me that you'll have to manually change the version of cardano-crypto-class that you're using.

If you're still having issues, some more information may be helpful.

13
  • I didn't understand I needed to use nix. I'm trying to use it now, but it's been building for 3 hours and I have no idea how much longer it's going to keep building. Is there a way to see progress? So far it's up to 17Gb
    – dspyz
    Jan 14 at 21:30
  • You've likely not set up the binary cache properly. This has been a massive issue recently, especially for people using M1 RISC chips from Apple. If you're using an intel based machine, the steps outlined in the Plutus README should work. If you're using an M1 machine, I suggest you take a look at this guide.
    – Dilworth
    Jan 14 at 21:34
  • I'm confused; should I build Plutus Core first?
    – dspyz
    Jan 14 at 21:40
  • I think plutus-core is included within the binary cache when you boot up a nix-shell from the root project of plutus-starter, so when you run cabal build, it'll build much faster. Limited knowledge of nix, but I assume you're completely unfamiliar with it? Nix provides a way to manage environments, such that you can have different versions of dependencies for different projects on your local file-system (and it's easy to switch between them). It also provides an 'in-network' cache, so you can pull down heavy pre-built dependencies from a shared address, so it's important to set up.
    – Dilworth
    Jan 14 at 21:52
  • 1
    Great. However, I would still urge you to set up the binary cache. Lastly, see: stackoverflow.com/questions/63142127/… - I know it's for Mac, but it looks like the same issue, it does just say create the file. Regardless, I hope this helped & good luck working on projects in the future.
    – Dilworth
    Jan 14 at 22:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.