GNU bug report logs - #77033
Deploy to machine with different architecture

Previous Next

Package: guix-patches;

Reported by: Sergey Trofimov <sarg <at> sarg.org.ru>

Date: Sat, 15 Mar 2025 12:01:01 UTC

Severity: normal

Tags: patch

Full log


Message #26 received at 77033 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Sergey Trofimov <sarg <at> sarg.org.ru>
Cc: ludo <at> gnu.org, Roman Scherer <roman.scherer <at> burningswell.com>,
 77033 <at> debbugs.gnu.org
Subject: Re: [PATCH] deploy: Support --target and --system.
Date: Fri, 21 Mar 2025 11:12:27 +0900
Hi Sergey,

Sergey Trofimov <sarg <at> sarg.org.ru> writes:

[...]

>> Perhaps 'guix deploy' could have a '--cross-build' option, or the record
>> could have a 'cross-build?' field, or both, with the CLI taking
>> precedence over the later, and the target type would be inferred from
>> the system via platform-system->target?
>>
>
> Consider such case:
>
> deployer = x86_64, (aarch64 via binfmt)
> builder1 = x86_64, (aarch64 via binfmt)
> builder2 = aarch64, (x86_64 via binfmt)
> remote1 = x86_64
> remote2 = aarch64
>
> The user intends to run `guix deploy all-remotes.scm` on `deployer` to
> deploy both `remote1` and `remote2`.
>
> There are many ways how to build the derivations - deployer and builders
> could all build native/emulated/cross, remotes could build for
> themselves (`build-locally?` to `#f`). I am not sure to what extent this
> should be configurable, however here are a couple things I'd change:
> - add `platform` to `machine` record
> - remove `system` from `machine-ssh-configuration`
> - remove `build-locally?` from `machine-ssh-configuration`
> - add `build-options` to `machine`
>   - `build-host` = `local|offload|remote`
>   - `build-type` = `native|cross`

This seems reasonable; I suppose 'remote' means the machine being
deployed to?

`build-type` having just two values, it could be more simply expressed
as a boolean (e.g.; cross-build?)

> Additionally `guix-daemon` should know all the systems the host
> supports. Currently it knows only the native one (`--system` parameter).

I've never used such feature, so I wouldn't know of how useful that
would be :-).  Perhaps useful if the machine is to be used exclusively
for cross-compiling by default?  You could also set that via 'export
GUIX_BUILD_OPTIONS=--target=$gnu-triplet', no?

-- 
Thanks,
Maxim




This bug report was last modified 88 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.