Upgrade fails at compile cardano-node

I have tried a lot of things, hopefully I can capture them all. When I try to build the 1.35.3 code, it fails with the following errors:

...
HEAD is now at a56c96598 Delay SECP256k1 builtins to Chang (#4795)
HEAD is now at 181601b Merge pull request #4 from input-output-hk/coot/check-stylish
HEAD is now at 00ebe72 Added support for aeson-2.0, text-2.0, and GHC 9.2
Warning: Requested index-state 2022-02-18T00:00:00Z is newer than
'hackage.haskell.org'! Falling back to older state (2022-02-17T23:17:49Z).
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: cardano-crypto-class-2.0.0 (user goal)
[__1] rejecting: cardano-crypto-class:+secp256k1-support (conflict: pkg-config
package libsecp256k1-any, not found in the pkg-config database)
[__1] rejecting: cardano-crypto-class:-secp256k1-support (manual flag can only
be changed explicitly)
[__1] fail (backjumping, conflict set: cardano-crypto-class,
cardano-crypto-class:secp256k1-support)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: cardano-crypto-class,
cardano-crypto-class:secp256k1-support

I tried upgrading ghc to 9.4.1, and cabal to 3.8.1.0, cleaning the cardano-node repo pull, and trying again, that didn’t work (ghc --version returns 9.4.1 and I also tried 8.10.7).

Steps to reproduce:

  1. Clone repo into /home/stakepool/git/cardano-node
  2. Pull 1.35.3
  3. cabal configure
  4. Append lines to cabal.project.local (package, flags…)
  5. cabal build - I tried all, and I tried just cardano-cli and cardano-node

Then, I tried googling the errors I got, but none of the results worked to fix it.

I should add, I also tried to look at the pkg-conf errors, thought maybe I could find a package with apt-get to install, like libsecp256k1 or secp256k1, but no luck.

OK, it looks like secp256k1 is required in Linux, which is detailed here. This was downloaded from github and built and installed (reboot required). Next question: I am assuming that this library is required to run Cardano-Node, not just link and build the binaries. So I would assume that it has to be installed on every machine that runs Cardano-node, correct?

Right.

Look at the updated page, How to install cardano-node/-cli:

There you also find the new section Secp256k1

1 Like