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: Carlos Sánchez de La Lama
Subject: Re: [PATCH] gnu: bash-minimal: Assume getcwd works correctly when cross-compiling
Date: Wed, 19 Oct 2016 22:54:59 +0200

Hi Ludo,

>>> * 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

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.

My changes make bash "configure" assume the system getcwd works correctly 
(which in our case we know it does as dependencies are controlled).

> Is this addressing a problem you had with Bash 4.4 (on core-updates)?

No, it happens with bash-4.3 in master (and probably with most other recent 
versions as well).

Thanks!

Carlos




reply via email to

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