guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Include Proot-static with binary releases


From: Ludovic Courtès
Subject: Re: Include Proot-static with binary releases
Date: Mon, 25 Mar 2019 10:16:57 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hi!

Danny Milosavljevic <address@hidden> skribis:

> On Tue, 23 Jan 2018 15:49:26 +0100
> address@hidden (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 via email to

[Prev in Thread] Current Thread [Next in Thread]