On 3/1/22 3:59 PM, Richard Purdie wrote:
On Mon, 2022-02-28 at 23:24 -0800, Robert Yang wrote:
From: Davi Poyastro <[email protected]>

Coreutils configure only checks glibc compatibility for statx
syscall but fail to check kernel support.

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

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

Signed-off-by: Davi Poyastro <[email protected]>
Signed-off-by: Robert Yang <[email protected]>
---
  meta/recipes-core/coreutils/coreutils_9.0.bb | 5 +++++
  1 file changed, 5 insertions(+)

diff --git a/meta/recipes-core/coreutils/coreutils_9.0.bb 
b/meta/recipes-core/coreutils/coreutils_9.0.bb
index e4633949f42..40fad72bbf4 100644
--- a/meta/recipes-core/coreutils/coreutils_9.0.bb
+++ b/meta/recipes-core/coreutils/coreutils_9.0.bb
@@ -152,6 +152,11 @@ ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1"
  ALTERNATIVE_LINK_NAME[stat.1] = "${mandir}/man1/stat.1"
python __anonymous() {
+    from distutils.version import LooseVersion
+    # statx syscall require glibc >= 2.28 and linux kernel >= 4.11
+    if LooseVersion(os.uname().release) < LooseVersion('4.11'):
+        d.appendVar("EXTRA_OECONF_class-native", " ac_cv_func_statx=0")
+

Shouldn't that be EXTRA_OECONF:class-native?

Yes, you're right, I took this patch from hardknott and built it, but didn't realize that I need change the override syntax.


Which makes me worry about where this was tested/needed?

I'm then a bit worried we have two different signatures for coreutils-native
depending upon which host this runs on, which will cause a number of other
issues. I don't think we can do this.

That's a problem, maybe we need disable statx for coreutils-native?

The errors happens when glibc has a higher version (Ubuntu 20.04 in docker) which has statx(), but kernel version is low (CentOS 7) which doesn't support
statx.

// Robert


Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#162532): 
https://lists.openembedded.org/g/openembedded-core/message/162532
Mute This Topic: https://lists.openembedded.org/mt/89471262/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to