On 25/11/2025 15:02, Gaspar Ormrod via GNU coreutils General Discussion wrote:
Hello,
I am experiencing a compilation problem that I have not found answers to. I am following
the 12.4 version of Linux From Scratch on a x86_64 laptop running a live Arch Linux ISO
(1st of nNvember 2025). For section IV, you are meant to enter a chroot to make the
remaining packages to definitively become separate from the host. During this section,
when building Coreutils-9.7 (applied two patches: upstream_fix-1.patch and i18n-1.patch),
running `make NON_ROOT_USERNAME=tester check-root` fails at
"tests/chroot/chroot-credentials.sh". (Attached is my test-build.log)
The thing is, the LFS IRC and mailing lists have no idea why this is the case,
since I have the entry for the tester user with uid 101 in /etc/passwd and
/etc/groups, and nothing failed before this package. As the LFS guide states,
the i18n patch is a bit buggy, so I tried recompiling without the patch, but
the same test failed.
Here are some of the specs of my system:
- Lenovo Legion 5 15IMH05H
- Intel i5-10300H
- 8GB RAM
- Latest archiso as of 25-11-2025
- No deviation from the LFS guide
Is anyone else having this issue? I couldn't find anything at all on the
mailing list, and the only results on a search engine are for the rust-based
rewrite of coreutils.
I shall also link to the post I made on the LFS support mailing list and its
threads:
https://lists.linuxfromscratch.org/sympa/arc/lfs-support/2025-11/msg00014.html
I can't repro here.
The test shows id is not outputting the supplemental groups.
I.e. in the coreutils build dir, the following seems to be outputting a single
group for you:
$ sudo $PWD/src/chroot --userspec=:$(id -g) / $PWD/src/id -G
The change associated with that test is from 10 years ago:
https://github.com/coreutils/coreutils/commit/ce0c08b52
I presume you have setgroups() available. On my system I have:
$ grep HAVE_SETGROUPS lib/config.h
#define HAVE_SETGROUPS 1
To debug I would add printf() falls around the setgroup() calls in src/chroot.c
to see if they're being called, and what they're being passed,
and run the first sudo command above.
cheers,
Padraig