Cross-compiling a flatpak
Gunnar Andersson
gandersson at genivi.org
Mon Mar 26 12:46:36 UTC 2018
Replying to digest (this time with changed subject, at least...)
> Date: Fri, 23 Mar 2018 16:18:28 +0000
> From: Corentin Noël <corentin.noel at collabora.com>
> To: Alexander Larsson <alexl at redhat.com>
> Cc: Guillaume Charles Tucker <guillaume.tucker at collabora.co.uk>,
> flatpak at lists.freedesktop.org, Gustavo Noronha
> <gustavo.noronha at collabora.co.uk>
> Subject: Re: Cross-compiling a flatpak
> Message-ID:
> <af2f5f921afe0b7eb608f4ac166b7adfcd901839.camel at collabora.com>
> Content-Type: text/plain; charset="UTF-8"
>
> The issue here is that, even if it is working for some simple
> applications, it might not work for some big projects as it is not a
> real cross-compilation.
> I was indeed looking for cross-compilation with a native cross-
> toolchain (as in producing executables working on a different
> architecture than the compiler), I wonder why it would be that tricky
> with Flatpak as it has the advantage to already get a complete control
> of the base libraries and the toolchain.
+1. Have you looked at:
https://github.com/search?utf8=✓&q=meta-flatpak ?
for meta-openembedded/Yocto usage? (klihub/ was the original but there's a
fork and a fresh implementation it looks like).
> Native cross-compilation also offers some advantages like supporting
> more architectures and having a way faster compilation.
> So to me even if foreign-architecture emulation looks attractive for
> its ease to use, the benefits of the native cross-compilation exceeds
> it in many cases.
I agree. Yocto could be used to create the SDK and runtime (I suppose like
Yocto was used for building the first GNOME flatpak runtimes). Agree also
with Christian's email starting the discussion on naming and organization.
How to easily make your own runtimes? I know the standard answer: "Don't
make your own runtimes!!" :-) That's OK for our desktops. For embedded
systems it is where things must start, and an easy process to do so for many
hardware architectures and different embedded distros would be valuable.
>
> Le vendredi 23 mars 2018 à 08:35 +0100, Alexander Larsson a écrit :
> > Cross building is very tricky and needs a lot of custom code.
> > Supporting that in a generic way is going to be a massive pain. I
> > mean, just look at yocto (warning, might go blind).
...which is why Yocto still needs to be leveraged rather than doing that
again, *if* you want to go down the road of cross-compilation. There are
some heroes out there willing to risk their eyes and sanity ;-)
On topic - we're already using bwrap, built with meta-flatpak recipes as an
easy and powerful way to box in apps/processes. Next would be flatpak-
based development (flatpak-builder), packaging and deployment, which is something I still believe in, but it will require some effort.
For what it's worth.
- Gunnar
*P.S. I switched to MIME digests after this - threading should be improved
on later emails I hope.
--
Gunnar Andersson <gandersson at genivi.org>
Development Lead
GENIVI Alliance
More information about the Flatpak
mailing list