* [Buildroot] [PATCH 1/1] package/libselinux: fix build with BR2_TIME_BITS_64
@ 2023-11-30 19:13 Fabrice Fontaine
2023-12-01 20:29 ` Peter Korsgaard
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Fabrice Fontaine @ 2023-11-30 19:13 UTC (permalink / raw)
To: buildroot; +Cc: Antoine Tenart, Marcus Folkesson, Fabrice Fontaine
Do not remove _FILE_OFFSET_BITS=64 from CFLAGS and CPPFLAGS to avoid the
following build failure with BR2_TIME_BITS_64 raised since commit
3c427c64726560ea1743282a3fdb78f5b28692eb:
In file included from /home/autobuild/autobuild/instance-9/output-1/per-package/libselinux/host/mipsel-buildroot-linux-gnu/sysroot/usr/include/features.h:394,
from /home/autobuild/autobuild/instance-9/output-1/per-package/libselinux/host/mipsel-buildroot-linux-gnu/sysroot/usr/include/bits/libc-header-start.h:33,
from /home/autobuild/autobuild/instance-9/output-1/per-package/libselinux/host/mipsel-buildroot-linux-gnu/sysroot/usr/include/stdint.h:26,
from /home/autobuild/autobuild/instance-9/output-1/per-package/libselinux/host/lib/gcc/mipsel-buildroot-linux-gnu/12.3.0/include/stdint.h:9,
from ../include/selinux/avc.h:9,
from avc.c:10:
/home/autobuild/autobuild/instance-9/output-1/per-package/libselinux/host/mipsel-buildroot-linux-gnu/sysroot/usr/include/features-time64.h:26:5: error: #error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
26 | # error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
| ^~~~~
This LFS workaround for glibc < 2.23 was added in 2016 by commit
ebcca24c953d8df4b16bc52c5ba31feae4ed8ad0 and is probably not needed
anymore as glibc 2.23 was released in February 2016:
https://sourceware.org/glibc/wiki/Release/2.23
Fixes:
- http://autobuild.buildroot.org/results/d85c81f87adf3a5945fa369bcec233e6def2ed12
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/libselinux/libselinux.mk | 8 --------
1 file changed, 8 deletions(-)
diff --git a/package/libselinux/libselinux.mk b/package/libselinux/libselinux.mk
index b8de21edaa..529745f82e 100644
--- a/package/libselinux/libselinux.mk
+++ b/package/libselinux/libselinux.mk
@@ -52,14 +52,6 @@ define LIBSELINUX_BUILD_PYTHON_BINDINGS
endef
endif # python3
-# Filter out D_FILE_OFFSET_BITS=64. This fixes errors caused by glibc 2.22. We
-# set CFLAGS, CPPFLAGS and LDFLAGS here because we want to win over the
-# CFLAGS/CPPFLAGS/LDFLAGS definitions passed by $(PKG_PYTHON_DISTUTILS_ENV)
-# when the python binding is enabled.
-LIBSELINUX_MAKE_OPTS += \
- CFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS))" \
- CPPFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))"
-
define LIBSELINUX_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
$(LIBSELINUX_MAKE_OPTS) all
--
2.42.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/libselinux: fix build with BR2_TIME_BITS_64
2023-11-30 19:13 [Buildroot] [PATCH 1/1] package/libselinux: fix build with BR2_TIME_BITS_64 Fabrice Fontaine
@ 2023-12-01 20:29 ` Peter Korsgaard
2023-12-01 20:32 ` Fabrice Fontaine
2023-12-25 10:15 ` Thomas Petazzoni via buildroot
2024-03-03 20:13 ` Arnout Vandecappelle via buildroot
2 siblings, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2023-12-01 20:29 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: Antoine Tenart, Marcus Folkesson, buildroot
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
> Do not remove _FILE_OFFSET_BITS=64 from CFLAGS and CPPFLAGS to avoid the
> following build failure with BR2_TIME_BITS_64 raised since commit
> 3c427c64726560ea1743282a3fdb78f5b28692eb:
> In file included from /home/autobuild/autobuild/instance-9/output-1/per-package/libselinux/host/mipsel-buildroot-linux-gnu/sysroot/usr/include/features.h:394,
> from /home/autobuild/autobuild/instance-9/output-1/per-package/libselinux/host/mipsel-buildroot-linux-gnu/sysroot/usr/include/bits/libc-header-start.h:33,
> from /home/autobuild/autobuild/instance-9/output-1/per-package/libselinux/host/mipsel-buildroot-linux-gnu/sysroot/usr/include/stdint.h:26,
> from /home/autobuild/autobuild/instance-9/output-1/per-package/libselinux/host/lib/gcc/mipsel-buildroot-linux-gnu/12.3.0/include/stdint.h:9,
> from ../include/selinux/avc.h:9,
> from avc.c:10:
> /home/autobuild/autobuild/instance-9/output-1/per-package/libselinux/host/mipsel-buildroot-linux-gnu/sysroot/usr/include/features-time64.h:26:5: error: #error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
> 26 | # error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
> | ^~~~~
> This LFS workaround for glibc < 2.23 was added in 2016 by commit
> ebcca24c953d8df4b16bc52c5ba31feae4ed8ad0 and is probably not needed
> anymore as glibc 2.23 was released in February 2016:
> https://sourceware.org/glibc/wiki/Release/2.23
> Fixes:
> - http://autobuild.buildroot.org/results/d85c81f87adf3a5945fa369bcec233e6def2ed12
Hmm, probably. We do have similar code elsewhere as well though,
presumably that needs to be removed as well?
git grep 'filter-out.*D_FILE_OFFSET_BITS=' package/**/*mk
package/elfutils/elfutils.mk:ELFUTILS_CFLAGS = $(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS))
package/elfutils/elfutils.mk:ELFUTILS_CPPFLAGS = $(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))
package/libselinux/libselinux.mk: CFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS))" \
package/libselinux/libselinux.mk: CPPFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))"
package/ltp-testsuite/ltp-testsuite.mk:LTP_TESTSUITE_CFLAGS = $(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS))
package/ltp-testsuite/ltp-testsuite.mk:LTP_TESTSUITE_CPPFLAGS = $(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))
package/musl/musl.mk: CFLAGS="$(filter-out -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS)) $(MUSL_EXTRA_CFLAGS)" \
package/musl/musl.mk: CPPFLAGS="$(filter-out -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))" \
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/libselinux: fix build with BR2_TIME_BITS_64
2023-12-01 20:29 ` Peter Korsgaard
@ 2023-12-01 20:32 ` Fabrice Fontaine
0 siblings, 0 replies; 6+ messages in thread
From: Fabrice Fontaine @ 2023-12-01 20:32 UTC (permalink / raw)
To: Peter Korsgaard; +Cc: Antoine Tenart, Marcus Folkesson, buildroot
[-- Attachment #1.1: Type: text/plain, Size: 3230 bytes --]
Hi,
Le ven. 1 déc. 2023 à 21:29, Peter Korsgaard <peter@korsgaard.com> a écrit :
> >>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
>
> > Do not remove _FILE_OFFSET_BITS=64 from CFLAGS and CPPFLAGS to avoid the
> > following build failure with BR2_TIME_BITS_64 raised since commit
> > 3c427c64726560ea1743282a3fdb78f5b28692eb:
>
> > In file included from
> /home/autobuild/autobuild/instance-9/output-1/per-package/libselinux/host/mipsel-buildroot-linux-gnu/sysroot/usr/include/features.h:394,
> > from
> /home/autobuild/autobuild/instance-9/output-1/per-package/libselinux/host/mipsel-buildroot-linux-gnu/sysroot/usr/include/bits/libc-header-start.h:33,
> > from
> /home/autobuild/autobuild/instance-9/output-1/per-package/libselinux/host/mipsel-buildroot-linux-gnu/sysroot/usr/include/stdint.h:26,
> > from
> /home/autobuild/autobuild/instance-9/output-1/per-package/libselinux/host/lib/gcc/mipsel-buildroot-linux-gnu/12.3.0/include/stdint.h:9,
> > from ../include/selinux/avc.h:9,
> > from avc.c:10:
> >
> /home/autobuild/autobuild/instance-9/output-1/per-package/libselinux/host/mipsel-buildroot-linux-gnu/sysroot/usr/include/features-time64.h:26:5:
> error: #error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
> > 26 | # error "_TIME_BITS=64 is allowed only with
> _FILE_OFFSET_BITS=64"
> > | ^~~~~
>
> > This LFS workaround for glibc < 2.23 was added in 2016 by commit
> > ebcca24c953d8df4b16bc52c5ba31feae4ed8ad0 and is probably not needed
> > anymore as glibc 2.23 was released in February 2016:
> > https://sourceware.org/glibc/wiki/Release/2.23
>
> > Fixes:
> > -
> http://autobuild.buildroot.org/results/d85c81f87adf3a5945fa369bcec233e6def2ed12
>
> Hmm, probably. We do have similar code elsewhere as well though,
> presumably that needs to be removed as well?
>
Yes, but before sending a bunch of patches, I wanted to get your feedback
on this one to avoid wasting time.
>
> git grep 'filter-out.*D_FILE_OFFSET_BITS=' package/**/*mk
> package/elfutils/elfutils.mk:ELFUTILS_CFLAGS = $(filter-out
> -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS))
> package/elfutils/elfutils.mk:ELFUTILS_CPPFLAGS = $(filter-out
> -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))
> package/libselinux/libselinux.mk: CFLAGS="$(filter-out
> -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS))" \
> package/libselinux/libselinux.mk: CPPFLAGS="$(filter-out
> -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))"
> package/ltp-testsuite/ltp-testsuite.mk:LTP_TESTSUITE_CFLAGS =
> $(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS))
> package/ltp-testsuite/ltp-testsuite.mk:LTP_TESTSUITE_CPPFLAGS =
> $(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))
> package/musl/musl.mk: CFLAGS="$(filter-out -D_LARGEFILE_SOURCE
> -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS))
> $(MUSL_EXTRA_CFLAGS)" \
> package/musl/musl.mk: CPPFLAGS="$(filter-out
> -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
> -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))" \
>
> --
> Bye, Peter Korsgaard
>
Best Regards,
Fabrice
[-- Attachment #1.2: Type: text/html, Size: 4570 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/libselinux: fix build with BR2_TIME_BITS_64
2023-11-30 19:13 [Buildroot] [PATCH 1/1] package/libselinux: fix build with BR2_TIME_BITS_64 Fabrice Fontaine
2023-12-01 20:29 ` Peter Korsgaard
@ 2023-12-25 10:15 ` Thomas Petazzoni via buildroot
2024-01-11 14:08 ` Arnout Vandecappelle via buildroot
2024-03-03 20:13 ` Arnout Vandecappelle via buildroot
2 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-12-25 10:15 UTC (permalink / raw)
To: Fabrice Fontaine
Cc: Antoine Tenart, Marcus Folkesson, buildroot, Romain Naour,
Yann E. MORIN
On Thu, 30 Nov 2023 20:13:05 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> This LFS workaround for glibc < 2.23 was added in 2016 by commit
> ebcca24c953d8df4b16bc52c5ba31feae4ed8ad0 and is probably not needed
> anymore as glibc 2.23 was released in February 2016:
> https://sourceware.org/glibc/wiki/Release/2.23
We still have in our external toolchains
toolchain/toolchain-external/toolchain-external-codesourcery-arm/,
which is a toolchain from 2014, and it uses glibc 2.18. So I suspect
this change would break with this glibc toolchain. However, this older
glibc toolchain will clearly not support 64-bit time_t.
So either we decide that we stop supporting anything older than glibc
2.23, or we have to add some condition on the version of glibc being
used.
Let's see the opinion of the other maintainers.
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/libselinux: fix build with BR2_TIME_BITS_64
2023-12-25 10:15 ` Thomas Petazzoni via buildroot
@ 2024-01-11 14:08 ` Arnout Vandecappelle via buildroot
0 siblings, 0 replies; 6+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2024-01-11 14:08 UTC (permalink / raw)
To: Thomas Petazzoni, Fabrice Fontaine
Cc: Antoine Tenart, Marcus Folkesson, buildroot, Romain Naour,
Yann E. MORIN
On 25/12/2023 11:15, Thomas Petazzoni wrote:
> On Thu, 30 Nov 2023 20:13:05 +0100
> Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
>
>> This LFS workaround for glibc < 2.23 was added in 2016 by commit
>> ebcca24c953d8df4b16bc52c5ba31feae4ed8ad0 and is probably not needed
>> anymore as glibc 2.23 was released in February 2016:
>> https://sourceware.org/glibc/wiki/Release/2.23
>
> We still have in our external toolchains
> toolchain/toolchain-external/toolchain-external-codesourcery-arm/,
> which is a toolchain from 2014, and it uses glibc 2.18. So I suspect
> this change would break with this glibc toolchain. However, this older
> glibc toolchain will clearly not support 64-bit time_t.
I'm in favour of removing that ancient toolchain.
In fact, I don't think many of the external toolchains are still useful -
other than the Bootlin toolchains of course.
> So either we decide that we stop supporting anything older than glibc
> 2.23, or we have to add some condition on the version of glibc being
> used.
Yeah, I'm in favour of silently assuming that glibc is sufficiently recent. We
already do that for uClibc BTW.
Regards,
Arnout
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/libselinux: fix build with BR2_TIME_BITS_64
2023-11-30 19:13 [Buildroot] [PATCH 1/1] package/libselinux: fix build with BR2_TIME_BITS_64 Fabrice Fontaine
2023-12-01 20:29 ` Peter Korsgaard
2023-12-25 10:15 ` Thomas Petazzoni via buildroot
@ 2024-03-03 20:13 ` Arnout Vandecappelle via buildroot
2 siblings, 0 replies; 6+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2024-03-03 20:13 UTC (permalink / raw)
To: Fabrice Fontaine, buildroot; +Cc: Antoine Tenart, Marcus Folkesson
On 30/11/2023 20:13, Fabrice Fontaine wrote:
> Do not remove _FILE_OFFSET_BITS=64 from CFLAGS and CPPFLAGS to avoid the
> following build failure with BR2_TIME_BITS_64 raised since commit
> 3c427c64726560ea1743282a3fdb78f5b28692eb:
>
> In file included from /home/autobuild/autobuild/instance-9/output-1/per-package/libselinux/host/mipsel-buildroot-linux-gnu/sysroot/usr/include/features.h:394,
> from /home/autobuild/autobuild/instance-9/output-1/per-package/libselinux/host/mipsel-buildroot-linux-gnu/sysroot/usr/include/bits/libc-header-start.h:33,
> from /home/autobuild/autobuild/instance-9/output-1/per-package/libselinux/host/mipsel-buildroot-linux-gnu/sysroot/usr/include/stdint.h:26,
> from /home/autobuild/autobuild/instance-9/output-1/per-package/libselinux/host/lib/gcc/mipsel-buildroot-linux-gnu/12.3.0/include/stdint.h:9,
> from ../include/selinux/avc.h:9,
> from avc.c:10:
> /home/autobuild/autobuild/instance-9/output-1/per-package/libselinux/host/mipsel-buildroot-linux-gnu/sysroot/usr/include/features-time64.h:26:5: error: #error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
> 26 | # error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
> | ^~~~~
>
> This LFS workaround for glibc < 2.23 was added in 2016 by commit
> ebcca24c953d8df4b16bc52c5ba31feae4ed8ad0 and is probably not needed
> anymore as glibc 2.23 was released in February 2016:
> https://sourceware.org/glibc/wiki/Release/2.23
>
> Fixes:
> - http://autobuild.buildroot.org/results/d85c81f87adf3a5945fa369bcec233e6def2ed12
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Applied to master, thanks.
As pointed out by Thomas, this will (probably) break the build with the
codesourcery-arm toolchain, so that toolchain should be removed as well...
Regards,
Arnout
> ---
> package/libselinux/libselinux.mk | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/package/libselinux/libselinux.mk b/package/libselinux/libselinux.mk
> index b8de21edaa..529745f82e 100644
> --- a/package/libselinux/libselinux.mk
> +++ b/package/libselinux/libselinux.mk
> @@ -52,14 +52,6 @@ define LIBSELINUX_BUILD_PYTHON_BINDINGS
> endef
> endif # python3
>
> -# Filter out D_FILE_OFFSET_BITS=64. This fixes errors caused by glibc 2.22. We
> -# set CFLAGS, CPPFLAGS and LDFLAGS here because we want to win over the
> -# CFLAGS/CPPFLAGS/LDFLAGS definitions passed by $(PKG_PYTHON_DISTUTILS_ENV)
> -# when the python binding is enabled.
> -LIBSELINUX_MAKE_OPTS += \
> - CFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS))" \
> - CPPFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))"
> -
> define LIBSELINUX_BUILD_CMDS
> $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
> $(LIBSELINUX_MAKE_OPTS) all
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-03-03 20:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-30 19:13 [Buildroot] [PATCH 1/1] package/libselinux: fix build with BR2_TIME_BITS_64 Fabrice Fontaine
2023-12-01 20:29 ` Peter Korsgaard
2023-12-01 20:32 ` Fabrice Fontaine
2023-12-25 10:15 ` Thomas Petazzoni via buildroot
2024-01-11 14:08 ` Arnout Vandecappelle via buildroot
2024-03-03 20:13 ` Arnout Vandecappelle via buildroot
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.