GNU logs - #41264, boring messages


Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#41264: Bootstrap packages fail to build.
Resent-From: Mathieu Othacehe <othacehe@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Thu, 14 May 2020 15:18:02 +0000
Resent-Message-ID: <handler.41264.B.158946947218429 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 41264
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: 41264 <at> debbugs.gnu.org
Cc: janneke@HIDDEN
X-Debbugs-Original-To: bug-guix@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.158946947218429
          (code B ref -1); Thu, 14 May 2020 15:18:02 +0000
Received: (at submit) by debbugs.gnu.org; 14 May 2020 15:17:52 +0000
Received: from localhost ([127.0.0.1]:34467 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jZFcN-0004nA-U2
	for submit <at> debbugs.gnu.org; Thu, 14 May 2020 11:17:52 -0400
Received: from lists.gnu.org ([209.51.188.17]:35718)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <othacehe@HIDDEN>) id 1jZFcM-0004n3-F5
 for submit <at> debbugs.gnu.org; Thu, 14 May 2020 11:17:50 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:47864)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <othacehe@HIDDEN>) id 1jZFcM-0005dk-9J
 for bug-guix@HIDDEN; Thu, 14 May 2020 11:17:50 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:35166)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <othacehe@HIDDEN>)
 id 1jZFcL-0002m5-Ul; Thu, 14 May 2020 11:17:49 -0400
Received: from [2a01:cb18:832e:5f00:5cdd:cc67:a2e1:e2f0] (port=53470 helo=meru)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <othacehe@HIDDEN>)
 id 1jZFcL-0003Vu-Dr; Thu, 14 May 2020 11:17:49 -0400
From: Mathieu Othacehe <othacehe@HIDDEN>
Date: Thu, 14 May 2020 17:17:47 +0200
Message-ID: <87h7wik0kk.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain


Hello,

This command fails on one of my systems:

--8<---------------cut here---------------start------------->8---
guix build  -e "(@@ (gnu packages commencement) glibc-mesboot0)"
--8<---------------cut here---------------end--------------->8---

with the following error:

--8<---------------cut here---------------start------------->8---
phase `unpack' succeeded after 11.8 seconds
starting phase `apply-boot-patch'
patch: **** fstatsterror: unknown error:  
command "patch" "--force" "-p1" "-i" "/gnu/store/pfz4y5i7krlvam2m8lpddmg9vi44rpqh-glibc-boot-2.2.5.patch" failed with status 2
note: keeping build directory `/tmp/guix-build-glibc-mesboot0-2.2.5.drv-1'
builder for `/gnu/store/jcqggqckhiq43y2ivlfhpkbfbp2vyjlc-glibc-mesboot0-2.2.5.drv' failed with exit code 1
build of /gnu/store/jcqggqckhiq43y2ivlfhpkbfbp2vyjlc-glibc-mesboot0-2.2.5.drv failed
View build log at '/var/log/guix/drvs/jc/qggqckhiq43y2ivlfhpkbfbp2vyjlc-glibc-mesboot0-2.2.5.drv.bz2'.
guix build: error: build of `/gnu/store/jcqggqckhiq43y2ivlfhpkbfbp2vyjlc-glibc-mesboot0-2.2.5.drv' failed
--8<---------------cut here---------------end--------------->8---

Here's a stracing of the failing "patch" command:

--8<---------------cut here---------------start------------->8---
open("/gnu/store/pfz4y5i7krlvam2m8lpddmg9vi44rpqh-glibc-boot-2.2.5.patch", O_RDONLY) = 3
brk(0x9377913)                          = 0x9377913
fstat(3, 0xffb29328)                    = -1 EOVERFLOW (Value too large for defined data type)
--8<---------------cut here---------------end--------------->8---

"patch-mesboot" is built for 32 bits. Hence, it can be using
"__ia32_sys_fstat", "__ia32_compat_sys_newfstat" or
"__ia32_compat_sys_x86_fstat64" syscall for "fstat". Here, according to
perf, it's using __ia32_compat_sys_newfstat which is overflowing on my
file system (inode count to high or so).

There's a little demonstration program attached. When built with `gcc
-m32 test.c', I have:

--8<---------------cut here---------------start------------->8---
fstat(3, 0xffad5874)                    = -1 EOVERFLOW (Value too large for defined data type)
fstat64(3, {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0
fstat64(3, {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0
--8<---------------cut here---------------end--------------->8---

So I think somehow, bootstrap packages use the legacy "fstat" syscall,
which may overflow on a 64 bits system.

WDYT,

Thanks,

Mathieu

--=-=-=
Content-Type: text/x-csrc
Content-Disposition: inline; filename=t.c

#define _GNU_SOURCE
#include <unistd.h>
#include <sys/syscall.h>

#include <sys/types.h>
#include <sys/stat.h>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/sysmacros.h>

int
main(int argc, char *argv[])
{
    struct stat sb;

    if (argc != 2) {
        fprintf(stderr, "Usage: %s <pathname>\n", argv[0]);
        exit(EXIT_FAILURE);
    }

    int fd = open(argv[1], O_RDONLY);
    syscall(__NR_fstat, fd, &sb);
    syscall(__NR_fstat64, fd, &sb);
    fstat(fd, &sb);


    exit(EXIT_SUCCESS);
}

--=-=-=--




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Mathieu Othacehe <othacehe@HIDDEN>
Subject: bug#41264: Acknowledgement (Bootstrap packages fail to build.)
Message-ID: <handler.41264.B.158946947218429.ack <at> debbugs.gnu.org>
References: <87h7wik0kk.fsf@HIDDEN>
X-Gnu-PR-Message: ack 41264
X-Gnu-PR-Package: guix
Reply-To: 41264 <at> debbugs.gnu.org
Date: Thu, 14 May 2020 15:18:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-guix@HIDDEN

If you wish to submit further information on this problem, please
send it to 41264 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
41264: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D41264
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#41264: Bootstrap packages fail to build.
Resent-From: Mathieu Othacehe <othacehe@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Fri, 15 May 2020 12:12:02 +0000
Resent-Message-ID: <handler.41264.B41264.15895447088855 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 41264
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: 41264 <at> debbugs.gnu.org
Received: via spool by 41264-submit <at> debbugs.gnu.org id=B41264.15895447088855
          (code B ref 41264); Fri, 15 May 2020 12:12:02 +0000
Received: (at 41264) by debbugs.gnu.org; 15 May 2020 12:11:48 +0000
Received: from localhost ([127.0.0.1]:36140 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jZZBs-0002Il-38
	for submit <at> debbugs.gnu.org; Fri, 15 May 2020 08:11:48 -0400
Received: from eggs.gnu.org ([209.51.188.92]:59168)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <othacehe@HIDDEN>) id 1jZZBq-0002IZ-Kc
 for 41264 <at> debbugs.gnu.org; Fri, 15 May 2020 08:11:46 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:39104)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <othacehe@HIDDEN>) id 1jZZBk-00079Z-Ta
 for 41264 <at> debbugs.gnu.org; Fri, 15 May 2020 08:11:40 -0400
Received: from [2a01:cb18:832e:5f00:5cdd:cc67:a2e1:e2f0] (port=35580 helo=meru)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <othacehe@HIDDEN>) id 1jZZBg-0004Ww-6x
 for 41264 <at> debbugs.gnu.org; Fri, 15 May 2020 08:11:40 -0400
From: Mathieu Othacehe <othacehe@HIDDEN>
References: <87h7wik0kk.fsf@HIDDEN>
Date: Fri, 15 May 2020 14:11:34 +0200
In-Reply-To: <87h7wik0kk.fsf@HIDDEN> (Mathieu Othacehe's message of "Thu, 14
 May 2020 17:17:47 +0200")
Message-ID: <87v9kxe6tl.fsf@HIDDEN>
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-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)


Hello,

> fstat(3, 0xffad5874)                    = -1 EOVERFLOW (Value too large for defined data type)
> fstat64(3, {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0
> fstat64(3, {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0
>
> So I think somehow, bootstrap packages use the legacy "fstat" syscall,
> which may overflow on a 64 bits system.

More info on that one. Linux syscall "newstat", will call
"cp_compat_stat". This function starts by checking the device id:

--8<---------------cut here---------------start------------->8---
	struct compat_stat tmp;

	if (!old_valid_dev(stat->dev) || !old_valid_dev(stat->rdev))
		return -EOVERFLOW;
--8<---------------cut here---------------end--------------->8---

Here, stat->dev is 66308 (major: 259, minor 4).

"old_valid_dev" checks that:

--8<---------------cut here---------------start------------->8---
static inline bool old_valid_dev(dev_t dev)
{
	return MAJOR(dev) < 256 && MINOR(dev) < 256;
}--8<---------------cut here---------------end--------------->8---

Which is false here, because my NVME disk has a BLOCK_EXT_MAJOR (259).

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.

Thanks,

Mathieu




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#41264: Bootstrap packages fail to build.
Resent-From: Mathieu Othacehe <othacehe@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Tue, 19 May 2020 08:53:01 +0000
Resent-Message-ID: <handler.41264.B41264.158987835823399 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 41264
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: 41264 <at> debbugs.gnu.org
Received: via spool by 41264-submit <at> debbugs.gnu.org id=B41264.158987835823399
          (code B ref 41264); Tue, 19 May 2020 08:53:01 +0000
Received: (at 41264) by debbugs.gnu.org; 19 May 2020 08:52:38 +0000
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 <at> debbugs.gnu.org>)
	id 1jaxzK-00065L-0R
	for submit <at> 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@HIDDEN>) id 1jaxzJ-000656-4c
 for 41264 <at> 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@HIDDEN>) id 1jaxzD-0004Ru-OY
 for 41264 <at> 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@HIDDEN>) id 1jaxzD-0005I9-Cv
 for 41264 <at> debbugs.gnu.org; Tue, 19 May 2020 04:52:31 -0400
From: Mathieu Othacehe <othacehe@HIDDEN>
References: <87h7wik0kk.fsf@HIDDEN> <87v9kxe6tl.fsf@HIDDEN>
Date: Tue, 19 May 2020 10:52:28 +0200
In-Reply-To: <87v9kxe6tl.fsf@HIDDEN> (Mathieu Othacehe's message of "Fri, 15
 May 2020 14:11:34 +0200")
Message-ID: <87ftbwtigj.fsf@HIDDEN>
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-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> 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




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#41264: Bootstrap packages fail to build.
Resent-From: Jan Nieuwenhuizen <janneke@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Tue, 19 May 2020 16:54:01 +0000
Resent-Message-ID: <handler.41264.B41264.158990718931458 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 41264
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: Mathieu Othacehe <othacehe@HIDDEN>
Cc: 41264 <at> debbugs.gnu.org
Received: via spool by 41264-submit <at> debbugs.gnu.org id=B41264.158990718931458
          (code B ref 41264); Tue, 19 May 2020 16:54:01 +0000
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 <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jb5UL-0008BJ-BG
	for submit <at> 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@HIDDEN>) id 1jb5UJ-0008B7-Q2
 for 41264 <at> 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@HIDDEN>)
 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@HIDDEN>)
 id 1jb5UC-000479-DM; Tue, 19 May 2020 12:53:00 -0400
From: Jan Nieuwenhuizen <janneke@HIDDEN>
Organization: AvatarAcademy.nl
References: <87h7wik0kk.fsf@HIDDEN> <87v9kxe6tl.fsf@HIDDEN>
 <87ftbwtigj.fsf@HIDDEN>
X-Url: http://AvatarAcademy.nl
Date: Tue, 19 May 2020 18:52:56 +0200
In-Reply-To: <87ftbwtigj.fsf@HIDDEN> (Mathieu Othacehe's message of "Tue, 19
 May 2020 10:52:28 +0200")
Message-ID: <87sgfvq32v.fsf@HIDDEN>
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-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> 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 =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 <janneke@HIDDEN> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com




Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 1 Sep 2021 13:56:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 01 09:56:53 2021
Received: from localhost ([127.0.0.1]:38702 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mLQjV-0007va-1N
	for submit <at> debbugs.gnu.org; Wed, 01 Sep 2021 09:56:53 -0400
Received: from eggs.gnu.org ([209.51.188.92]:40248)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1mLQjT-0007vL-J7
 for control <at> debbugs.gnu.org; Wed, 01 Sep 2021 09:56:51 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:50054)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>) id 1mLQjM-0002OD-Vj
 for control <at> debbugs.gnu.org; Wed, 01 Sep 2021 09:56:45 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=48804 helo=ribbon)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>) id 1mLQjM-0003ZA-NG
 for control <at> debbugs.gnu.org; Wed, 01 Sep 2021 09:56:44 -0400
Date: Wed, 01 Sep 2021 15:56:43 +0200
Message-Id: <87wno0761w.fsf@HIDDEN>
To: control <at> debbugs.gnu.org
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
Subject: control message for bug #41264
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

merge 41264 49985
quit





Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 1 Sep 2021 13:59:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 01 09:59:17 2021
Received: from localhost ([127.0.0.1]:38706 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mLQlp-0007zr-Bq
	for submit <at> debbugs.gnu.org; Wed, 01 Sep 2021 09:59:17 -0400
Received: from eggs.gnu.org ([209.51.188.92]:40968)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1mLQlo-0007zc-1j
 for control <at> debbugs.gnu.org; Wed, 01 Sep 2021 09:59:16 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:50116)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>) id 1mLQli-000422-OS
 for control <at> debbugs.gnu.org; Wed, 01 Sep 2021 09:59:10 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=48806 helo=ribbon)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>) id 1mLQli-00082p-Fo
 for control <at> debbugs.gnu.org; Wed, 01 Sep 2021 09:59:10 -0400
Date: Wed, 01 Sep 2021 15:59:09 +0200
Message-Id: <87v93k75xu.fsf@HIDDEN>
To: control <at> debbugs.gnu.org
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
Subject: control message for bug #41264
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

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





Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 1 Sep 2021 13:59:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 01 09:59:24 2021
Received: from localhost ([127.0.0.1]:38712 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mLQlv-00080N-Qo
	for submit <at> debbugs.gnu.org; Wed, 01 Sep 2021 09:59:24 -0400
Received: from eggs.gnu.org ([209.51.188.92]:41026)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1mLQlt-0007zq-V8
 for control <at> debbugs.gnu.org; Wed, 01 Sep 2021 09:59:22 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:50126)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>) id 1mLQlo-00047s-N9
 for control <at> debbugs.gnu.org; Wed, 01 Sep 2021 09:59:16 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=48808 helo=ribbon)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>) id 1mLQln-0008GS-Cq
 for control <at> debbugs.gnu.org; Wed, 01 Sep 2021 09:59:16 -0400
Date: Wed, 01 Sep 2021 15:59:14 +0200
Message-Id: <87tuj475xp.fsf@HIDDEN>
To: control <at> debbugs.gnu.org
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
Subject: control message for bug #41264
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

severity 41264 important
quit






Last modified: Wed, 1 Sep 2021 14:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.