<div dir="auto"><div><div class="gmail_extra"><div class="gmail_quote">On Mar 14, 2017 3:08 AM, "Alexander Larsson" <<a href="mailto:alexl@redhat.com">alexl@redhat.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="quoted-text">On Mon, 2017-03-13 at 22:31 -0500, Dan Nicholson wrote:<br>
> On Mar 13, 2017 9:19 PM, "Aleix Pol" <<a href="mailto:aleixpol@kde.org">aleixpol@kde.org</a>> wrote:<br>
><br>
</div><div class="quoted-text">> $ flatpak build sdk bash<br>
> execvp bash: No such file or directory<br>
> $ cat /proc/sys/fs/binfmt_misc/<wbr>status<br>
> enabled<br>
> $ ls -l /proc/sys/fs/binfmt_misc/qemu-<wbr>arm<br>
> -rw-r--r-- 1 root root 0 mar 13 14:19 /proc/sys/fs/binfmt_misc/qemu-<br>
> arm<br>
><br>
> Can you show the contents of that qemu-arm file?<br>
<br>
</div>Yeah, it seems like it is dynamically linked and is not finding the<br>
loader.<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Nah, I just went through this debugging with someone at Endless yesterday. The kernel unfortunately returns ENOENT when it can't handle the binary format. Or possibly the ENOENT is because it can't find the interpreter for the binfmt. Either way, I'm pretty sure it's not a dynamic linking problem unless Aleix just installed the wrong package.</div><div dir="auto"><br></div><div dir="auto">What I suspect is actually the problem is that Debian's qemu-user-static package is setting a restrictive mask in the binfmt configuration that doesn't have the new F flag needed so that the interpreter is opened immediately at registration and kept open. I noticed yesterday that the setup on xenial is that the flags are set to OC. I'm guessing this hasn't been updated and can't really since it would make the configurations in the package dependent on a pretty new kernel. I believe the kernel throws EINVAL when an unrecognized option is in the mask.</div><div dir="auto"><br></div><div dir="auto">What Fedora does (I'm pretty sure), and what I think Debian should do, is leave the mask blank so the kernel defaults are used. Then you pick up the new F flag automatically when the kernel supports it.</div><div dir="auto"><br></div><div dir="auto">So, I'd like to see the actual registered configuration. If it contains OC like I suspect, then it needs to be updated to include F or just have the mask stripped off and use the kernel defaults.</div><div dir="auto"><br></div><div dir="auto">--</div><div dir="auto">Dan</div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div></div></div>