All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iproute2.inc: clean .o before do_configure
@ 2020-05-07  2:05 Changqing Li
  2020-05-07  5:56 ` [OE-core] " Jacob Kroon
  0 siblings, 1 reply; 5+ messages in thread
From: Changqing Li @ 2020-05-07  2:05 UTC (permalink / raw)
  To: openembedded-core

From: Changqing Li <changqing.li@windriver.com>

Reproduce steps:
1. add 'DISTRO_FEATURES_append = ' usrmerge'' in local.conf
2. bitbake iproute2
3. remove 'DISTRO_FEATURES_append = ' usrmerge'' from local.conf
4. bitbake iproute2

In step4, since CLEANBROKEN is set, files generated in step2 is not
cleaned and rebuilded. Check after step4:

file /sbin/ip.iproute2
/sbin/ip.iproute2: ELF 64-bit LSB pie executable, x86-64, version 1
(SYSV), dynamically linked, interpreter /usr/lib64/ld-linux-x86-64.so.2,

interpreter path is wrong, it should be  /lib64/ld-linux-x86-64.so.2

This will make run ip.iproute2 report error:
-sh: /sbin/ip.iproute2: No such file or directory

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 meta/recipes-connectivity/iproute2/iproute2.inc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-connectivity/iproute2/iproute2.inc b/meta/recipes-connectivity/iproute2/iproute2.inc
index 403d264..e70620c 100644
--- a/meta/recipes-connectivity/iproute2/iproute2.inc
+++ b/meta/recipes-connectivity/iproute2/iproute2.inc
@@ -29,6 +29,10 @@ EXTRA_OEMAKE = "\
     LIBDIR='${libdir}' \
 "
 
+do_configure_prepend () {
+    find ${B} -ignore_readdir_race -name \*.o -type f -print0 | xargs -0 rm -f
+}
+
 do_configure_append () {
     sh configure ${STAGING_INCDIR}
     # Explicitly disable ATM support
-- 
2.7.4


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

* Re: [OE-core] [PATCH] iproute2.inc: clean .o before do_configure
  2020-05-07  2:05 [PATCH] iproute2.inc: clean .o before do_configure Changqing Li
@ 2020-05-07  5:56 ` Jacob Kroon
  2020-05-07  6:10   ` Changqing Li
  0 siblings, 1 reply; 5+ messages in thread
From: Jacob Kroon @ 2020-05-07  5:56 UTC (permalink / raw)
  To: Changqing Li, openembedded-core

On 5/7/20 4:05 AM, Changqing Li wrote:
> From: Changqing Li <changqing.li@windriver.com>
> 
> Reproduce steps:
> 1. add 'DISTRO_FEATURES_append = ' usrmerge'' in local.conf
> 2. bitbake iproute2
> 3. remove 'DISTRO_FEATURES_append = ' usrmerge'' from local.conf
> 4. bitbake iproute2
> 
> In step4, since CLEANBROKEN is set, files generated in step2 is not
> cleaned and rebuilded. Check after step4:
> 
> file /sbin/ip.iproute2
> /sbin/ip.iproute2: ELF 64-bit LSB pie executable, x86-64, version 1
> (SYSV), dynamically linked, interpreter /usr/lib64/ld-linux-x86-64.so.2,
> 
> interpreter path is wrong, it should be  /lib64/ld-linux-x86-64.so.2
> 
> This will make run ip.iproute2 report error:
> -sh: /sbin/ip.iproute2: No such file or directory
> 
> Signed-off-by: Changqing Li <changqing.li@windriver.com>
> ---
>   meta/recipes-connectivity/iproute2/iproute2.inc | 4 ++++
>   1 file changed, 4 insertions(+)
> 

Isn't this a general problem, and not specific to just iproute2 ?

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

* Re: [OE-core] [PATCH] iproute2.inc: clean .o before do_configure
  2020-05-07  5:56 ` [OE-core] " Jacob Kroon
@ 2020-05-07  6:10   ` Changqing Li
  2020-05-07  6:19     ` Jacob Kroon
  0 siblings, 1 reply; 5+ messages in thread
From: Changqing Li @ 2020-05-07  6:10 UTC (permalink / raw)
  To: Jacob Kroon, openembedded-core

On 5/7/20 1:56 PM, Jacob Kroon wrote:
> On 5/7/20 4:05 AM, Changqing Li wrote:
>> From: Changqing Li <changqing.li@windriver.com>
>>
>> Reproduce steps:
>> 1. add 'DISTRO_FEATURES_append = ' usrmerge'' in local.conf
>> 2. bitbake iproute2
>> 3. remove 'DISTRO_FEATURES_append = ' usrmerge'' from local.conf
>> 4. bitbake iproute2
>>
>> In step4, since CLEANBROKEN is set, files generated in step2 is not
>> cleaned and rebuilded. Check after step4:
>>
>> file /sbin/ip.iproute2
>> /sbin/ip.iproute2: ELF 64-bit LSB pie executable, x86-64, version 1
>> (SYSV), dynamically linked, interpreter /usr/lib64/ld-linux-x86-64.so.2,
>>
>> interpreter path is wrong, it should be /lib64/ld-linux-x86-64.so.2
>>
>> This will make run ip.iproute2 report error:
>> -sh: /sbin/ip.iproute2: No such file or directory
>>
>> Signed-off-by: Changqing Li <changqing.li@windriver.com>
>> ---
>>   meta/recipes-connectivity/iproute2/iproute2.inc | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>
> Isn't this a general problem, and not specific to just iproute2 ?

For  those recipe ${B} != ${S} ,  ${B} will be cleaned,  will not have 
this problem.

and by default, CLEANBROKEN is not set,  make clean will be executed.

but for this specific recipe,  both condition not matched.



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

* Re: [OE-core] [PATCH] iproute2.inc: clean .o before do_configure
  2020-05-07  6:10   ` Changqing Li
@ 2020-05-07  6:19     ` Jacob Kroon
  2020-05-08  4:02       ` Changqing Li
  0 siblings, 1 reply; 5+ messages in thread
From: Jacob Kroon @ 2020-05-07  6:19 UTC (permalink / raw)
  To: Changqing Li, openembedded-core

On 5/7/20 8:10 AM, Changqing Li wrote:
> On 5/7/20 1:56 PM, Jacob Kroon wrote:
>> On 5/7/20 4:05 AM, Changqing Li wrote:
>>> From: Changqing Li <changqing.li@windriver.com>
>>>
>>> Reproduce steps:
>>> 1. add 'DISTRO_FEATURES_append = ' usrmerge'' in local.conf
>>> 2. bitbake iproute2
>>> 3. remove 'DISTRO_FEATURES_append = ' usrmerge'' from local.conf
>>> 4. bitbake iproute2
>>>
>>> In step4, since CLEANBROKEN is set, files generated in step2 is not
>>> cleaned and rebuilded. Check after step4:
>>>
>>> file /sbin/ip.iproute2
>>> /sbin/ip.iproute2: ELF 64-bit LSB pie executable, x86-64, version 1
>>> (SYSV), dynamically linked, interpreter /usr/lib64/ld-linux-x86-64.so.2,
>>>
>>> interpreter path is wrong, it should be /lib64/ld-linux-x86-64.so.2
>>>
>>> This will make run ip.iproute2 report error:
>>> -sh: /sbin/ip.iproute2: No such file or directory
>>>
>>> Signed-off-by: Changqing Li <changqing.li@windriver.com>
>>> ---
>>>   meta/recipes-connectivity/iproute2/iproute2.inc | 4 ++++
>>>   1 file changed, 4 insertions(+)
>>>
>>
>> Isn't this a general problem, and not specific to just iproute2 ?
> 
> For  those recipe ${B} != ${S} ,  ${B} will be cleaned,  will not have 
> this problem.
> 
> and by default, CLEANBROKEN is not set,  make clean will be executed.
> 
> but for this specific recipe,  both condition not matched.
> 
> 

btrfs-tools inherits autotools-brokensep and sets CLEANBROKEN = "1", 
will it also require a similar fix ?

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

* Re: [OE-core] [PATCH] iproute2.inc: clean .o before do_configure
  2020-05-07  6:19     ` Jacob Kroon
@ 2020-05-08  4:02       ` Changqing Li
  0 siblings, 0 replies; 5+ messages in thread
From: Changqing Li @ 2020-05-08  4:02 UTC (permalink / raw)
  To: Jacob Kroon, openembedded-core, Richard Purdie


On 5/7/20 2:19 PM, Jacob Kroon wrote:
> On 5/7/20 8:10 AM, Changqing Li wrote:
>> On 5/7/20 1:56 PM, Jacob Kroon wrote:
>>> On 5/7/20 4:05 AM, Changqing Li wrote:
>>>> From: Changqing Li <changqing.li@windriver.com>
>>>>
>>>> Reproduce steps:
>>>> 1. add 'DISTRO_FEATURES_append = ' usrmerge'' in local.conf
>>>> 2. bitbake iproute2
>>>> 3. remove 'DISTRO_FEATURES_append = ' usrmerge'' from local.conf
>>>> 4. bitbake iproute2
>>>>
>>>> In step4, since CLEANBROKEN is set, files generated in step2 is not
>>>> cleaned and rebuilded. Check after step4:
>>>>
>>>> file /sbin/ip.iproute2
>>>> /sbin/ip.iproute2: ELF 64-bit LSB pie executable, x86-64, version 1
>>>> (SYSV), dynamically linked, interpreter 
>>>> /usr/lib64/ld-linux-x86-64.so.2,
>>>>
>>>> interpreter path is wrong, it should be /lib64/ld-linux-x86-64.so.2
>>>>
>>>> This will make run ip.iproute2 report error:
>>>> -sh: /sbin/ip.iproute2: No such file or directory
>>>>
>>>> Signed-off-by: Changqing Li <changqing.li@windriver.com>
>>>> ---
>>>>   meta/recipes-connectivity/iproute2/iproute2.inc | 4 ++++
>>>>   1 file changed, 4 insertions(+)
>>>>
>>>
>>> Isn't this a general problem, and not specific to just iproute2 ?
>>
>> For  those recipe ${B} != ${S} ,  ${B} will be cleaned,  will not 
>> have this problem.
>>
>> and by default, CLEANBROKEN is not set,  make clean will be executed.
>>
>> but for this specific recipe,  both condition not matched.
>>
>>
>
> btrfs-tools inherits autotools-brokensep and sets CLEANBROKEN = "1", 
> will it also require a similar fix ?

In theory, btrfs-tools and other recipes like this will met similar 
problem.


But I tested on btrfs-tools, it don't met problem even without clean, 
since some dependency changed, so

binary btrfs also recompiled. so this is also related to respective 
makefile.


And your suggestion to make it commons also make sense,  in this way,  
we need to

handle condition (${B} and ${S} is same,and CLEANBROKEN = "1")

in base.bbclass and autotools-brokensep.bbclass.   But one problem here 
is  that

we have kinds of recipes,  not all Intermediate file are *.o, how to 
handle this, any suggestion?

or still handle this in seperate recipes?




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

end of thread, other threads:[~2020-05-08  4:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-07  2:05 [PATCH] iproute2.inc: clean .o before do_configure Changqing Li
2020-05-07  5:56 ` [OE-core] " Jacob Kroon
2020-05-07  6:10   ` Changqing Li
2020-05-07  6:19     ` Jacob Kroon
2020-05-08  4:02       ` Changqing Li

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.