guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] gnu: bash-minimal: Assume getcwd works correctly when cross-


From: Ludovic Courtès
Subject: Re: [PATCH] gnu: bash-minimal: Assume getcwd works correctly when cross-compiling
Date: Thu, 20 Oct 2016 14:55:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Hi Carlos,

Carlos Sánchez de La Lama <address@hidden> skribis:

>>>> * gnu/packages/bash.scm (bash-minimal): Assume getcwd works
>>>> correctly when cross compiling.
>>> No tabs please.  Otherwise LGTM, thanks!  I spoke too fast.  On
>> master (Bash 4.3), this is unnecessary AFAICS:
>> 
>> --8<---------------cut here---------------start------------->8--- $
>> ./pre-inst-env guix build bash-minimal --target=mips64el-linux-gnu
>> --no-grafts --no-build-hook
>> /gnu/store/1v6l54xzmzb19hdg5bizvzfz995lh1cp-bash-minimal-4.3.42-doc
>> /gnu/store/gawbc9mj2i37ycym06rbybi1k4kn8zfq-bash-minimal-4.3.42-include
>> /gnu/store/vic4zf9gpdzrcvj8kimb9cs3049ld60d-bash-minimal-4.3.42 $
>> git describe v0.11.0-1743-gfe9bdb5 --8<---------------cut
>> here---------------end--------------->8---
>
> Building bash was never a problem, it worked also for me without the
> patch. The problem is that, when cross-compiling, bash "configure"
> scrip cannot test whether system getcwd works properly or not, and
> thus decides to use its own version of it, which does not correctly
> work inside bind mounts (and therefore fails in the chroot, but works
> outside it).
>
> Thus, unpatched bash will fail when used to build another
> derivation. The problem was first reported here:
>
> https://lists.gnu.org/archive/html/guix-devel/2013-10/msg00063.html

OK, I see.

> Although in that case Mark worked it around by having /tmp in a
> different partition, which incidentally causes bash-provided getcwd to
> work correctly.
>
> Maybe I can put a more detailed explanation on bash.scm; I packed the
> patch in a hurry in case Efraim needed it for its bootstrapping also.

A detailed explanation in bash.scm would be awesome.  :-)
Could you do that?

I reread the thread and it’s not clear to me what the conclusion is.  I
don’t clearly see how Bash’s ‘getcwd’ could be wrong.  Most likely this
has to do with “..” lookup in the presence of bind mounts and
assumptions that Bash’s ‘getcwd’ makes on st_ino and st_dev values.  Oh
well, it’s probably enough to know that that ‘getcwd’ is buggy.  ;-)

Thanks,
Ludo’.



reply via email to

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