From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] gnu: bash-minimal: Assume getcwd works correctly when cross-compiling Date: Thu, 20 Oct 2016 14:55:07 +0200 Message-ID: <8737jrch90.fsf@gnu.org> References: <7tpomxfxoe.fsf@gmail.com> <8760oo73ra.fsf@gnu.org> <87a8e05d2m.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51337) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxCsK-0000e2-B8 for guix-devel@gnu.org; Thu, 20 Oct 2016 08:55:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxCsH-0003M7-9k for guix-devel@gnu.org; Thu, 20 Oct 2016 08:55:12 -0400 In-Reply-To: ("Carlos =?utf-8?Q?S=C3=A1nchez?= de La Lama"'s message of "Wed, 19 Oct 2016 22:54:59 +0200") 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: Carlos =?utf-8?Q?S=C3=A1nchez?= de La Lama Cc: guix-devel@gnu.org Hi Carlos, Carlos S=C3=A1nchez de La Lama 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: >>=20 >> --8<---------------cut here---------------start------------->8--- $ >> ./pre-inst-env guix build bash-minimal --target=3Dmips64el-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=E2=80=99s not clear to me what the conclusion is= . I don=E2=80=99t clearly see how Bash=E2=80=99s =E2=80=98getcwd=E2=80=99 could= be wrong. Most likely this has to do with =E2=80=9C..=E2=80=9D lookup in the presence of bind mounts a= nd assumptions that Bash=E2=80=99s =E2=80=98getcwd=E2=80=99 makes on st_ino an= d st_dev values. Oh well, it=E2=80=99s probably enough to know that that =E2=80=98getcwd=E2=80= =99 is buggy. ;-) Thanks, Ludo=E2=80=99.