Subject: Re: bug#75510: Building grub-image.png.drv fails with rsvg

From: Roman Scherer <[email-masked]>
Date: Tue, 21 Jan 2025 13:29:40 +0100

Hi vicvbcun,

thanks looking into this! Good to know when this started failing, but
I'm still lost understanding what the issue is, why it works without
grafts, or how to fix it.

Maybe Efraim has an idea? I put him on CC.

Thanks for your help!

Roman

vicvbcun <[email-masked]> writes:

> Hi,
>
> On 2025-01-12T10:58:54+0100, Roman Scherer wrote:
>>
>>Hello Guix,
>>
>>I can't reconfigure my (aarch64) system anymore. When building
>>/gnu/store/bpda8gfvxm6iv3mc6n8sf3ydxc5b6zi9-grub-image.png.drv I see the following backtrace:
>>
>>```
>>building /gnu/store/bpda8gfvxm6iv3mc6n8sf3ydxc5b6zi9-grub-image.png.drv...
>>Backtrace:
>>           2 (primitive-load "/gnu/store/3rcg4ann6607iqsh1aj84cqdnw8?")
>>In gnu/build/svg.scm:
>>     53:6  1 (svg->png "/gnu/store/41841pid2mmsvar44vy9xafsrf3cyb9i?" ?)
>>In unknown file:
>>           0 (rsvg-handle-render-cairo #<rsvg-handle fffff770ae60> #)
>>
>>ERROR: In procedure rsvg-handle-render-cairo:
>>Wrong type (expecting finalized smob): #<cairo-context fffff770ad90>
>>builder for `/gnu/store/bpda8gfvxm6iv3mc6n8sf3ydxc5b6zi9-grub-image.png.drv' failed with exit code 1
>>build of /gnu/store/bpda8gfvxm6iv3mc6n8sf3ydxc5b6zi9-grub-image.png.drv failed
>>View build log at '/var/log/guix/drvs/bp/da8gfvxm6iv3mc6n8sf3ydxc5b6zi9-grub-image.png.drv.gz'.
>>applying 4 grafts for asahi-scripts-20240623 ...
>>cannot build derivation `/gnu/store/mnavmxm513zwy16m1lyz2yppdgjbam3l-grub.cfg.drv': 1 dependencies couldn't be built
>>guix system: error: build of `/gnu/store/mnavmxm513zwy16m1lyz2yppdgjbam3l-grub.cfg.drv' failed
>>```
>>
>>Any ideas how to fix this?
>
> I have the same problem on my server, also aarch64-linux.  A minimal
> reproducer that fails on both my server and my laptop (x86_64-linux)
> is
>
>     guix build -s aarch64-linux -e '
>     (begin
>      (use-modules (gnu bootloader)
>                   (gnu bootloader grub))
>      ((@@ (gnu bootloader grub) grub-background-image)
>       (bootloader-configuration
>        (bootloader grub-efi-bootloader))))
>     '
>
> I have tried bisecting it with this (see the attached log) and ended
> up at commit
>     6975b1871b (gnu: rust-ring-0.17: Build source using trivial-build-system., 2024-12-15)
> If I revert this commit and additionally
>     584c79d5df (gnu: rust-ring-0.13: Build source using trivial-build-system., 2024-12-17)
>     57be7a0184 (gnu: rust-ring-0.14: Build source using trivial-build-system., 2024-12-17)
>     7db675130f (gnu: rust-ring-0.16: Build source using trivial-build-system., 2024-12-17)
> (make fails when reverting only 6975b1871b) on top of commit
>     87045f0982 (gnu: paritwine: Update to 0.2.1., 2025-01-17)
> I get no error.  No idea what that has to do with grafts though.
>
> vicvbcun
>
> [2. text/plain; bisect-log.txt]...