Subject: bug#50264: ca-certificate-bundle fails to build

From: Ludovic Courtès <[email-masked]>
Date: Sat, 04 Sep 2021 18:27:29 +0200

Hi,

Lars-Dominik Braun <[email-masked]> skribis:

> Hi,
>
> I’ve seen this multiple times now, most recently with commit
> 8ef38cd1bf7ec17b8d1bc1c0bcb42ac30ac30406 on a foreign system: Some
> operation, here a `guix pack` tries to build ca-certificate-bundle and
> it fails the first time, but rerunning the same operation succeeds:
>
> ---snip---
> -builder for `/gnu/store/iqm2zwq8jrr9gaw5jp4vs42j887aglmk-ca-certificate-bundle.drv' failed with exit code 1
> Erstellung von /gnu/store/iqm2zwq8jrr9gaw5jp4vs42j887aglmk-ca-certificate-bundle.drv fehlgeschlagen
> Das Erstellungsprotokoll kann unter „/var/log/guix/drvs/iq/m2zwq8jrr9gaw5jp4vs42j887aglmk-ca-certificate-bundle.drv.bz2“ eingesehen werden.
> cannot build derivation `/gnu/store/riw7sfkl8a5rapyvf6vvh07cwv3nrwil-profile.drv': 1 dependencies couldn't be built
> cannot build derivation `/gnu/store/l8zdf69zk0pg599gifcyxbd80h676yp1-python-jupyterlab-bash-coreutils-docker-pack.tar.zst.drv': 1 dependencies couldn't be built
> guix pack: Fehler: build of `/gnu/store/l8zdf69zk0pg599gifcyxbd80h676yp1-python-jupyterlab-bash-coreutils-docker-pack.tar.zst.drv' failed
> ---snap---
>
> The backtrace looks like this:
>
> ---snip---
> Backtrace:
>            2 (primitive-load "/gnu/store/74i539y9b0bvslk3bk0kc27q76p?")
> In ice-9/eval.scm:
>     619:8  1 (_ #f)
> In unknown file:
>            0 (setlocale 6 "en_US.utf8")
>
> ERROR: In procedure setlocale:
> In procedure setlocale: Invalid argument
> ---snap---

Is this the backtrace found in the build log (under /var/log/guix/drvs)?

I tried and failed to reproduce it like this:

--8<---------------cut here---------------start------------->8---
$ guix environment --ad-hoc nss-certs -n
La jena derivo estus konstruata:
   /gnu/store/i5s8jqzl52j38qmwqghjyp0v8p7dnlgd-profile.drv

$ guix gc -R /gnu/store/i5s8jqzl52j38qmwqghjyp0v8p7dnlgd-profile.drv |grep certificate
/gnu/store/n63a6h3dfhwnaas9pg35zk78qjhxbas9-cmake-curl-certificates.patch
/gnu/store/c8czsp9prfd73wvnyh595h0riqcllfqp-ca-certificate-bundle-builder
/gnu/store/wdnm4j88pxxkg0m72b58db24fghjizmz-ca-certificate-bundle.drv
$ guix build --rounds=10 /gnu/store/wdnm4j88pxxkg0m72b58db24fghjizmz-ca-certificate-bundle.drv
The following profile hook will be built:
   /gnu/store/wdnm4j88pxxkg0m72b58db24fghjizmz-ca-certificate-bundle.drv
building CA certificate bundle...
building CA certificate bundle...
building CA certificate bundle...
building CA certificate bundle...
building CA certificate bundle...
building CA certificate bundle...
building CA certificate bundle...
building CA certificate bundle...
building CA certificate bundle...
building CA certificate bundle...
successfully built /gnu/store/wdnm4j88pxxkg0m72b58db24fghjizmz-ca-certificate-bundle.drv
The following builds are still in progress:
  /gnu/store/wdnm4j88pxxkg0m72b58db24fghjizmz-ca-certificate-bundle.drv
  /gnu/store/wdnm4j88pxxkg0m72b58db24fghjizmz-ca-certificate-bundle.drv
  /gnu/store/wdnm4j88pxxkg0m72b58db24fghjizmz-ca-certificate-bundle.drv
  /gnu/store/wdnm4j88pxxkg0m72b58db24fghjizmz-ca-certificate-bundle.drv
  /gnu/store/wdnm4j88pxxkg0m72b58db24fghjizmz-ca-certificate-bundle.drv
  /gnu/store/wdnm4j88pxxkg0m72b58db24fghjizmz-ca-certificate-bundle.drv
  /gnu/store/wdnm4j88pxxkg0m72b58db24fghjizmz-ca-certificate-bundle.drv
  /gnu/store/wdnm4j88pxxkg0m72b58db24fghjizmz-ca-certificate-bundle.drv
  /gnu/store/wdnm4j88pxxkg0m72b58db24fghjizmz-ca-certificate-bundle.drv

/gnu/store/gwgja3hnmlajwxy6rqayf8yd937d8yi5-ca-certificate-bundle
--8<---------------cut here---------------end--------------->8---

Could you find a way to reproduce the issue?

Also, could you run ‘guix build glibc-utf8-locales --check’, so make
sure that store item is not corrupt?

I have:

--8<---------------cut here---------------start------------->8---
$ guix build glibc-utf8-locales 
/gnu/store/rgydar9dfvflqqz2irgh7njj34amaxc6-glibc-utf8-locales-2.31
$ guix hash -r $(guix build glibc-utf8-locales)
012a1vcvmhbrqr5kjbmf7qlgpbw2zv36rgj7rxh400dh8wlj97pi
$ wget -qO - https://ci.guix.gnu.org/rgydar9dfvflqqz2irgh7njj34amaxc6.narinfo |grep NarHash
NarHash: sha256:012a1vcvmhbrqr5kjbmf7qlgpbw2zv36rgj7rxh400dh8wlj97pi
--8<---------------cut here---------------end--------------->8---

TIA,
Ludo’.