GNU bug report logs

#41264 Bootstrap packages fail to build due to mes-libc lacking 'stat64' etc. syscalls

PackageSource(s)Maintainer(s)
guix PTS Buildd Popcon
Full log

Message #11 received at 41264@debbugs.gnu.org (full text, mbox, reply):

Received: (at 41264) by debbugs.gnu.org; 19 May 2020 08:52:38 +0000
From debbugs-submit-bounces@debbugs.gnu.org Tue May 19 04:52:38 2020
Received: from localhost ([127.0.0.1]:49154 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1jaxzK-00065L-0R
	for submit@debbugs.gnu.org; Tue, 19 May 2020 04:52:38 -0400
Received: from eggs.gnu.org ([209.51.188.92]:46702)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <othacehe@gnu.org>) id 1jaxzJ-000656-4c
 for 41264@debbugs.gnu.org; Tue, 19 May 2020 04:52:37 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:46942)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <othacehe@gnu.org>) id 1jaxzD-0004Ru-OY
 for 41264@debbugs.gnu.org; Tue, 19 May 2020 04:52:31 -0400
Received: from [2a01:e0a:fa:a50:7004:8043:e0bd:6eda] (port=35840 helo=meru)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <othacehe@gnu.org>) id 1jaxzD-0005I9-Cv
 for 41264@debbugs.gnu.org; Tue, 19 May 2020 04:52:31 -0400
From: Mathieu Othacehe <othacehe@gnu.org>
To: 41264@debbugs.gnu.org
Subject: Re: bug#41264: Bootstrap packages fail to build.
References: <87h7wik0kk.fsf@gnu.org> <87v9kxe6tl.fsf@gnu.org>
Date: Tue, 19 May 2020 10:52:28 +0200
In-Reply-To: <87v9kxe6tl.fsf@gnu.org> (Mathieu Othacehe's message of "Fri, 15
 May 2020 14:11:34 +0200")
Message-ID: <87ftbwtigj.fsf@gnu.org>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41264
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit@debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request@debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-Spam-Score: -3.3 (---)
Hello,

> So stat, lstat, and all other related function will return -EOVERFLOW
> unless their 64 bits stat64, lstat64 counterpart is used.
>
> So I think this means that one cannot build the Guix bootstrap toolchain on an
> NVME disk.

After further investigations I think that it is needed to patch GNU Mes
to fix this bug.

We would need to add three new syscalls for x86:

--8<---------------cut here---------------start------------->8---
#define SYS_stat64    0xc3
#define SYS_lstat64   0xc4
#define SYS_fstat64   0xc5
--8<---------------cut here---------------end--------------->8---

lib/linux/stat.c should be modified this way:

--8<---------------cut here---------------start------------->8---
#if __i386__
#define STAT_SYSCALL SYS_stat64
#else
#define STAT_SYSCALL SYS_stat
#endif

int
stat (char const *file_name, struct stat *statbuf)
{
  struct stat64 statbuf64;
  int ret;

  ret = _sys_call2 (STAT_SYSCALL, (long) file_name, (long) &statbuf64);

#if __i386__
  stat64_to_32(&statbuf64, statbuf);
#else
  *statbuf = statbuf64;
#endif

  return ret;
}
--8<---------------cut here---------------end--------------->8---

Then we would need to create stat64_to_32 which could be inspired from
__xstat64_conv from the glibc. Then, lstat and fstat64 would need to be
patched the same way.

This way, we would replicate the glibc behavior.

Thanks,

Mathieu




Send a report that this bug log contains spam.


debbugs.gnu.org maintainers <help-debbugs@gnu.org>. Last modified: Tue Jan 7 00:06:43 2025; Machine Name: wallace-server

GNU bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.