* [PATCH] package: split strip cmd when ccache is used
@ 2023-10-31 4:27 Javier Tia
2023-10-31 12:26 ` [OE-core] " Richard Purdie
0 siblings, 1 reply; 6+ messages in thread
From: Javier Tia @ 2023-10-31 4:27 UTC (permalink / raw)
To: openembedded-core; +Cc: Javier Tia
Using ccache stopped to work after 77497dbdca with following error:
FileNotFoundError: [Errno 2] No such file or directory: 'ccache aarch64-trs-linux-strip'
Signed-off-by: Javier Tia <javier.tia@linaro.org>
---
meta/lib/oe/package.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index 1dd20f85eb..2685da0af9 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -39,7 +39,7 @@ def runstrip(arg):
newmode = origmode | stat.S_IWRITE | stat.S_IREAD
os.chmod(file, newmode)
- stripcmd = [strip]
+ stripcmd = strip.split() if "ccache" in strip else [strip]
skip_strip = False
# kernel module
if elftype & 16:
--
2.42.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH] package: split strip cmd when ccache is used
2023-10-31 4:27 [PATCH] package: split strip cmd when ccache is used Javier Tia
@ 2023-10-31 12:26 ` Richard Purdie
2023-10-31 15:29 ` Christopher Larson
2023-11-20 15:28 ` Javier Tia
0 siblings, 2 replies; 6+ messages in thread
From: Richard Purdie @ 2023-10-31 12:26 UTC (permalink / raw)
To: Javier Tia, openembedded-core
On Mon, 2023-10-30 at 22:27 -0600, Javier Tia wrote:
> Using ccache stopped to work after 77497dbdca with following error:
>
> FileNotFoundError: [Errno 2] No such file or directory: 'ccache aarch64-trs-linux-strip'
>
> Signed-off-by: Javier Tia <javier.tia@linaro.org>
> ---
> meta/lib/oe/package.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
> index 1dd20f85eb..2685da0af9 100644
> --- a/meta/lib/oe/package.py
> +++ b/meta/lib/oe/package.py
> @@ -39,7 +39,7 @@ def runstrip(arg):
> newmode = origmode | stat.S_IWRITE | stat.S_IREAD
> os.chmod(file, newmode)
>
> - stripcmd = [strip]
> + stripcmd = strip.split() if "ccache" in strip else [strip]
> skip_strip = False
> # kernel module
> if elftype & 16:
That looks very like a hack/workaround rather than a real fix. The
packaging code shouldn't know/care about ccache.
Should we always be splitting strip?
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH] package: split strip cmd when ccache is used
2023-10-31 12:26 ` [OE-core] " Richard Purdie
@ 2023-10-31 15:29 ` Christopher Larson
2023-11-20 15:28 ` Javier Tia
1 sibling, 0 replies; 6+ messages in thread
From: Christopher Larson @ 2023-10-31 15:29 UTC (permalink / raw)
To: Richard Purdie; +Cc: Javier Tia, openembedded-core
[-- Attachment #1: Type: text/plain, Size: 1994 bytes --]
I'd suggest using shlex.split() all the time when dealing with pieces of a
shell command-line, rather than assuming single-word or using str.split().
On Tue, Oct 31, 2023 at 5:26 AM Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:
> On Mon, 2023-10-30 at 22:27 -0600, Javier Tia wrote:
> > Using ccache stopped to work after 77497dbdca with following error:
> >
> > FileNotFoundError: [Errno 2] No such file or directory: 'ccache
> aarch64-trs-linux-strip'
> >
> > Signed-off-by: Javier Tia <javier.tia@linaro.org>
> > ---
> > meta/lib/oe/package.py | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
> > index 1dd20f85eb..2685da0af9 100644
> > --- a/meta/lib/oe/package.py
> > +++ b/meta/lib/oe/package.py
> > @@ -39,7 +39,7 @@ def runstrip(arg):
> > newmode = origmode | stat.S_IWRITE | stat.S_IREAD
> > os.chmod(file, newmode)
> >
> > - stripcmd = [strip]
> > + stripcmd = strip.split() if "ccache" in strip else [strip]
> > skip_strip = False
> > # kernel module
> > if elftype & 16:
>
> That looks very like a hack/workaround rather than a real fix. The
> packaging code shouldn't know/care about ccache.
>
> Should we always be splitting strip?
>
> Cheers,
>
> Richard
>
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#189838):
> https://lists.openembedded.org/g/openembedded-core/message/189838
> Mute This Topic: https://lists.openembedded.org/mt/102291706/3617123
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> kergoth@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
--
Christopher Larson
chris_larson@mentor.com, chris.larson@siemens.com, kergoth@gmail.com
Principal Software Engineer, Embedded Linux Solutions, Siemens Digital
Industries Software
[-- Attachment #2: Type: text/html, Size: 3234 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH] package: split strip cmd when ccache is used
2023-10-31 12:26 ` [OE-core] " Richard Purdie
2023-10-31 15:29 ` Christopher Larson
@ 2023-11-20 15:28 ` Javier Tia
2023-11-20 16:06 ` Martin Jansa
1 sibling, 1 reply; 6+ messages in thread
From: Javier Tia @ 2023-11-20 15:28 UTC (permalink / raw)
To: Richard Purdie, openembedded-core
On 10/31/23 06:26, Richard Purdie wrote:
>
> That looks very like a hack/workaround rather than a real fix. The
> packaging code shouldn't know/care about ccache.
Took another look at the problem to find a proper solution. Removing
CCACHE from KERNEL_STRIP along with the rest of the KERNEL_* variables,
except for the compiler.
As of right now, ccache is limited to compilers. Attempting to use it
with other tools is not beneficial. I received the confirmation from
ccache's maintainer. [1]
I will be submitting another patch.
[1]
https://github.com/ccache/ccache/discussions/1346#discussioncomment-7616180
Regards,
» Javier Tia 🖋
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH] package: split strip cmd when ccache is used
2023-11-20 15:28 ` Javier Tia
@ 2023-11-20 16:06 ` Martin Jansa
2023-11-21 13:14 ` Javier Tia
0 siblings, 1 reply; 6+ messages in thread
From: Martin Jansa @ 2023-11-20 16:06 UTC (permalink / raw)
To: Javier Tia; +Cc: Richard Purdie, openembedded-core
[-- Attachment #1: Type: text/plain, Size: 1380 bytes --]
It was already removed from KERNEL_STRIP in:
https://git.openembedded.org/openembedded-core/commit/?id=41f019afc41f800b622c46a6d7cf1beffc97716a
On Mon, Nov 20, 2023 at 4:28 PM Javier Tia <javier.tia@linaro.org> wrote:
> On 10/31/23 06:26, Richard Purdie wrote:
> >
> > That looks very like a hack/workaround rather than a real fix. The
> > packaging code shouldn't know/care about ccache.
> Took another look at the problem to find a proper solution. Removing
> CCACHE from KERNEL_STRIP along with the rest of the KERNEL_* variables,
> except for the compiler.
>
> As of right now, ccache is limited to compilers. Attempting to use it
> with other tools is not beneficial. I received the confirmation from
> ccache's maintainer. [1]
>
> I will be submitting another patch.
>
> [1]
> https://github.com/ccache/ccache/discussions/1346#discussioncomment-7616180
>
> Regards,
> » Javier Tia 🖋
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#190882):
> https://lists.openembedded.org/g/openembedded-core/message/190882
> Mute This Topic: https://lists.openembedded.org/mt/102291706/3617156
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> martin.jansa@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
[-- Attachment #2: Type: text/html, Size: 2445 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH] package: split strip cmd when ccache is used
2023-11-20 16:06 ` Martin Jansa
@ 2023-11-21 13:14 ` Javier Tia
0 siblings, 0 replies; 6+ messages in thread
From: Javier Tia @ 2023-11-21 13:14 UTC (permalink / raw)
To: Martin Jansa; +Cc: Richard Purdie, openembedded-core
On 11/20/23 10:06, Martin Jansa wrote:
> It was already removed from KERNEL_STRIP in:
> https://git.openembedded.org/openembedded-core/commit/?id=41f019afc41f800b622c46a6d7cf1beffc97716a <https://git.openembedded.org/openembedded-core/commit/?id=41f019afc41f800b622c46a6d7cf1beffc97716a>
>
Oh, great! Submitting a difference change as CCACHE need to be removed
from the rest of tooling like LD and AR. Keeping only the compiler.
Thanks,
» Javier Tia 🖋
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-11-21 13:15 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-31 4:27 [PATCH] package: split strip cmd when ccache is used Javier Tia
2023-10-31 12:26 ` [OE-core] " Richard Purdie
2023-10-31 15:29 ` Christopher Larson
2023-11-20 15:28 ` Javier Tia
2023-11-20 16:06 ` Martin Jansa
2023-11-21 13:14 ` Javier Tia
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox