guix-patches
[Top][All Lists]
Advanced

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

[bug#38390] [core-updates] Scheme-only bootstrap: merge wip-bootstrap


From: Jan Nieuwenhuizen
Subject: [bug#38390] [core-updates] Scheme-only bootstrap: merge wip-bootstrap
Date: Wed, 18 Dec 2019 23:55:13 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

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---
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 <stdio.h>
 #include <sys/types.h>
 
+#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;
--8<---------------cut here---------------end--------------->8---

Greetings,
janneke

-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com





reply via email to

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