unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Christoph Buck <dev@icepic.de>
To: Richard Sent <richard@freakingpenguin.com>
Cc: help-guix@gnu.org
Subject: Re: Installing cross-compiled packages alongside a cross-compile toolchain
Date: Mon, 10 Jun 2024 13:51:27 +0200	[thread overview]
Message-ID: <877cexxbgg.fsf@icepic.de> (raw)
In-Reply-To: <87ed98rw6g.fsf@freakingpenguin.com> (Richard Sent's message of "Fri, 07 Jun 2024 22:43:35 -0400")

Richard Sent <richard@freakingpenguin.com> writes:

> Hi Christoph!

Hi Richard!

Christoph here (writing from a different mail address to up my mailing
list game).

> (I assume your inspiration was [1], but in my opinion this is
> different enough in both context and content to deserve its own
> section.)
> [...]
> [1]: https://guix.gnu.org/en/cookbook/en/guix-cookbook.html#Build-Manifest

Exactly. This was my inspiration. 

> I also unfortunately don't know of a better solution. I'm not fluent
> with how cross-compilation works in Guix, but I think it would be
> valuable proposing this (or something like it) as a patch and/or
> cookbook entry! It seems too useful to leave hidden away in the mailing
> list.

I agree. If my hack is the technical correct way to achieve this, it
should probably be documented somewhere. I took me (a newbe) some time
to figure it out. I certainly can help writing an entry for the
guix cookbook if desired, but i am not sure if i am the correct person
to do so. My technical understanding and jargon of guix is currently
quite limited. I don't even understand my hack in full, it was more or
less try and error and guestimate engineering.

> The closest I can think of is wrapping your Guix software as a package
> and using --target, but this is often too much of a barrier to entry
> when all you want is a simple development environment. 

Interestingly there is no `--target` option for the `guix shell`
command, only the `--system` option, which result in using qemu to
emulate the target platform. I guess because it usually does not make
sense to instantiate a development environment with cross-compiled
packages which can't be used/executed on the host platfom if host !=
target platform?

If i had to come up with a feature to support native cross-build
toolchains in `guix shell` i would probably add the `target` option.
This option would instantiate the gcc toolchain with a cross-compile
configuration for the host platform, but treat any package as
cross-compiled version, so that i can specify the additional
dependencies in a manifest file like i normally would.

> Anything making cross-compilation easier is a good thing in my eyes.

Yes i agree. Unfortunately cross-compilation still seems to be very
"experimental". I stumpled upon multiple bugs ([1],[2],[3]) in order to
get it to work at all. Luckily they were well known and documented
([1][2]) or easy to fix. ([3]).

All in all not a production ready replacement for yocto, but imho the
potential is there :)

Best regards

Christoph


[1] https://issues.guix.gnu.org/68058
[2] https://issues.guix.gnu.org/66866,
[3] https://issues.guix.gnu.org/71174





      reply	other threads:[~2024-06-12  8:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-21  8:43 Installing cross-compiled packages alongside a cross-compile toolchain Christoph Buck
2024-06-07 20:44 ` Thiago Jung Bauermann
2024-06-11 11:17   ` Christoph Buck
2024-06-08  2:43 ` Richard Sent
2024-06-10 11:51   ` Christoph Buck [this message]

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877cexxbgg.fsf@icepic.de \
    --to=dev@icepic.de \
    --cc=help-guix@gnu.org \
    --cc=richard@freakingpenguin.com \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).