On Fri, 2026-05-15 at 11:06 +0200, Tatrai, Peter via lists.openembedded.org wrote: > From: Peter Tatrai <[email protected]> > > When SDKMACHINE is set to "i686", nativesdk-ninja is compiled as a > 32-bit binary. Without large file support (LFS), ninja's internal stat() > call uses a 32-bit struct stat, which results in EOVERFLOW on filesystems > that report inode numbers larger than 2^32 (e.g. container overlay > filesystems). > > Add -D_FILE_OFFSET_BITS=64 to CXXFLAGS for nativesdk builds to enable > LFS, ensuring stat() uses 64-bit types regardless of host word size. > > Signed-off-by: Peter Tatrai <[email protected]> > --- > meta/recipes-devtools/ninja/ninja_1.13.2.bb | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/meta/recipes-devtools/ninja/ninja_1.13.2.bb > b/meta/recipes-devtools/ninja/ninja_1.13.2.bb > index e750c78c46..4fd048efa6 100644 > --- a/meta/recipes-devtools/ninja/ninja_1.13.2.bb > +++ b/meta/recipes-devtools/ninja/ninja_1.13.2.bb > @@ -30,6 +30,11 @@ do_install() { > install -D -m 0755 ${S}/ninja ${D}${bindir}/ninja > } > > +# Enable large file support to avoid EOVERFLOW when stat() is called on files > +# with large inode numbers (e.g. on overlay filesystems). This is critical > when > +# building nativesdk for a 32-bit SDKMACHINE (e.g. i686). > +CXXFLAGS:append:class-nativesdk = " -D_FILE_OFFSET_BITS=64" > + > BBCLASSEXTEND = "native nativesdk" > > CVE_STATUS[CVE-2021-4336] = "cpe-incorrect: This is a different Ninja"
I think we should set both -D_TIME_BITS=64 and -D_FILE_OFFSET_BITS=64 for i686 unconditionally in a similar way that time64.inc is doing for the target else we're just going to run into this elsewhere... Cheers, Richard
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#237261): https://lists.openembedded.org/g/openembedded-core/message/237261 Mute This Topic: https://lists.openembedded.org/mt/119326878/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
