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 #14 received at 41264@debbugs.gnu.org (full text, mbox, reply):

Received: (at 41264) by debbugs.gnu.org; 19 May 2020 16:53:09 +0000
From debbugs-submit-bounces@debbugs.gnu.org Tue May 19 12:53:09 2020
Received: from localhost ([127.0.0.1]:50826 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1jb5UL-0008BJ-BG
	for submit@debbugs.gnu.org; Tue, 19 May 2020 12:53:09 -0400
Received: from eggs.gnu.org ([209.51.188.92]:52612)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <janneke@gnu.org>) id 1jb5UJ-0008B7-Q2
 for 41264@debbugs.gnu.org; Tue, 19 May 2020 12:53:08 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:55928)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <janneke@gnu.org>)
 id 1jb5UD-0007Rh-51; Tue, 19 May 2020 12:53:01 -0400
Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=46670
 helo=dundal.peder.onsbrabantnet.nl)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <janneke@gnu.org>)
 id 1jb5UC-000479-DM; Tue, 19 May 2020 12:53:00 -0400
From: Jan Nieuwenhuizen <janneke@gnu.org>
To: Mathieu Othacehe <othacehe@gnu.org>
Subject: Re: bug#41264: Bootstrap packages fail to build.
Organization: AvatarAcademy.nl
References: <87h7wik0kk.fsf@gnu.org> <87v9kxe6tl.fsf@gnu.org>
 <87ftbwtigj.fsf@gnu.org>
X-Url: http://AvatarAcademy.nl
Date: Tue, 19 May 2020 18:52:56 +0200
In-Reply-To: <87ftbwtigj.fsf@gnu.org> (Mathieu Othacehe's message of "Tue, 19
 May 2020 10:52:28 +0200")
Message-ID: <87sgfvq32v.fsf@gnu.org>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41264
Cc: 41264@debbugs.gnu.org
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 (---)
Mathieu Othacehe writes:

Hello Mathieu,

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

Hmm, we need to patch Mes after all.  That's unfortunate.

> We would need to add three new syscalls for x86:
>
> #define SYS_stat64    0xc3
> #define SYS_lstat64   0xc4
> #define SYS_fstat64   0xc5
>
>
> lib/linux/stat.c should be modified this way:
>
> #if __i386__
> #define STAT_SYSCALL SYS_stat64
> #else
> #define STAT_SYSCALL SYS_stat
> #endif

Ah...the stat64 syscall is meant for i386; now it at starts making at
least some sense to me.

> 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;
> }

That looks OK...

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

Beautiful, thanks for getting to the bottom of this.  Now that you
already have gone this far, would you like to whip-up a full patch for
GNU Mes?

To test it we may have to provide a tarball as we don't want to use XZ
and we don't have patch yet.  Or possibly we can download some
individual files ande overwrite them.

Greetings,
Janneke

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




Send a report that this bug log contains spam.


debbugs.gnu.org maintainers <help-debbugs@gnu.org>. Last modified: Tue Jan 7 00:42:30 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.