From: Mathieu Othacehe <othacehe@gnu.org>
To: 41264@debbugs.gnu.org
Subject: bug#41264: Bootstrap packages fail to build.
Date: Fri, 15 May 2020 14:11:34 +0200 [thread overview]
Message-ID: <87v9kxe6tl.fsf@gnu.org> (raw)
In-Reply-To: <87h7wik0kk.fsf@gnu.org> (Mathieu Othacehe's message of "Thu, 14 May 2020 17:17:47 +0200")
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
next prev parent reply other threads:[~2020-05-15 12:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-14 15:17 bug#41264: Bootstrap packages fail to build Mathieu Othacehe
2020-05-15 12:11 ` Mathieu Othacehe [this message]
2020-05-19 8:52 ` Mathieu Othacehe
2020-05-19 16:52 ` Jan Nieuwenhuizen
2023-02-13 11:28 ` bug#49985: Bootstrap packages fail to build due to mes-libc lacking 'stat64' etc. syscalls Jan Nieuwenhuizen
2023-02-15 8:45 ` bug#41264: " Janneke Nieuwenhuizen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v9kxe6tl.fsf@gnu.org \
--to=othacehe@gnu.org \
--cc=41264@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.