plutus icon indicating copy to clipboard operation
plutus copied to clipboard

Update to new plutus dependency fails on cardano-crypto-class

Open anton-k opened this issue 2 years ago • 5 comments

Summary

I'm trying to update my project to new plutus version. After I've copied the dependencies cabal.project I can get into nix shell When I try to build the project with cabal inside the nix shell it fails with error:

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

Steps to reproduce the behavior

Update the project dependency to new version of plutus. plutus commit: dca9c63a4161ada9eda574c3be3e08670f6e9fd5

Actual Result

When I try to build project with cabal inside the nix shell I get an error:

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

Expected Result

Build the project with dependency to new plutus.

Describe the approach you would take to fix this

No response

System info

Manjaro

anton-k avatar Mar 03 '22 09:03 anton-k

I also use plutus-apps. How do you think can it cause problems? Like conflict of libsodium dependencies across the packages.

anton-k avatar Mar 03 '22 09:03 anton-k

I don't know because I don't know what you're doing. "Using nix" is not very specific. All I can tell you is what the cabal error tells you: you don't have libsodium in your shell, and you should.

michaelpj avatar Mar 03 '22 11:03 michaelpj

Any progress? I also got this error!

Background: Clone demo from

https://github.com/input-output-hk/plutus-starter

Then, jump to run cabal build plutus-starter-pab without other build operation beforehand.

Here is some of my build log:

bruce@ubuntu20:~/coding/haskell/plutus-starter$ ls
CONTRIBUTING.md  LICENSE  README.md  cabal.project  default.nix  examples  hie.yaml  nix  pab  plutus-starter.cabal  release.nix  scripts  shell.nix  src
bruce@ubuntu20:~/coding/haskell/plutus-starter$

bruce@ubuntu20:~/coding/haskell/plutus-starter$ cabal build plutus-starter-pab
Cloning into '/home/bruce/coding/haskell/plutus-starter/dist-newstyle/src/flat-64b673dc3eef5b9f'...
remote: Enumerating objects: 3721, done.
remote: Counting objects: 100% (547/547), done.
remote: Compressing objects: 100% (362/362), done.
remote: Total 3721 (delta 358), reused 338 (delta 179), pack-reused 3174
Receiving objects: 100% (3721/3721), 1.23 MiB | 233.00 KiB/s, done.
Resolving deltas: 100% (2410/2410), done.
HEAD is now at ee59880 Don't use the unsafe decodeUtf8
Cloning into '/home/bruce/coding/haskell/plutus-starter/dist-newstyle/src/Win32-net_-e9415802910225c6'...
remote: Enumerating objects: 1107, done.
remote: Counting objects: 100% (1107/1107), done.
remote: Compressing objects: 100% (506/506), done.
remote: Total 1107 (delta 498), reused 1031 (delta 435), pack-reused 0
Receiving objects: 100% (1107/1107), 1.02 MiB | 238.00 KiB/s, done.
Resolving deltas: 100% (498/498), done.
HEAD is now at 3825d3a Merge pull request #9 from input-output-hk/coot/createNamedPipe-error
Cloning into '/home/bruce/coding/haskell/plutus-starter/dist-newstyle/src/cardano-a_-69e96f3eceed3ed5'...
remote: Enumerating objects: 18121, done.
remote: Counting objects: 100% (4162/4162), done.
remote: Compressing objects: 100% (1762/1762), done.
remote: Total 18121 (delta 3344), reused 2967 (delta 2374), pack-reused 13959
Receiving objects: 100% (18121/18121), 46.52 MiB | 399.00 KiB/s, done.
Resolving deltas: 100% (13968/13968), done.
HEAD is now at d2f86caa Merge pull request #149 from input-output-hk/rvl/adp-1114/fix-npm-publish
Cloning into '/home/bruce/coding/haskell/plutus-starter/dist-newstyle/src/cardano-b_-c0de99f0ccd585cd'...
remote: Enumerating objects: 5714, done.
remote: Counting objects: 100% (1708/1708), done.
remote: Compressing objects: 100% (787/787), done.
remote: Total 5714 (delta 947), reused 1366 (delta 703), pack-reused 4006
Receiving objects: 100% (5714/5714), 2.23 MiB | 221.00 KiB/s, done.
Resolving deltas: 100% (3212/3212), done.
HEAD is now at 4ea7e2d Merge pull request #241 from input-output-hk/lehins/safer-unsafehash
Cloning into '/home/bruce/coding/haskell/plutus-starter/dist-newstyle/src/cardano-c_-94cfeccbf1aa3cf5'...
remote: Enumerating objects: 1474, done.
remote: Counting objects: 100% (56/56), done.
remote: Compressing objects: 100% (37/37), done.
remote: Total 1474 (delta 15), reused 33 (delta 8), pack-reused 1418
Receiving objects: 100% (1474/1474), 477.32 KiB | 237.00 KiB/s, done.
Resolving deltas: 100% (614/614), done.
HEAD is now at 07397f0 Merge pull request #77 from input-output-hk/upgrade-to-cabal-3.4.0.0
Cloning into '/home/bruce/coding/haskell/plutus-starter/dist-newstyle/src/cardano-l_-acad124fece29d34'...
remote: Enumerating objects: 84331, done.
remote: Counting objects: 100% (6098/6098), done.
remote: Compressing objects: 100% (1931/1931), done.
remote: Total 84331 (delta 3014), reused 5793 (delta 2861), pack-reused 78233
Receiving objects: 100% (84331/84331), 40.53 MiB | 583.00 KiB/s, done.
Resolving deltas: 100% (47958/47958), done.
HEAD is now at bf008ce02 Merge pull request #2526 from input-output-hk/jc/fix-alonzo-txwits-again
Cloning into '/home/bruce/coding/haskell/plutus-starter/dist-newstyle/src/cardano-n_-870b8b2b68d602a2'...
remote: Enumerating objects: 104665, done.
remote: Counting objects: 100% (8595/8595), done.
remote: Compressing objects: 100% (1504/1504), done.
remote: Total 104665 (delta 7013), reused 8250 (delta 6809), pack-reused 96070
Receiving objects: 100% (104665/104665), 238.48 MiB | 457.00 KiB/s, done.
Resolving deltas: 100% (79775/79775), done.
HEAD is now at b6ca519f9 Merge #3311
Cloning into '/home/bruce/coding/haskell/plutus-starter/dist-newstyle/src/cardano-p_-98329c466570048a'...
remote: Enumerating objects: 1661, done.
remote: Counting objects: 100% (70/70), done.
remote: Compressing objects: 100% (46/46), done.
remote: Total 1661 (delta 24), reused 48 (delta 15), pack-reused 1591
Receiving objects: 100% (1661/1661), 406.20 KiB | 127.00 KiB/s, done.
Resolving deltas: 100% (754/754), done.
HEAD is now at fd773f7 Merge pull request #159 from input-output-hk/upgrade-to-cabal-3.4.0.0
Cloning into '/home/bruce/coding/haskell/plutus-starter/dist-newstyle/src/cardano-w_-c9e033b0ec7ad11b'...
remote: Enumerating objects: 160856, done.
remote: Counting objects: 100% (12295/12295), done.
remote: Compressing objects: 100% (3183/3183), done.
remote: Total 160856 (delta 8861), reused 11746 (delta 8536), pack-reused 148561
Receiving objects: 100% (160856/160856), 170.60 MiB | 1.03 MiB/s, done.
Resolving deltas: 100% (100259/100259), done.
HEAD is now at ae7569293 Merge #2908
Cloning into '/home/bruce/coding/haskell/plutus-starter/dist-newstyle/src/goblins-7fe4f5e9bbbd1224'...
remote: Enumerating objects: 442, done.
remote: Counting objects: 100% (19/19), done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 442 (delta 6), reused 16 (delta 6), pack-reused 423
Receiving objects: 100% (442/442), 129.36 KiB | 147.00 KiB/s, done.
Resolving deltas: 100% (176/176), done.
HEAD is now at cde90a2 Re-enable support for GHC 8.6.5
Cloning into '/home/bruce/coding/haskell/plutus-starter/dist-newstyle/src/iohk-moni_-c7ca6b005d6f76c5'...
remote: Enumerating objects: 9918, done.
remote: Counting objects: 100% (257/257), done.
remote: Compressing objects: 100% (142/142), done.
remote: Total 9918 (delta 93), reused 163 (delta 48), pack-reused 9661
Receiving objects: 100% (9918/9918), 35.04 MiB | 693.00 KiB/s, done.
Resolving deltas: 100% (5602/5602), done.
HEAD is now at 46f994e Merge pull request #623 from input-output-hk/cda_490_kafka_backend
Cloning into '/home/bruce/coding/haskell/plutus-starter/dist-newstyle/src/optparse-_-5b3aca9bcb30ab3a'...
remote: Enumerating objects: 4399, done.
remote: Counting objects: 100% (408/408), done.
remote: Compressing objects: 100% (230/230), done.
remote: Total 4399 (delta 222), reused 304 (delta 140), pack-reused 3991
Receiving objects: 100% (4399/4399), 1.15 MiB | 334.00 KiB/s, done.
Resolving deltas: 100% (2453/2453), done.
HEAD is now at 7497a29 Rename forked package
Cloning into '/home/bruce/coding/haskell/plutus-starter/dist-newstyle/src/ouroboros_-268d3b2310e5b441'...
remote: Enumerating objects: 203417, done.
remote: Counting objects: 100% (15422/15422), done.
remote: Compressing objects: 100% (3383/3383), done.
remote: Total 203417 (delta 11467), reused 14516 (delta 10774), pack-reused 187995
Receiving objects: 100% (203417/203417), 349.28 MiB | 1.06 MiB/s, done.
Resolving deltas: 100% (149240/149240), done.
HEAD is now at 1f4973f36 Merge #3409
Cloning into '/home/bruce/coding/haskell/plutus-starter/dist-newstyle/src/plutus-3b55de0732f6b166'...
remote: Enumerating objects: 119670, done.
remote: Counting objects: 100% (6432/6432), done.
remote: Compressing objects: 100% (2504/2504), done.
remote: Total 119670 (delta 3907), reused 5891 (delta 3597), pack-reused 113238
Receiving objects: 100% (119670/119670), 124.72 MiB | 1.07 MiB/s, done.
Resolving deltas: 100% (75336/75336), done.
HEAD is now at 3f089ccf0 [Builtin] Nest 'SomeConstantOf' inside 'Opaque' (#4153)
Cloning into '/home/bruce/coding/haskell/plutus-starter/dist-newstyle/src/plutus-ap_-cbcc5c6ab544aad6'...
remote: Enumerating objects: 116052, done.
remote: Counting objects: 100% (3308/3308), done.
remote: Compressing objects: 100% (1491/1491), done.
remote: Total 116052 (delta 1793), reused 2807 (delta 1561), pack-reused 112744
Receiving objects: 100% (116052/116052), 111.95 MiB | 1.19 MiB/s, done.
Resolving deltas: 100% (73619/73619), done.
HEAD is now at f6abf06f8 Merge pull request #62 from input-output-hk/ll/fix-auto-display-of-activated-contracts
Cloning into '/home/bruce/coding/haskell/plutus-starter/dist-newstyle/src/purescrip_-76d561c4df795bb9'...
remote: Enumerating objects: 1628, done.
remote: Counting objects: 100% (403/403), done.
remote: Compressing objects: 100% (193/193), done.
remote: Total 1628 (delta 185), reused 350 (delta 143), pack-reused 1225
Receiving objects: 100% (1628/1628), 319.47 KiB | 233.00 KiB/s, done.
Resolving deltas: 100% (753/753), done.
HEAD is now at 6a92d78 use a newer stackage
Cloning into '/home/bruce/coding/haskell/plutus-starter/dist-newstyle/src/servant-p_-e28973085ebef430'...
remote: Enumerating objects: 1409, done.
remote: Counting objects: 100% (368/368), done.
remote: Compressing objects: 100% (171/171), done.
remote: Total 1409 (delta 169), reused 343 (delta 151), pack-reused 1041
Receiving objects: 100% (1409/1409), 222.76 KiB | 190.00 KiB/s, done.
Resolving deltas: 100% (672/672), done.
HEAD is now at a0c7c7e Rename settings to spOpts_' in CodeGen.
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

Does "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)" matter?

No idea at all.

code-brewer avatar Mar 14 '22 08:03 code-brewer

I'm experiencing a similar issue of not having a dependency when building cardano-crypto-class. Not exactly the problem that you guys posted, but how do we make sure we don't have these dependency issues?

My build environment is within Docker using the plutus-apps devcontainer that I updated from the official devcontainer which is 5 months out-of-date: https://hub.docker.com/repository/docker/bjing/plutus-devcontainer

The project being built is IOG's plutus-starter sample project on the same commit hash on which my devcontainer was built, i.e. 13836ecf59649ca522471417b07fb095556eb981.

bash-4.4# cabal build
HEAD is now at 814df2c14 Merge #3458
HEAD is now at bb4ed71 Merge pull request #158 from input-output-hk/nc/drop-strict
HEAD is now at a5085acbd Merge #3081
HEAD is now at cde90a2 Re-enable support for GHC 8.6.5
HEAD is now at 46f994e Merge pull request #623 from input-output-hk/cda_490_kafka_backend
HEAD is now at 7497a29 Rename forked package
HEAD is now at d2d219a86 Merge #3551
HEAD is now at cc72a56ea SCP-3247 (#4335)
HEAD is now at 13836ecf5 Print error message when passing a non-existant socket path in the PAB (#323)
HEAD is now at 47a1f11 Add import lines for custom instances
HEAD is now at 44e7cac Automatically add URL instances for API types
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...
Build profile: -w ghc-8.10.4.20210212 -O1
In order, the following will be built (use -v for more details):
 - cardano-crypto-class-2.0.0 (lib) (requires build)
 - cardano-crypto-wrapper-1.3.0 (lib) (requires build)
 - cardano-slotting-0.1.0.0 (lib) (requires build)
 - prettyprinter-configurable-0.1.0.0 (lib:prettyprinter-configurable) (requires build)
 - purescript-bridge-0.14.0.0 (lib) (requires build)
 - quickcheck-dynamic-0.1.0.0 (lib) (requires build)
 - statistics-0.15.2.0 (lib) (requires build)
 - strict-containers-0.1.0.0 (lib) (requires build)
 - strict-non-empty-containers-2020.12.8 (lib) (requires build)
 - strict-stm-0.1.0.0 (lib) (requires build)
 - text-class-2022.1.18 (lib) (requires build)
 - tracer-transformers-0.1.0.1 (lib) (requires build)
 - typed-protocols-0.1.0.0 (lib) (requires build)
 - word-array-0.1.0.0 (lib) (requires build)
 - compact-map-0.1.0.0 (lib) (requires build)
 - cardano-crypto-praos-2.0.0 (lib) (requires build)
 - cardano-ledger-byron-0.1.0.0 (lib) (requires build)
 - cardano-crypto-test-1.3.0 (lib) (requires build)
 - servant-purescript-0.9.0.2 (lib) (requires build)
 - statistics-linreg-0.3 (lib:statistics-linreg) (requires build)
 - small-steps-0.1.0.0 (lib) (requires build)
 - iohk-monitoring-0.2.0.0 (lib) (requires build)
 - typed-protocols-cborg-0.1.0.0 (lib) (requires build)
 - plutus-core-0.1.0.0 (lib) (requires build)
 - cardano-data-0.1.0.0 (lib) (requires build)
 - network-mux-0.1.0.0 (lib) (requires build)
 - small-steps-test-0.1.0.0 (lib) (requires build)
 - lobemo-backend-ekg-0.1.0.1 (lib) (requires build)
 - freer-extras-0.1.0.0 (lib) (requires build)
 - cardano-wallet-test-utils-2022.1.18 (lib) (requires build)
 - cardano-wallet-launcher-2022.1.18 (lib) (requires build)
 - plutus-tx-0.1.0.0 (lib) (requires build)
 - cardano-ledger-core-0.1.0.0 (lib) (requires build)
 - ouroboros-network-testing-0.1.0.0 (lib) (requires build)
 - byron-spec-ledger-0.1.0.0 (lib) (requires build)
 - plutus-tx-plugin-0.1.0.0 (lib) (requires build)
 - plutus-ledger-api-0.1.0.0 (lib) (requires build)
 - set-algebra-0.1.0.0 (lib) (requires build)
 - ouroboros-network-framework-0.1.0.0 (lib) (requires build)
 - byron-spec-chain-0.1.0.0 (lib) (requires build)
 - cardano-protocol-tpraos-0.1.0.0 (lib) (requires build)
 - ouroboros-network-0.1.0.0 (lib) (requires build)
 - cardano-ledger-byron-test-1.3.0 (lib) (requires build)
 - cardano-ledger-shelley-0.1.0.0 (lib) (requires build)
 - ouroboros-consensus-0.1.0.0 (lib) (requires build)
 - cardano-ledger-shelley-ma-0.1.0.0 (lib) (requires build)
 - ouroboros-consensus-protocol-0.1.0.0 (lib) (requires build)
 - ouroboros-consensus-byron-0.1.0.0 (lib) (requires build)
 - cardano-ledger-alonzo-0.1.0.0 (lib) (requires build)
 - ouroboros-consensus-shelley-0.1.0.0 (lib) (requires build)
 - cardano-ledger-pretty-0.1.0.0 (lib) (requires build)
 - ouroboros-consensus-cardano-0.1.0.0 (lib) (requires build)
 - cardano-ledger-shelley-test-0.1.0.0 (lib) (requires build)
 - cardano-api-1.33.0 (lib) (requires build)
 - cardano-wallet-core-2022.1.18 (lib) (requires build)
 - cardano-api-1.33.0 (lib:gen) (requires build)
 - cardano-wallet-cli-2022.1.18 (lib) (requires build)
 - plutus-ledger-0.1.0.0 (lib) (requires build)
 - cardano-wallet-core-integration-2022.1.18 (lib) (requires build)
 - cardano-wallet-2022.1.18 (lib) (requires build)
 - plutus-ledger-constraints-0.1.0.0 (lib) (requires build)
 - plutus-chain-index-core-0.1.0.0 (lib) (requires build)
 - plutus-contract-0.1.0.0 (lib) (requires build)
 - plutus-chain-index-0.1.0.0 (lib) (requires build)
 - playground-common-0.1.0.0 (lib) (requires build)
 - plutus-starter-0.1.0.0 (lib) (first run)
 - plutus-pab-0.1.0.0 (lib) (requires build)
 - plutus-starter-0.1.0.0 (test:plutus-example-projects-test) (first run)
 - plutus-starter-0.1.0.0 (exe:plutus-starter-pab) (first run)
Configuring library for cardano-crypto-class-2.0.0..
Preprocessing library for cardano-crypto-class-2.0.0..
running dist/build/Cardano/Crypto/Libsodium/Constants_hsc_make failed (exit code 127)
rsp file was: "dist/build/Cardano/Crypto/Libsodium/hsc2hscall15560-3.rsp"
output file:"dist/build/Cardano/Crypto/Libsodium/Constants.hs"
command was: dist/build/Cardano/Crypto/Libsodium/Constants_hsc_make  >dist/build/Cardano/Crypto/Libsodium/Constants.hs
error: dist/build/Cardano/Crypto/Libsodium/Constants_hsc_make: error while loading shared libraries: libnuma.so.1: cannot open shared object file: No such file or directory

bjing avatar Mar 23 '22 04:03 bjing

Sounds like a https://github.com/input-output-hk/plutus-starter error then?

ch1bo avatar Apr 28 '22 13:04 ch1bo

We have three different comments about the issue: the first one mentions plutus-apps and the other two plutus-starter. This doesn't appear to be a plutus issue, hence I'm closing this issue. Feel free to reopen if you disagree.

effectfully avatar Jan 31 '23 23:01 effectfully