for some reason i'm unable to compile cabal projects related to cardano projects on this system. not sure what could of changed recently as aside from recent system updates i haven't changed much. or anything at all for that matter related to haskell or cardano development.

I first noticed it when i was unable to build the atlas examples. however now i'm getting this error even when trying to compile the cardano-node/cli repo by running the cabal build all command.

❯ cabal build all
Warning: Requested index-state 2023-07-21T13:00:00Z is newer than
'cardano-haskell-packages'! Falling back to older state
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] next goal: cardano-cli (user goal)
[__0] rejecting: cardano-cli-, cardano-cli-,
cardano-cli-, cardano-cli-8.2.1, cardano-cli-8.2.0 (constraint from
user target requires ==8.1.2)
[__0] trying: cardano-cli-8.1.2
[__1] trying: ouroboros-consensus-protocol- (dependency of cardano-cli)
[__2] trying: cardano-crypto-tests- (dependency of
[__3] next goal: cardano-crypto-praos (dependency of cardano-crypto-tests)
[__3] rejecting: cardano-crypto-praos-, cardano-crypto-praos-,
cardano-crypto-praos-, cardano-crypto-praos-,
cardano-crypto-praos-, cardano-crypto-praos-,
cardano-crypto-praos-, cardano-crypto-praos-2.0.0 (conflict:
pkg-config package libsodium-any, not found in the pkg-config database)
[__3] fail (backjumping, conflict set: cardano-crypto-praos,
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: cardano-crypto-praos,
cardano-crypto-tests, ouroboros-consensus-protocol, cardano-cli
Try running with --minimize-conflict-set to improve the error message

versions of ghc / cabal and environment variables.

❯ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.10.7
❯ cabal --version
cabal-install version
compiled using version of the Cabal library 
❯ printenv | grep -i _path
❯ pkg-config --list-all | grep -i libsodium
libsodium                      libsodium - A modern and easy-to-use crypto library
❯ tree /usr/local/lib
├── libblst.a
├── libsecp256k1.a
├── libsecp256k1.la
├── libsecp256k1.so -> libsecp256k1.so.0.0.0
├── libsecp256k1.so.0 -> libsecp256k1.so.0.0.0
├── libsecp256k1.so.0.0.0
├── libsodium.a
├── libsodium.la
├── libsodium.so -> libsodium.so.23.3.0
├── libsodium.so.23 -> libsodium.so.23.3.0
├── libsodium.so.23.3.0
└── pkgconfig
    ├── libblst.pc
    ├── libsecp256k1.pc
    └── libsodium.pc


❯ cat /usr/local/lib/pkgconfig/libsodium.pc

Name: libsodium
Version: 1.0.18
Description: A modern and easy-to-use crypto library

Libs: -L${libdir} -lsodium
Libs.private:  -pthread 
Cflags: -I${includedir}
  • I am getting the same issue on nixOS. libsodium is marked as broken in nixpkgs Apr 23 at 7:29

1 Answer 1


Got it to compile successfully again. If you are using fedora 39 then you are going to be stuck using pkg-config version 1.9.5 (or at least that was the version i had at the time of this post) In the repos i wasn't able to downgrade or upgrade. so i went to the pkg-config repo where i was able to checkout the 2.0 tag and build, compile and install pkg-config. confirmed that the version was 2.0 and went back to the cardano-node repo and ran cabal build all and it is compiling successfully again. hope this is helpful to someone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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