From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: Include Proot-static with binary releases Date: Mon, 25 Mar 2019 10:16:57 +0100 Message-ID: <87r2avz52u.fsf@inria.fr> References: <87lggva1l8.fsf@gnu.org> <20180118142153.GA31617@thebird.nl> <20180122174552.GB5175@macbook41> <87vafs4oll.fsf@inria.fr> <20190323175342.7a238f95@scratchpost.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:40038) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8Lv7-0007F1-Fd for guix-devel@gnu.org; Mon, 25 Mar 2019 05:29:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h8Lj6-00058x-0w for guix-devel@gnu.org; Mon, 25 Mar 2019 05:17:05 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:43996) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h8Lj4-00055e-68 for guix-devel@gnu.org; Mon, 25 Mar 2019 05:17:02 -0400 In-Reply-To: <20190323175342.7a238f95@scratchpost.org> (Danny Milosavljevic's message of "Sat, 23 Mar 2019 17:53:42 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Danny Milosavljevic Cc: "guix-devel@gnu.org" , YOANN P Hi! Danny Milosavljevic skribis: > On Tue, 23 Jan 2018 15:49:26 +0100 > ludovic.courtes@inria.fr (Ludovic Court=C3=A8s) wrote: > >> > Currently proot only build successfully on x86_64 and i686, so that is >> > something we would need to fix first.=20=20 > > Are you sure that is not just a limitation of the qemu transparent emulat= ion? Oh, I hadn=E2=80=99t thought about that. > I examined the test failures in proot-static and it's clear that qemu wil= l have > some trouble finding out what one wants to happen: > >>#include /* execve(2), */ >>#include /* exit(3), */ >>#include /* strcmp(3), */ >> >>int main(int argc, char *argv[]) >>{ >> if (argc =3D=3D 0) >> exit(EXIT_SUCCESS); >> >> execve("/proc/self/exe", NULL, NULL); >> exit(EXIT_FAILURE); >>} > > Now, qemu transparent emulation still picks up, but then the missing > argv[0] will be a problem. > > And indeed, > > $ guix environment -s armhf-linux proot-static > [...] > [env]$ ./test-25069c12 > qemu: no user program specified Are you saying that /proc/self/exe is incorrect when using binfmt_misc? D=E2=80=99oh! --8<---------------cut here---------------start------------->8--- $ uname -m x86_64 $ guix environment --ad-hoc coreutils -s armhf-linux [env]$ uname -m armv7l [env]$ sleep 100 & [1] 2410 [env]$ ls -l /proc/2410/exe=20 lrwxrwxrwx 1 ludo users 0 Mar 25 09:55 /proc/2410/exe -> /gnu/store/6ar48kh= ay4zd435cvkv4bgf1jih7jimq-qemu-3.1.0/bin/qemu-arm --8<---------------cut here---------------end--------------->8--- So that could well be a problem (potentially in other packages as well; I didn=E2=80=99t expect /proc/self/exe to be =E2=80=9Cwrong=E2=80=9D.) We=E2=80=99ll have to check what happens on berlin though, because there we build on the bare metal. Thanks, Ludo=E2=80=99.