From: ludo@gnu.org (Ludovic Courtès)
To: Paul Boddie <paul@boddie.org.uk>
Cc: help-guix@gnu.org
Subject: Re: Cross-building GuixSD (and maybe using pre-built toolchains)
Date: Wed, 31 Aug 2016 22:04:35 +0200 [thread overview]
Message-ID: <87inugn1rg.fsf@gnu.org> (raw)
In-Reply-To: <201608302326.38349.paul@boddie.org.uk> (Paul Boddie's message of "Tue, 30 Aug 2016 23:26:38 +0200")
Hi Paul,
Paul Boddie <paul@boddie.org.uk> skribis:
>> > Are there any recommended methods of running guix-daemon in a chroot and
>> > have it create new chroots, or do I have to use some kind of
>> > virtualisation or container technology? Is any kind of
>> > fakeroot/fakechroot mechanism supported?
>>
>> I think few people do this, on the grounds that Guix is rather
>> non-intrusive: it stores all its stuff in /gnu/store and /var/guix. So
>> if you want to get rid of it, all you have to do is delete those two
>> directories. The rest of the system is untouched.
>>
>> Now, if you really want it, I can’t think of any reason why guix-daemon
>> wouldn’t run in a chroot. It currently requires root privileges,
>> precisely so that it can set up a chroot, separate name spaces, and so
>> on, but that could work in a chroot too.
>
> OK. I tend to run things in chroots for basic protection against things
> deciding to install stuff in places I would rather keep "clean", and to use
> different distro versions and packages.
Precisely: Guix only ever touches /gnu/store, /var/guix, and optionally
/etc/guix; nothing else, I swear. ;-)
> I noticed that Arch Linux and its relative Parabola GNU/Linux support the
> target machine using distcc as a client and having distcc servers cross-
> compile code for the target architecture. That seems to require the
> coordinating host to be running Arch/Parabola, which then means that some
> bootstrapping needs to be done already. Could a similar thing be done with
> GuixSD?
Yes, using offloading:
https://www.gnu.org/software/guix/manual/html_node/Daemon-Offload-Setup.html
If your master node is x86_64 and its machines.scm lists a mips64el
machine as in the example above, then “guix build foo -s mips64el-linux”
automatically offloads to that mips machine. (This is the mechanism our
hydra.gnu.org build farm uses.)
>> That’s also an option: you can simply cross-build the packages that you
>> need and copy them to the target machine.
>>
>> We make sure core packages can be cross-built to the architectures we
>> support (currently x86_64, i686, armhf, and mips64el). However, there’s
>> no guarantee that cross-building works for other targets, or that
>> non-core packages cross-build at all. We’d definitely welcome patches
>> in this area, though. :-)
>
> Right. So you'd cross-build things like the kernel, libc, gcc, binutils, maybe
> some other things (the bootstrapping discussed above). Then bring up the
> target machine and hopefully have enough to start building packages somehow.
> Does that sound correct?
When bootstrapping a new architecture, we cross-build the relevant
“bootstrap binaries”, which are statically-linked tools such as GCC,
Guile, as well as libc, and from there we can start building natively:
https://www.gnu.org/software/guix/manual/html_node/Porting.html
Ludo’.
next prev parent reply other threads:[~2016-08-31 20:04 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-30 21:26 Cross-building GuixSD (and maybe using pre-built toolchains) Paul Boddie
2016-08-31 20:04 ` Ludovic Courtès [this message]
2016-08-31 21:49 ` Paul Boddie
2016-09-01 8:10 ` Ludovic Courtès
2016-09-01 15:51 ` Paul Boddie
2016-09-01 19:43 ` Ludovic Courtès
2016-09-02 18:52 ` David Craven
2016-09-03 12:56 ` Ludovic Courtès
2016-09-03 12:59 ` David Craven
2016-09-03 21:18 ` Ludovic Courtès
2016-09-03 21:27 ` David Craven
-- strict thread matches above, loose matches on Subject: below --
2016-08-31 16:15 David Craven
2016-08-31 20:08 ` Ludovic Courtès
2016-08-31 22:01 ` David Craven
2016-08-31 22:13 ` David Craven
2016-09-01 8:17 ` Ludovic Courtès
2016-09-01 10:11 ` David Craven
2016-09-01 11:16 ` Ludovic Courtès
2016-09-01 11:59 ` Ludovic Courtès
2016-07-03 14:51 Paul Boddie
2016-07-04 13:48 ` Ludovic Courtès
2016-07-05 8:10 ` Efraim Flashner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87inugn1rg.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=help-guix@gnu.org \
--cc=paul@boddie.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.