Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] coreutils: fix statx failure on native builds
@ 2022-03-01  7:24 Robert Yang
  2022-03-01  7:24 ` [PATCH 1/1] " Robert Yang
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Yang @ 2022-03-01  7:24 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

Davi Poyastro (1):
  coreutils: fix statx failure on native builds

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

-- 
2.31.1



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

* [PATCH 1/1] coreutils: fix statx failure on native builds
  2022-03-01  7:24 [PATCH 0/1] coreutils: fix statx failure on native builds Robert Yang
@ 2022-03-01  7:24 ` Robert Yang
  2022-03-01  7:59   ` [OE-core] " Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Yang @ 2022-03-01  7:24 UTC (permalink / raw)
  To: openembedded-core

From: Davi Poyastro <davi.poyastro@nokia.com>

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 <davi.poyastro@nokia.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 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")
+
     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] 6+ messages in thread

* Re: [OE-core] [PATCH 1/1] coreutils: fix statx failure on native builds
  2022-03-01  7:24 ` [PATCH 1/1] " Robert Yang
@ 2022-03-01  7:59   ` Richard Purdie
  2022-03-01  8:19     ` Robert Yang
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2022-03-01  7:59 UTC (permalink / raw)
  To: Robert Yang, openembedded-core

On Mon, 2022-02-28 at 23:24 -0800, Robert Yang wrote:
> From: Davi Poyastro <davi.poyastro@nokia.com>
> 
> 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 <davi.poyastro@nokia.com>
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
>  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?

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.

Cheers,

Richard



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

* Re: [OE-core] [PATCH 1/1] coreutils: fix statx failure on native builds
  2022-03-01  7:59   ` [OE-core] " Richard Purdie
@ 2022-03-01  8:19     ` Robert Yang
  2022-03-01  8:21       ` Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Yang @ 2022-03-01  8:19 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core



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 <davi.poyastro@nokia.com>
>>
>> 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 <davi.poyastro@nokia.com>
>> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
>> ---
>>   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
> 


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

* Re: [OE-core] [PATCH 1/1] coreutils: fix statx failure on native builds
  2022-03-01  8:19     ` Robert Yang
@ 2022-03-01  8:21       ` Richard Purdie
  2022-03-01  8:28         ` Robert Yang
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2022-03-01  8:21 UTC (permalink / raw)
  To: Robert Yang, openembedded-core

On Tue, 2022-03-01 at 16:19 +0800, Robert Yang wrote:
> 
> 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 <davi.poyastro@nokia.com>
> > > 
> > > 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 <davi.poyastro@nokia.com>
> > > Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> > > ---
> > >   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.

Disabling it unconditionally which a comment about the version issues may be the
only option we have. I'm not sure everyone will like that but if we want to
support that combination, I'm not sure we have much choice.

Cheers,

Richard



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

* Re: [OE-core] [PATCH 1/1] coreutils: fix statx failure on native builds
  2022-03-01  8:21       ` Richard Purdie
@ 2022-03-01  8:28         ` Robert Yang
  0 siblings, 0 replies; 6+ messages in thread
From: Robert Yang @ 2022-03-01  8:28 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core



On 3/1/22 4:21 PM, Richard Purdie wrote:
> On Tue, 2022-03-01 at 16:19 +0800, Robert Yang wrote:
>>
>> 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 <davi.poyastro@nokia.com>
>>>>
>>>> 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 <davi.poyastro@nokia.com>
>>>> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
>>>> ---
>>>>    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.
> 
> Disabling it unconditionally which a comment about the version issues may be the
> only option we have. I'm not sure everyone will like that but if we want to
> support that combination, I'm not sure we have much choice.

It's worth trying for deterministic build, and we only disable coreutils-native,
I will send a patch for it.

// Robert

> 
> Cheers,
> 
> Richard
> 


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

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

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-01  7:24 [PATCH 0/1] coreutils: fix statx failure on native builds Robert Yang
2022-03-01  7:24 ` [PATCH 1/1] " Robert Yang
2022-03-01  7:59   ` [OE-core] " Richard Purdie
2022-03-01  8:19     ` Robert Yang
2022-03-01  8:21       ` Richard Purdie
2022-03-01  8:28         ` Robert Yang

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