All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Julien Olivain <ju.o@free.fr>
Cc: Antoine Tenart <atenart@kernel.org>,
	Marcus Folkesson <marcus.folkesson@gmail.com>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 01/11] package/libselinux: fix build issues caused by 3.8.1 bump
Date: Mon, 15 Sep 2025 08:06:05 +0200	[thread overview]
Message-ID: <20250915080605.579fa2e0@windsurf> (raw)
In-Reply-To: <14e1befe002ce593820b4bc1dd63d04e@free.fr>

Hello Julien,

+Waldemar in Cc, uClibc-ng related issue.

On Mon, 15 Sep 2025 00:28:28 +0200
Julien Olivain <ju.o@free.fr> wrote:

> I applied the full series to master, thanks.

Thanks!

> While reviewing, I found one corner case build failure with libselinux 
> 3.9
> on x86_64 uclibc. See:
> https://gitlab.com/jolivain/buildroot/-/jobs/11350151899
> 
> It seems to be a followup issue related to the one fixed in this patch.

Dammit. I must say I don't quite grasp what they are trying to do in
these matchpathcon.c checks.

It seems like:

#if (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) && defined(__INO64_T_TYPE) && !defined(__INO_T_MATCHES_INO64_T)
/* alias defined in the public header but we undefine it here */
#undef matchpathcon_filespec_add

/* ABI backwards-compatible shim for non-LFS 32-bit systems */

static_assert(sizeof(unsigned long) == sizeof(__ino_t), "inode size mismatch");
static_assert(sizeof(unsigned long) == sizeof(uint32_t), "inode size mismatch");
static_assert(sizeof(ino_t) == sizeof(ino64_t), "inode size mismatch");
static_assert(sizeof(ino64_t) == sizeof(uint64_t), "inode size mismatch");

is for 32-bit systems? And here you are building for x86-64, but it
gets detected as a 32-bit system, or something like that. Is it due to
the fact that we always build with _FILE_OFFSET_BITS=64 even on 64-bit
systems, where I guess it doesn't make sense because off_t is anyway
going to always be 64-bit.

And indeed, the check used to be:

-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 && __BITS_PER_LONG < 64
+#if (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) && !defined(__INO_T_MATCHES_INO64_T)

which would be false on 64-bit platforms... but now is true on
uClibc-ng.

That check was "improved" for musl:

-#if (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) && !defined(__INO_T_MATCHES_INO64_T)
+#if (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) && defined(__INO64_T_TYPE) && !defined(__INO_T_MATCHES_INO64_T)

So I guess some additional tweak is needed for uClibc-ng.

I'm not sure what the correct fix is.

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2025-09-15  6:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-09 12:08 [Buildroot] [PATCH 00/11] SELinux fixes and updates Thomas Petazzoni via buildroot
2025-09-09 12:08 ` [Buildroot] [PATCH 01/11] package/libselinux: fix build issues caused by 3.8.1 bump Thomas Petazzoni via buildroot
2025-09-14 22:28   ` Julien Olivain via buildroot
2025-09-15  6:06     ` Thomas Petazzoni via buildroot [this message]
2025-09-19 18:42       ` Waldemar Brodkorb
2025-09-19 19:00         ` Thomas Petazzoni via buildroot
2025-09-20  6:07           ` Waldemar Brodkorb
2025-09-20  8:45             ` Thomas Petazzoni via buildroot
2025-09-19 12:59   ` Thomas Perale via buildroot
2025-09-09 12:08 ` [Buildroot] [PATCH 02/11] package/libsemanage: fix build issue due to basename() Thomas Petazzoni via buildroot
2025-09-19 12:56   ` Thomas Perale via buildroot
2025-09-09 12:08 ` [Buildroot] [PATCH 03/11] package/policycoreutils: fix build with musl due to getpass() Thomas Petazzoni via buildroot
2025-09-19 12:56   ` Thomas Perale via buildroot
2025-09-09 12:08 ` [Buildroot] [PATCH 04/11] package/libselinux: bump version to 3.9 Thomas Petazzoni via buildroot
2025-09-09 12:08 ` [Buildroot] [PATCH 05/11] package/checkpolicy: bump to version 3.9 Thomas Petazzoni via buildroot
2025-09-09 12:08 ` [Buildroot] [PATCH 06/11] package/libsemanage: " Thomas Petazzoni via buildroot
2025-09-09 12:08 ` [Buildroot] [PATCH 07/11] package/libsepol: " Thomas Petazzoni via buildroot
2025-09-09 12:08 ` [Buildroot] [PATCH 08/11] package/policycoreutils: " Thomas Petazzoni via buildroot
2025-09-09 12:08 ` [Buildroot] [PATCH 09/11] package/restorecond: " Thomas Petazzoni via buildroot
2025-09-09 12:08 ` [Buildroot] [PATCH 10/11] package/selinux-python: " Thomas Petazzoni via buildroot
2025-09-09 12:08 ` [Buildroot] [PATCH 11/11] package/semodule-utils: " Thomas Petazzoni via buildroot

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=20250915080605.579fa2e0@windsurf \
    --to=buildroot@buildroot.org \
    --cc=atenart@kernel.org \
    --cc=ju.o@free.fr \
    --cc=marcus.folkesson@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    /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.
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.