Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH v2 0/1] coreutils: Disable statx for native build
@ 2022-03-01  9:13 Robert Yang
  2022-03-01  9:13 ` [PATCH v2 1/1] " Robert Yang
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Yang @ 2022-03-01  9:13 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit b1bb4e2d73985c6e8cf03b0fea94e8b739648cf7:

  flit_core: inherit setuptools3-base (2022-02-27 12:34:05 +0000)

are available in the Git repository at:

  git://git.openembedded.org/openembedded-core-contrib rbt/coreutils
  http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/coreutils

Robert Yang (1):
  coreutils: Disable statx for native build

 meta/recipes-core/coreutils/coreutils_9.0.bb | 7 +++++++
 1 file changed, 7 insertions(+)

-- 
2.31.1



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

* [PATCH v2 1/1] coreutils: Disable statx for native build
  2022-03-01  9:13 [PATCH v2 0/1] coreutils: Disable statx for native build Robert Yang
@ 2022-03-01  9:13 ` Robert Yang
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Yang @ 2022-03-01  9:13 UTC (permalink / raw)
  To: openembedded-core

The statx requires glibc >= 2.28 and linux kernel >= 4.11, but coreutils's
configure only checks glibc compatibility for statx syscall but fail to check
kernel support, e.g.:

RedHat Enterprise Linux Server 7.6 (Maipo)
Host kernel: 3.10.0-1127.8.2.el7.x86_64
Docker OS: Ubuntu 20.04.1 LTS

$ bitbake coreutils-native
find the binary ls and run it as "ls -l ."
The result is something like: "?????????. ? ? ? ? ? foo"

This is because glibc is 2.31 (Ubunut 20.04 in docker) which has statx,
but host's kernel is 3.10.0 (CentOS 7) which doesn't support statx.

Disable statx for native build to fix the problem.

Original from: Davi Poyastro <davi.poyastro@nokia.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/recipes-core/coreutils/coreutils_9.0.bb | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/meta/recipes-core/coreutils/coreutils_9.0.bb b/meta/recipes-core/coreutils/coreutils_9.0.bb
index e4633949f42..e4a948c7e5f 100644
--- a/meta/recipes-core/coreutils/coreutils_9.0.bb
+++ b/meta/recipes-core/coreutils/coreutils_9.0.bb
@@ -151,6 +151,13 @@ ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1"
 ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1"
 ALTERNATIVE_LINK_NAME[stat.1] = "${mandir}/man1/stat.1"
 
+# The statx() requires glibc >= 2.28 and linux kernel >= 4.11, it doesn't work
+# when glibc >= 2.28 ((Ubuntu 20.04 in docker) and kernel < 4.11 (Host OS
+# CentOS 7), we can check kernel version and disable it, but that would cause
+# two different signatures for coreutils-native, so disable it unconditionally
+# for deterministic build.
+EXTRA_OECONF:append:class-native = " ac_cv_func_statx=0"
+
 python __anonymous() {
     for prog in d.getVar('base_bindir_progs').split():
         d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog))
-- 
2.31.1



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

end of thread, other threads:[~2022-03-01  9:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-01  9:13 [PATCH v2 0/1] coreutils: Disable statx for native build Robert Yang
2022-03-01  9:13 ` [PATCH v2 1/1] " Robert Yang

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