From debbugs-submit-bounces@debbugs.gnu.org Tue May 19 12:53:09 2020 Received: (at 41264) by debbugs.gnu.org; 19 May 2020 16:53:09 +0000 Received: from localhost ([127.0.0.1]:50826 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) 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 ) 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 ) 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 ) id 1jb5UC-000479-DM; Tue, 19 May 2020 12:53:00 -0400 From: Jan Nieuwenhuizen To: Mathieu Othacehe 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 =3D _sys_call2 (STAT_SYSCALL, (long) file_name, (long) &statbuf64); > > #if __i386__ > stat64_to_32(&statbuf64, statbuf); > #else > *statbuf =3D 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 --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com