all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludovic.courtes@inria.fr>
To: Danny Milosavljevic <dannym@scratchpost.org>
Cc: "guix-devel@gnu.org" <guix-devel@gnu.org>,
	YOANN P <yoann_mac_donald@hotmail.com>
Subject: Re: Include Proot-static with binary releases
Date: Mon, 25 Mar 2019 10:16:57 +0100	[thread overview]
Message-ID: <87r2avz52u.fsf@inria.fr> (raw)
In-Reply-To: <20190323175342.7a238f95@scratchpost.org> (Danny Milosavljevic's message of "Sat, 23 Mar 2019 17:53:42 +0100")

Hi!

Danny Milosavljevic <dannym@scratchpost.org> skribis:

> On Tue, 23 Jan 2018 15:49:26 +0100
> ludovic.courtes@inria.fr (Ludovic Courtès) wrote:
>
>> > Currently proot only build successfully on x86_64 and i686, so that is
>> > something we would need to fix first.  
>
> Are you sure that is not just a limitation of the qemu transparent emulation?

Oh, I hadn’t thought about that.

> I examined the test failures in proot-static and it's clear that qemu will have
> some trouble finding out what one wants to happen:
>
>>#include <unistd.h> /* execve(2), */
>>#include <stdlib.h> /* exit(3), */
>>#include <string.h> /* strcmp(3), */
>>
>>int main(int argc, char *argv[])
>>{
>>        if (argc == 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’oh!

--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 
lrwxrwxrwx 1 ludo users 0 Mar 25 09:55 /proc/2410/exe -> /gnu/store/6ar48khay4zd435cvkv4bgf1jih7jimq-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’t expect /proc/self/exe to be “wrong”.)

We’ll have to check what happens on berlin though, because there we
build on the bare metal.

Thanks,
Ludo’.

  reply	other threads:[~2019-03-25  9:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-17 21:52 Include Proot-static with binary releases YOANN P
2018-01-18 10:44 ` Ludovic Courtès
2018-01-18 14:21   ` Pjotr Prins
2018-01-22 17:45     ` Efraim Flashner
2018-01-23 14:49       ` Ludovic Courtès
2019-03-23 16:53         ` Danny Milosavljevic
2019-03-25  9:16           ` Ludovic Courtès [this message]
2018-01-21 14:50   ` Ricardo Wurmus
2018-01-21 21:03     ` Pjotr Prins

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

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

  git send-email \
    --in-reply-to=87r2avz52u.fsf@inria.fr \
    --to=ludovic.courtes@inria.fr \
    --cc=dannym@scratchpost.org \
    --cc=guix-devel@gnu.org \
    --cc=yoann_mac_donald@hotmail.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.