Folaht’s second attempt to build a package on Guix system - The one with two crates

Note: I’m doing a lot of reshuffling with my threads. This one was at one point my third attempt to build a package (ant-core), now it’s the second (ant-client). This is because I did not understand yet which package should build what and where I should have started.


This will be my attempt to create the ant package, a decentralized
network application built on nodes that receive cryptocoins for the data
they host, so very similar to filecoins, but this one tries to be more
advanced, more decentralized and more libre.

package.scm

;;; 2026 Yrop <folaht@protonmail.com>

(define-module (yrop packages ant node)
  #:use-module (guix build-system cargo)
  #:use-module (guix download)
  #:use-module (guix gexp)
  #:use-module ((guix licenses)
                #:prefix license:)
  #:use-module (guix packages))

(define rust-addr2line-0.25.1
  (crate-source "addr2line" "0.25.1"
                "0jwb96gv17vdr29hbzi0ha5q6jkpgjyn7rjlg5nis65k41rk0p8v"))
...
(define-public ant-client
  (package
    (name "ant-client")
    (version "0.2.10")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/WithAutonomi/ant-client")
             (commit (string-append name "-v" version))))
       (sha256
        (base32 "016qbrhhrbqxla1r5wcmik01kcn3r8dami7prm4pzxj3ilnynba5"))))
    (build-system cargo-build-system)
    (inputs (list rust-addr2line-0.25.1
 ...))
(synopsis "Autonomi Network Client")
    (description
     "A unified CLI and Rust library for storing data on the Autonomi decentralized network and managing Autonomi nodes")
    (home-page "https://aunotomi.com")
    (license (list license:asl2.0 license:expat))))

ant

But I’m stuck with this error:

$ guix build -f ./client.scm
...
warning: openssl-sys@0.9.117: configuring OpenSSL build: Command 'perl' not found. Is perl installed?
warning: openssl-sys@0.9.117: openssl-src: failed to build OpenSSL from source
error: failed to run custom build command for `openssl-sys v0.9.117`

Caused by:
  process didn't exit successfully: `/tmp/guix-build-ant-client-0.2.10.drv-0/source/target/release/build/openssl-sys-6514a101e260988e/build-script-main` (exit status: 1)
  --- stdout
  cargo:rustc-check-cfg=cfg(osslconf, values("OPENSSL_NO_OCB", "OPENSSL_NO_SM4", "OPENSSL_NO_SEED", "OPENSSL_NO_CHACHA", "OPENSSL_NO_CAST", "OPENSSL_NO_IDEA", "OPENSSL_NO_CAMELLIA", "OPENSSL_NO_RC4", "OPENSSL_NO_BF", "OPENSSL_NO_PSK", "OPENSSL_NO_DEPRECATED_3_0", "OPENSSL_NO_SCRYPT", "OPENSSL_NO_SM3", "OPENSSL_NO_RMD160", "OPENSSL_NO_EC2M", "OPENSSL_NO_OCSP", "OPENSSL_NO_CMS", "OPENSSL_NO_COMP", "OPENSSL_NO_SOCK", "OPENSSL_NO_STDIO", "OPENSSL_NO_EC", "OPENSSL_NO_SSL3_METHOD", "OPENSSL_NO_KRB5", "OPENSSL_NO_TLSEXT", "OPENSSL_NO_SRP", "OPENSSL_NO_SRTP", "OPENSSL_NO_RFC3779", "OPENSSL_NO_SHA", "OPENSSL_NO_NEXTPROTONEG", "OPENSSL_NO_ENGINE", "OPENSSL_NO_BUF_FREELISTS", "OPENSSL_NO_RC2"))
  cargo:rustc-check-cfg=cfg(openssl)
  cargo:rustc-check-cfg=cfg(libressl)
  cargo:rustc-check-cfg=cfg(boringssl)
  cargo:rustc-check-cfg=cfg(awslc)
  cargo:rustc-check-cfg=cfg(awslc_pregenerated)
  cargo:rustc-check-cfg=cfg(libressl250)
  cargo:rustc-check-cfg=cfg(libressl251)
  cargo:rustc-check-cfg=cfg(libressl252)
  cargo:rustc-check-cfg=cfg(libressl261)
  cargo:rustc-check-cfg=cfg(libressl270)
  cargo:rustc-check-cfg=cfg(libressl271)
  cargo:rustc-check-cfg=cfg(libressl273)
  cargo:rustc-check-cfg=cfg(libressl280)
  cargo:rustc-check-cfg=cfg(libressl281)
  cargo:rustc-check-cfg=cfg(libressl291)
  cargo:rustc-check-cfg=cfg(libressl310)
  cargo:rustc-check-cfg=cfg(libressl321)
  cargo:rustc-check-cfg=cfg(libressl332)
  cargo:rustc-check-cfg=cfg(libressl340)
  cargo:rustc-check-cfg=cfg(libressl350)
  cargo:rustc-check-cfg=cfg(libressl360)
  cargo:rustc-check-cfg=cfg(libressl361)
  cargo:rustc-check-cfg=cfg(libressl370)
  cargo:rustc-check-cfg=cfg(libressl380)
  cargo:rustc-check-cfg=cfg(libressl381)
  cargo:rustc-check-cfg=cfg(libressl382)
  cargo:rustc-check-cfg=cfg(libressl390)
  cargo:rustc-check-cfg=cfg(libressl400)
  cargo:rustc-check-cfg=cfg(libressl410)
  cargo:rustc-check-cfg=cfg(libressl420)
  cargo:rustc-check-cfg=cfg(libressl430)
  cargo:rustc-check-cfg=cfg(ossl101)
  cargo:rustc-check-cfg=cfg(ossl102)
  cargo:rustc-check-cfg=cfg(ossl102f)
  cargo:rustc-check-cfg=cfg(ossl102h)
  cargo:rustc-check-cfg=cfg(ossl110)
  cargo:rustc-check-cfg=cfg(ossl110f)
  cargo:rustc-check-cfg=cfg(ossl110g)
  cargo:rustc-check-cfg=cfg(ossl110h)
  cargo:rustc-check-cfg=cfg(ossl111)
  cargo:rustc-check-cfg=cfg(ossl111b)
  cargo:rustc-check-cfg=cfg(ossl111c)
  cargo:rustc-check-cfg=cfg(ossl111d)
  cargo:rustc-check-cfg=cfg(ossl300)
  cargo:rustc-check-cfg=cfg(ossl310)
  cargo:rustc-check-cfg=cfg(ossl320)
  cargo:rustc-check-cfg=cfg(ossl330)
  cargo:rustc-check-cfg=cfg(ossl340)
  cargo:rustc-check-cfg=cfg(ossl400)
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_NO_VENDOR
  X86_64_UNKNOWN_LINUX_GNU_OPENSSL_NO_VENDOR unset
  cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
  OPENSSL_NO_VENDOR unset
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_CONFIG_DIR
  X86_64_UNKNOWN_LINUX_GNU_OPENSSL_CONFIG_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_CONFIG_DIR
  OPENSSL_CONFIG_DIR unset
  cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-gnu
  CC_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_gnu
  CC_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CC
  HOST_CC = None
  cargo:rerun-if-env-changed=CC
  CC = Some(/gnu/store/bl3qw29h2582k7hpifm90g508z838swc-gcc-14.3.0/bin/gcc)
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
  CFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
  CFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=AR_x86_64-unknown-linux-gnu
  AR_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=AR_x86_64_unknown_linux_gnu
  AR_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_AR
  HOST_AR = None
  cargo:rerun-if-env-changed=AR
  AR = None
  cargo:rerun-if-env-changed=ARFLAGS
  ARFLAGS = None
  cargo:rerun-if-env-changed=HOST_ARFLAGS
  HOST_ARFLAGS = None
  cargo:rerun-if-env-changed=ARFLAGS_x86_64_unknown_linux_gnu
  ARFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=ARFLAGS_x86_64-unknown-linux-gnu
  ARFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=RANLIB_x86_64-unknown-linux-gnu
  RANLIB_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=RANLIB_x86_64_unknown_linux_gnu
  RANLIB_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_RANLIB
  HOST_RANLIB = None
  cargo:rerun-if-env-changed=RANLIB
  RANLIB = None
  cargo:rerun-if-env-changed=RANLIBFLAGS
  RANLIBFLAGS = None
  cargo:rerun-if-env-changed=HOST_RANLIBFLAGS
  HOST_RANLIBFLAGS = None
  cargo:rerun-if-env-changed=RANLIBFLAGS_x86_64_unknown_linux_gnu
  RANLIBFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=RANLIBFLAGS_x86_64-unknown-linux-gnu
  RANLIBFLAGS_x86_64-unknown-linux-gnu = None
  running cd "/tmp/guix-build-ant-client-0.2.10.drv-0/source/target/release/build/openssl-sys-cace4a1c7a0a818d/out/openssl-build/build/src" && env -u CROSS_COMPILE AR="ar" CC="/gnu/store/bl3qw29h2582k7hpifm90g508z838swc-gcc-14.3.0/bin/gcc" RANLIB="ranlib" "perl" "./Configure" "--prefix=/tmp/guix-build-ant-client-0.2.10.drv-0/source/target/release/build/openssl-sys-cace4a1c7a0a818d/out/openssl-build/install" "--openssldir=/usr/local/ssl" "no-shared" "no-module" "no-tests" "no-comp" "no-zlib" "no-zlib-dynamic" "--libdir=lib" "no-ssl3" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "linux-x86_64" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-w"
  cargo:warning=configuring OpenSSL build: Command 'perl' not found. Is perl installed?
  cargo:warning=openssl-src: failed to build OpenSSL from source

  --- stderr



  Error configuring OpenSSL build:
      Command 'perl' not found. Is perl installed?
      Command failed: cd "/tmp/guix-build-ant-client-0.2.10.drv-0/source/target/release/build/openssl-sys-cace4a1c7a0a818d/out/openssl-build/build/src" && env -u CROSS_COMPILE AR="ar" CC="/gnu/store/bl3qw29h2582k7hpifm90g508z838swc-gcc-14.3.0/bin/gcc" RANLIB="ranlib" "perl" "./Configure" "--prefix=/tmp/guix-build-ant-client-0.2.10.drv-0/source/target/release/build/openssl-sys-cace4a1c7a0a818d/out/openssl-build/install" "--openssldir=/usr/local/ssl" "no-shared" "no-module" "no-tests" "no-comp" "no-zlib" "no-zlib-dynamic" "--libdir=lib" "no-ssl3" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "linux-x86_64" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-w"



warning: build failed, waiting for other jobs to finish...
error: in phase 'build': uncaught exception:
%exception #<&invoke-error program: "cargo" arguments: ("build" "--offline" "-j" "4" "--release") exit-status: 101 term-signal: #f stop-signal: #f> 
phase `build' failed after 258.6 seconds
command "cargo" "build" "--offline" "-j" "4" "--release" failed with status 101
build process 6 exited with status 256
builder for `/gnu/store/y89c33dgrikwc56qaqlhlgidgf2qkkl2-ant-client-0.2.10.drv' failed with exit code 1
la compilation de /gnu/store/y89c33dgrikwc56qaqlhlgidgf2qkkl2-ant-client-0.2.10.drv a échoué
Vous trouverez le journal de compilation dans « /var/log/guix/drvs/y8/9c33dgrikwc56qaqlhlgidgf2qkkl2-ant-client-0.2.10.drv.gz ».
guix build: erreur : build of `/gnu/store/y89c33dgrikwc56qaqlhlgidgf2qkkl2-ant-client-0.2.10.drv' failed

Sometimes the information in there can help.

zless /var/log/guix/drvs/cd/3z8v46xqssi5z4fh7hy6z09wld6jpl-ant-core-0.3.0.drv.gz