Bug 15721 - fakeroot 1.32.1 fails to build on CentOS 7.x machines
Summary: fakeroot 1.32.1 fails to build on CentOS 7.x machines
Status: RESOLVED MOVED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-11 22:11 UTC by Alexey Brodkin
Modified: 2024-06-15 15:12 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Brodkin 2023-08-11 22:11:23 UTC
Starting from commit f1350977634f ("package/fakeroot: bump to version 1.32.1"), see [1], Buildroot fails to compile early that way:
----------------------->8-----------------------
libtool: compile:  /usr/bin/gcc -std=gnu11 -DHAVE_CONFIG_H -I. -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -I.../buildroot/fakeroot/output/host/include -O2 -I.../buildroot/fakeroot/output/host/include -c libfakeroot_time64.c  -fPIC -DPIC -o .libs/libfakeroot_time64_la-libfakeroot_time64.o
In file included from libfakeroot_time64.c:13:0:
/usr/include/fts.h:41:3: error: #error "<fts.h> cannot be used with -D_FILE_OFFSET_BITS==64"
 # error "<fts.h> cannot be used with -D_FILE_OFFSET_BITS==64"
   ^
make[3]: *** [libfakeroot_time64_la-libfakeroot_time64.lo] Error 1
make[3]: Leaving directory `.../buildroot/fakeroot/output/build/host-fakeroot-1.32.1'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `.../buildroot/fakeroot/output/build/host-fakeroot-1.32.1'
make[1]: *** [all] Error 2
make[1]: Leaving directory `.../buildroot/fakeroot/output/build/host-fakeroot-1.32.1'
----------------------->8-----------------------

That happens due to a change in the fakeroot, see [2].
It boils down to use of "fts.h" on 64-bit system with old glibc.
I.e. support of "fts.h" was added in glibc 2.23, see [3]. And in its turn CentOS 7.x uses glibc 2.17, thus we see this (shamelessly copied from [4]):
----------------------->8-----------------------
> cat test.c
#include <fts.h>

int main() {
}

> cc -D_FILE_OFFSET_BITS=64 test.c
In file included from test.c:1:0:
/usr/include/fts.h:41:3: error: #error "<fts.h> cannot be used with -D_FILE_OFFSET_BITS==64"
 # error "<fts.h> cannot be used with -D_FILE_OFFSET_BITS==64"
#include <fts.h>

int main() {
}
----------------------->8-----------------------

Note, with older fakeroot, i.e. reverted [1] my simple build gets to the end successfully.

[1] https://git.buildroot.net/buildroot/commit/?h=f1350977634f96f0404b9801e6f79cb7200cf26d
[2] https://salsa.debian.org/clint/fakeroot/-/commit/c465f716856cd561dba3522a4f5c714ea8bedfbd
[3] https://sourceware.org/git/?p=glibc.git;a=commit;h=8b7b7f75d91f7bac323dd6a370aeb3e9c5c4a7d5
[4] https://github.com/mesonbuild/meson/issues/3519#issuecomment-386281558
Comment 1 Yann E. MORIN 2024-06-15 15:12:15 UTC
Thank you for your report.

The issue tracker for the Buildroot project has been moved to
the Gitlab.com issue tracker:
    https://gitlab.com/buildroot.org/buildroot/-/issues

We are taking this opportunity to close old issues in this old
tracker. If you believe your issue is still relevant, please
open one in the new issue tracker.

Thank you!