From patchwork Wed Dec 18 22:55:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janneke Nieuwenhuizen X-Patchwork-Id: 16561 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7CEC01794B; Wed, 18 Dec 2019 22:56:10 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 349871794A for ; Wed, 18 Dec 2019 22:56:10 +0000 (GMT) Received: from localhost ([::1]:33658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihiEj-0008MY-PL for patchwork@mira.cbaines.net; Wed, 18 Dec 2019 17:56:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48059) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihiEd-0008MO-Op for guix-patches@gnu.org; Wed, 18 Dec 2019 17:56:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihiEc-0000iv-GE for guix-patches@gnu.org; Wed, 18 Dec 2019 17:56:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:38127) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ihiEc-0000ij-CA for guix-patches@gnu.org; Wed, 18 Dec 2019 17:56:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ihiEc-0005Q1-9k for guix-patches@gnu.org; Wed, 18 Dec 2019 17:56:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#38390] [core-updates] Scheme-only bootstrap: merge wip-bootstrap Resent-From: Jan Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 18 Dec 2019 22:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38390 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?utf-8?q?Court=C3=A8s?= Cc: Timothy Sample , 38390@debbugs.gnu.org Received: via spool by 38390-submit@debbugs.gnu.org id=B38390.157670974420802 (code B ref 38390); Wed, 18 Dec 2019 22:56:02 +0000 Received: (at 38390) by debbugs.gnu.org; 18 Dec 2019 22:55:44 +0000 Received: from localhost ([127.0.0.1]:44100 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ihiEG-0005PN-2r for submit@debbugs.gnu.org; Wed, 18 Dec 2019 17:55:44 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38473) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ihiEE-0005PB-Mv for 38390@debbugs.gnu.org; Wed, 18 Dec 2019 17:55:39 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52148) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ihiE9-0000Kq-FZ; Wed, 18 Dec 2019 17:55:33 -0500 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=53332 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ihiDr-0006vR-8U; Wed, 18 Dec 2019 17:55:27 -0500 From: Jan Nieuwenhuizen Organization: AvatarAcademy.nl References: <87tv6qoank.fsf@gnu.org> <87sgm4m9fu.fsf@gnu.org> <87v9r0arni.fsf@gnu.org> <87y2vqdjwz.fsf@gnu.org> <87y2viyb2a.fsf@gnu.org> <87o8w9s284.fsf@gnu.org> <878sncm5od.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Wed, 18 Dec 2019 23:55:13 +0100 In-Reply-To: <878sncm5od.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Mon, 16 Dec 2019 20:28:02 +0100") Message-ID: <87o8w5gs6m.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Jan Nieuwenhuizen writes: Hi, A new step forward. >>>> * look into awkward combined bash+gash dependency of glibc-mesboot0 >>> >>> Haven't addressed this. I quickly looked with Ludo at this, not really >>> into it though. WYDT? >> >> Hmm, dunno. I can take a look later. > > Okay, great. This issue still remains. I will try to create a bug > report for Gash, I think Gash hangs while running configure, while > bash-mesboot* have trouble running make-syscalls.sh correctly. Good news. bash-mesboot0 now compiles with either gash+gash-core-utils, or with bash-mesboot0. Gash' "test -L FILE" used to crash on non-existing files, not sure why that made configure hang; but that's how I found and fixed it. The problem with bash-mesboot0 turned out to be a Mes C Library problem, related to buffered reads. Buffered reads were introduced when working on the Hurd. Not clearing the read buffer on lseek, when lseek is not allowed (bash uses the same: lseek (FD, 0, SEEK_CUR) to find out if it may seek), fixes the problem. That took me a couple of days to find, but very happy --8<---------------cut here---------------start------------->8--- --8<---------------cut here---------------end--------------->8--- Greetings, janneke diff --git a/lib/linux/lseek.c b/lib/linux/lseek.c index 94f2f9f7a..f71af59f5 100644 --- a/lib/linux/lseek.c +++ b/lib/linux/lseek.c @@ -24,9 +24,21 @@ #include #include +#if !__MESC__ /* FIXME: We want bin/mes-mescc's x86-linux sha256sum to stay the same. */ +off_t +_lseek (int filedes, off_t offset, int whence) +{ + return _sys_call3 (SYS_lseek, (int) filedes, (long) offset, (int) whence); +} +#endif + off_t lseek (int filedes, off_t offset, int whence) { +#if !__MESC__ /* FIXME: We want bin/mes-mescc's x86-linux sha256sum to stay the same. */ + if (_lseek (filedes, 0, SEEK_CUR) == -1) + return -1; +#endif size_t skip = __buffered_read_clear (filedes); if (whence == SEEK_CUR) offset -= skip;