Subject: Re: bug#75080: guix pull fails on arm64 due to cmake DEB self-tests

From: Simon Josefsson <[email-masked]>
Date: Wed, 05 Feb 2025 00:18:41 +0100

Ludovic Courtès <[email-masked]> writes:

> Hi,
>
> Simon Josefsson <[email-masked]> skribis:
>
>> I get a build failure regarding "cmake-bootstrap" shown here:
>>
>> https://gitlab.com/debdistutils/guix/container/-/jobs/8717616613
>>
>> I cannot reproduce this on my own arm64 machine running Trisquel.
>>
>> It seems only cmake's DEB related self-tests fail:
>
> Looks like the problem is gone with a current-ish commit since
> substitutes are available from both build farms:
>
> $ guix weather cmake-minimal -s aarch64-linux
...
> Could you confirm?

Maybe the substitutes are now gone, because I just tried again and the
error looks the same:

https://gitlab.com/debdistutils/guix/container/-/jobs/9042454855

If it got the binary substitutes, I suppose things would be fine.

Looking more carefully at the errors, I notice this part:

   actual-err>    cpack-cfg> set(DPKG_EXECUTABLE "/usr/bin/dpkg")
   actual-err>    cpack-cfg> set(READELF_EXECUTABLE "/gnu/store/pqai4n95zn5wdw430gslb00sb967jdg8-binutils-2.41/bin/readelf")

So for some reason building cmake-bootstrap in guix in Debian picks up
Debian's /usr/bin/dpkg, doesn't it?!

I suppose that Guix's build servers aren't running Debian, so it won't
find any /usr/bin/dpkg.

Maybe this has something to do with why it is only all the DEB-related
cmake self-tests that fails here.

(However it doesn't explain why I couldn't reproduce the same problem on
my own arm64 machine that is running Trisquel.  Maybe substitutes just
happened to be available when I tried it?)

The GitLab run above is in a minimal debian 12 container, and the
commands are essentially these:

  - apt-get update
  - apt-get install -y buildah ca-certificates eatmydata
  - time eatmydata buildah build -t ...

https://gitlab.com/debdistutils/guix/container/-/blob/101642fd8dd576ae9346d90bc1eb4d5ba4fcd80e/.gitlab-ci.yml#L36

With the Containerfile running essentially this:

set -x && \
cat /etc/os-release && \
locale -a && \
apt-get update && \
apt-get install -y guix netbase && \
(env LC_ALL=C.UTF-8 guix-daemon --disable-chroot --build-users-group=_guixbuild --discover=no &) && \
set && \
(guix pull --url=https://gitlab.com/debdistutils/guix/mirror.git \
 || { cp -v /var/log/guix/drvs/*/*.drv.gz .; gzip -d *.gz; tail -v -n1000 *.drv; false; })

https://gitlab.com/debdistutils/guix/container/-/blob/main/debian-with-guix/Containerfile

/Simon