Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/util-linux: fix build with headers < 3.14
@ 2021-10-22 21:53 Fabrice Fontaine
  2021-10-24 13:24 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2021-10-22 21:53 UTC (permalink / raw)
  To: buildroot; +Cc: Yann E . MORIN, Fabrice Fontaine

Fix the following build failure raised since bump to version 2.37.2 in
commit 27a46793b1a0c6c13c00b07d07bd5743e2c9c7b6 and the addition of
uclampset in
https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?id=9dd95bea42a3b467c1f773fd2e781cc9f0d88847:

checking for syscall sched_setattr... no
configure: WARNING: Unable to detect syscall sched_setattr.
checking for syscall sched_setattr... (cached) no
configure: WARNING: Unable to detect syscall sched_setattr.
configure: error: uclampset selected but sched_setattr syscall not found

Fix this build failure by adding a dependency on headers >= 3.14 for
scheduling utilities:
https://github.com/torvalds/linux/commit/fded4329da9e8486b434d6c4aceab1ab3f433d8a

Fixes:
 - http://autobuild.buildroot.org/results/9fe26ab98c93b67f937293f28625843da7ccb77f

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/linux-tools/Config.in | 6 ++++--
 package/util-linux/Config.in  | 6 +++++-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/package/linux-tools/Config.in b/package/linux-tools/Config.in
index 2287ef5888..28641dccdd 100644
--- a/package/linux-tools/Config.in
+++ b/package/linux-tools/Config.in
@@ -105,6 +105,7 @@ config BR2_PACKAGE_LINUX_TOOLS_SELFTESTS
 	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # bash
 	depends on BR2_USE_MMU  # bash
 	depends on !BR2_STATIC_LIBS
+	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14 # util-linux schedutils
 	select BR2_PACKAGE_LINUX_TOOLS
 	select BR2_PACKAGE_BASH # runtime
 	select BR2_PACKAGE_NCURSES
@@ -126,9 +127,10 @@ config BR2_PACKAGE_LINUX_TOOLS_SELFTESTS
 	  This is very much a use at your risk option and may not work
 	  for every setup or every architecture.
 
-comment "selftests needs BR2_PACKAGE_BUSYBOX_SHOW_OTHERS and a toolchain w/ dynamic library"
+comment "selftests needs BR2_PACKAGE_BUSYBOX_SHOW_OTHERS and a toolchain w/ dynamic library and headers >= 3.14"
 	depends on BR2_USE_MMU
-	depends on !BR2_PACKAGE_BUSYBOX_SHOW_OTHERS || BR2_STATIC_LIBS
+	depends on !BR2_PACKAGE_BUSYBOX_SHOW_OTHERS || \
+		BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
 
 config BR2_PACKAGE_LINUX_TOOLS_TMON
 	bool "tmon"
diff --git a/package/util-linux/Config.in b/package/util-linux/Config.in
index f045361ab5..9e9b8933e5 100644
--- a/package/util-linux/Config.in
+++ b/package/util-linux/Config.in
@@ -330,8 +330,12 @@ comment "runuser needs a uClibc or glibc toolchain w/ wchar, locale, dynamic lib
 
 config BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS
 	bool "scheduling utilities"
+	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
 	help
-	  Scheduling utilities (chrt, ionice, taskset)
+	  Scheduling utilities (chrt, ionice, taskset, uclampset)
+
+comment "scheduling utilities need a toolchain w/ headers >= 3.14"
+	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
 
 config BR2_PACKAGE_UTIL_LINUX_SETPRIV
 	bool "setpriv"
-- 
2.33.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/util-linux: fix build with headers < 3.14
  2021-10-22 21:53 [Buildroot] [PATCH 1/1] package/util-linux: fix build with headers < 3.14 Fabrice Fontaine
@ 2021-10-24 13:24 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2021-10-24 13:24 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Yann E . MORIN, buildroot

On Fri, 22 Oct 2021 23:53:37 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Fix the following build failure raised since bump to version 2.37.2 in
> commit 27a46793b1a0c6c13c00b07d07bd5743e2c9c7b6 and the addition of
> uclampset in
> https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?id=9dd95bea42a3b467c1f773fd2e781cc9f0d88847:
> 
> checking for syscall sched_setattr... no
> configure: WARNING: Unable to detect syscall sched_setattr.
> checking for syscall sched_setattr... (cached) no
> configure: WARNING: Unable to detect syscall sched_setattr.
> configure: error: uclampset selected but sched_setattr syscall not found

A bit of a pitty that they don't automatically disable building this
tool, or something like that, but fair enough.

> 
> Fix this build failure by adding a dependency on headers >= 3.14 for
> scheduling utilities:
> https://github.com/torvalds/linux/commit/fded4329da9e8486b434d6c4aceab1ab3f433d8a

This commit points to just wiring the syscall on the s390 architecture,
which is not really "that" important, so I changed the reference to
e6cfc0295c7d51b008999a8b13a44fb43f8685ea instead (which also appeared
in 3.14, so it doesn't change the rest of the patch).

Applied with that change. Thanks!

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] 2+ messages in thread

end of thread, other threads:[~2021-10-24 13:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-22 21:53 [Buildroot] [PATCH 1/1] package/util-linux: fix build with headers < 3.14 Fabrice Fontaine
2021-10-24 13:24 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox