Subject: Guix/Guile segfaults on `guix import texlive`

From: Akira Kyle <[email-masked]>
Date: Wed, 13 Jul 2022 22:24:39 -0600

Hi,

> I don’t think so; the error message that was reported is:
> 
>   command "svn" "export" "--non-interactive" "--trust-server-cert" "-r" "59745" "svn://www.tug.org/texlive/tags/texlive-2021.3/Master/texmf-dist/doc/latex/cite/" "/tmp/guix-directory.09UnsN/doc/latex/cite/" failed with signal 11
> 
> It’s a message from ‘report-invoke-error’ in (guix build utils).  It’s
> really svn that’s segfaulting.

I recently encountered this issue and did some digging. I don't think svn is actually segfaulting, just that the command svn doesn't exist so when 'system*' is called inside 'invoke' in (guix build utils) it for some reason gives signal 11.

On a recent guix system, I can reproduce this error by running 'guix import texlive' when inside 'guix shell guix --pure'. However there is no error when inside 'guix shell guix subversion --pure'. I think this is ultimately due to 'download-multi-svn-to-store' (and 'download-svn-to-store' but the texlive importer only calls the former) not setting '#:svn-command' when it calls 'build:svn-fetch' so it uses the default argument of 'svn' rather than trying to explicitly use an svn from the store.

Unfortunately my guile and gexp knowledge is quite lacking so I'm not sure that I have the know-how to create a patch to fix this, however hopefully this is enough for someone else to easily fix this issue.

Thanks,
Akira