How to build cardano-addresses-cli?

Does anyone know what needs to be added to cabal.project.local to get cardano-addresses-cli to build when building cardano-node?

I have tried adding the following to my cabal.project.local file:

  source-repository-package
    type: git
    location: https://github.com/intersectmbo/cardano-addresses
    tag: 3.12.0
    subdir:
      command-line
      core

Then I also tried adding:

  allow-newer:
    *:aeson

But these result in Cabal dependency errors like:

Error: cabal: Could not resolve dependencies:
[__0] trying: Cabal-3.12.0.0 (user goal)
[__1] trying: unix-2.8.4.0/installed-7d04 (dependency of Cabal)
[__2] trying: transformers-0.6.1.0/installed-c5fa (dependency of Cabal)
[__3] trying: time-1.12.2/installed-9d67 (dependency of Cabal)
[__4] trying: pretty-1.1.3.6/installed-6dc8 (dependency of Cabal)
[__5] trying: mtl-2.3.1/installed-621b (dependency of Cabal)
[__6] trying: base-4.19.1.0/installed-eafb (dependency of Cabal)
[__7] next goal: cardano-addresses-cli (user goal)
[__7] rejecting: cardano-addresses-cli-3.12.0 (conflict:
mtl==2.3.1/installed-621b, cardano-addresses-cli => mtl>=2.2.2 && <2.3)
[__7] fail (backjumping, conflict set: cardano-addresses-cli, mtl)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: aeson, template-haskell,
semigroupoids, base, semialign, semialign:semigroupoids, time, th-abstraction,
transformers, cardano-addresses-cli, Cabal, mtl, unix, integer-gmp, pretty,
Cabal:setup.base
Try running with --minimize-conflict-set to improve the error message.

Note:

  1. I can build cardano-node, cardano-cli, cardano-submit-api, and bech32 without problem. What I am trying to do is also build cardano-addresses-cli alongside these. There doesn’t seem to be anywhere that explains how to do this. IE: What needs to be added to your cabal.project.local file.
  2. The readme on cardano-addresses repository is useless because its only build instruction is: `$ docker build -t cardano-address .’
  3. I don’t want to use docker. I actually want to build the cardano-addresses-cli binary so that I can install it wherever I want, without docker.

What version of GHC are you using? ghc-9.6 should work.

For me, this has just worked:
screenshot-2024-07-02-00:53:43

$ git clone https://github.com/IntersectMBO/cardano-addresses.git
$ cd cardano-addresses/
$ ghcup list -c installed

Using the recommended versions – ghc 9.4.8 and cabal 3.10.3.0.

$ cabal update
$ cabal build cardano-address

screenshot-2024-07-02-00:59:03
screenshot-2024-07-02-00:59:39

1 Like

By the way: A bit annoying that the last release has been almost a year ago. … and the current version still reports the same version number just with a different Git commit:
screenshot-2024-07-02-01:19:49
It actually behaves very different than the last released 3.12.0 version. One reason I started compiling it from source is that the last release cannot do recovery phrases with additional password while the latest from main branch can.

1 Like

OK. So just building it separately I guess is the way. I had noticed that guild-operators build-all.sh script was adding stuff to cabal.project.local and thought that must be the way somehow.

I suppose I need to make another separate deb package for cardano-addresses-cli then.

By the way @HeptaSean I saw on twitter that you wanted cardano-node, cardano-cli binaries for ARM. I do build these myself for ARM into deb packages and there are instructions for how to do this on my GitHub site. I used to also put the latest binary debs into a repository on GitHub for easy: apt install cardano-node cardano-cli. I can do that again if people want them and I don’t need funding from Catalyst. Though, of course, people would then be trusting my compilation. I always build the debs in an up to date Debian stable virtual machine on both ARM and AMD 64 platforms. And I also have created deb packages for the specific IOG versions of libsodium, libsecp and libblst.

1 Like

Thanks, but I need them on Arch Linux ARM. Could perhaps do something with Debian packages, but, well that’s also kind of hackish.

But I will have a look at your Github. And at the guys with the Catalyst proposal. (I don’t think it’s that bad to request a rather moderate amount through Catalyst for stuff like that.)

I don’t have any issue with people seeking catalyst funding for doing work. I was simply making the point that I will continue to build these deb packages and I won’t request any funding for my work because I will do it anyway.

If you don’t want the deb package but only the binary executable then you can easily rip apart the deb and just copy the binary. See for example: https://www.cyberciti.biz/faq/how-to-extract-a-deb-file-without-opening-it-on-debian-or-ubuntu-linux/

1 Like

I just had a brief look at how to build Arch pacman packages and that is another whole different packaging system I am not familiar with. I already struggle making Debian packages and these are not even proper “professional” debs because they don’t have man pages for all the executables nor the proper copyright files included.

Don’t even know if there are man pages. But having the bash-completion stuff in the packages and just work out of the box would probably be cool.

Thanks for reminding me about that. I will look into getting the bash-completions to work out of the box in my debs. I haven’t bothered with that yet.

1 Like