Building for ARM systems

Dan Nicholson nicholson at endlessm.com
Mon Mar 13 15:55:00 UTC 2017


On Mon, Mar 13, 2017 at 10:08 AM, Aleix Pol <aleixpol at kde.org> wrote:
> On Tue, Mar 7, 2017 at 1:08 PM, Dan Nicholson <nicholson at endlessm.com> wrote:
>> On Tue, Mar 7, 2017 at 4:58 AM, Bastien Nocera <hadess at hadess.net> wrote:
>>> On Tue, 2017-03-07 at 03:05 +0100, Aleix Pol wrote:
>>>> Dear Flatpak'ers,
>>>> As some of you already know, I've been poking around trying to find
>>>> some kind of system where we can build the KDE runtime and
>>>> applications for ARM.
>>>
>>> For the applications, the fix is a package install on the build system,
>>> and a flatpak-builder option away. See this post as well as the
>>> original one:
>>> http://www.hadess.net/2016/10/flatpak-cross-compilation-support.html
>>
>> We use this QEMU setup at Endless for our ARM apps. It's slow but
>> works fine for apps. I think building a whole runtime would be
>> painful, but you could give it a shot.
>>
>> The details in Bastien's post is that if you have qemu-user-static
>> installed with the appropriate binfmts (usually provided in distro
>> packaging), then you can run binaries emulated for any architecture
>> QEMU supports. On linux-4.8+, the interpreter associated with the
>> binfmt is opened immediately by the kernel and kept open so it doesn't
>> need to live in the mount namespace setup by flatpak. Pass the
>> appropriate arch to flatpak-builder and it magically works.
>>
>> On older kernels you can still do it, but you have to somehow get the
>> interpreter path used in the binfmt definition included in the
>> sandbox. One way would be to include qemu-user-static in the SDK at
>> the same path as the host (e.g., /usr/bin/qemu-arm-static). What I did
>> at Endless was hack the binfmt definition to use /run/qemu-arm-static
>> and then add a bind mount from the host into the sandbox at that
>> location.
>
> Hi,
> So since nothing was really working and the cosmos doesn't seem to be
> keen on offering proper ARM systems, I decided to give it a go.
>
> Yet, I'm getting an error message at the first thing ever executed:
> execvp ./configure: No such file or directory
>
> Any idea what can be wrong?
>
> Aleix
>
> PS: I'm testing this on ubuntu yakkety (kernel 4.8.0) and the flatpak ppa

That indicates that you don't have the binfmt support enabled because
that essentially means that it can't run the ARM /bin/sh (I'm pretty
sure). Do you have /proc/sys/fs/binfmt_misc/qemu-arm? Does
/proc/sys/fs/binfmt_misc/status say "enabled"? Can you do something
simple like "flatpak build $build_dir bash"?



More information about the xdg-app mailing list