GNU bug report logs -
#77033
Deploy to machine with different architecture
Previous Next
Full log
Message #29 received at 77033 <at> debbugs.gnu.org (full text, mbox):
Hi Maxim,
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
> 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?
>
That's right.
> `build-type` having just two values, it could be more simply expressed
> as a boolean (e.g.; cross-build?)
>
It's a matter of preference. Enums are extensible, bools are not.
>> 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?
You've mentioned it in the previous mail:
> In my experience, assuming a powerful x86_64 workstation,
> cross-compilation > native-compilation (on lower spec ARM machine) >
> emulated native compilation (QEMU).
Cross compilation should be preferred when deploying from a powerful
machine to a smallest hetzner's ARM VM. The host is not used exclusively
for cross-building in such case.
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.