Subject: Re: [PATCH] deploy: Support --target and --system.

From: Maxim Cournoyer <[email-masked]>
Date: Sat, 22 Mar 2025 16:39:44 +0900

Hi Roman,

Roman Scherer <[email-masked]> writes:

> Hi Sergey,
>
> I tried building libxcrypt on an aarch64 system with the following command:
>
> ```
> guix build --system=x86_64-linux /gnu/store/0ma7qrdd5pz8421rka75mvmvhkvn1rld-libxcrypt-4.4.36.drv -v 5
> The following derivation will be built:
>   /gnu/store/0ma7qrdd5pz8421rka75mvmvhkvn1rld-libxcrypt-4.4.36.drv
> building /gnu/store/0ma7qrdd5pz8421rka75mvmvhkvn1rld-libxcrypt-4.4.36.drv...
> qemu-x86_64: QEMU internal SIGSEGV {code=MAPERR, addr=0x20}
> ```

That looks like a QEMU bug.  If you'd like it resolved, I'd open the
issue with them, at <https://gitlab.com/qemu-project/qemu/-/issues>.

> Not sure, why it's crashing. I haven't found the logs for it on my
> system. The log file for the derivation is empty. I see this in my
> guix-daemon.log file:
>
> ```
> 2025-03-21 09:17:08 SIGPOLL
> 2025-03-21 09:17:08 unexpected build daemon error: interrupted by the user
> 2025-03-21 09:17:10 accepted connection from pid 27118, user roman
> ```
>
> Anything else I could try?

An actual x86_64 machine to use as an offload machine, if you have
access to one :-).  You could also try '--target=x86_64-linux-gnu'
instead of '--system', to attempt cross-compiling it for x86_64.  If
supported by the involved build systems in Guix, that should be more
reliable than QEMU.

-- 
Thanks,
Maxim