[OE-core] [PATCH] kern-tools: tweak symbol_why to be python safe

Bruce Ashfield bruce.ashfield at gmail.com
Wed Feb 5 16:16:03 UTC 2020


On Mon, Feb 3, 2020 at 5:11 PM Martin Jansa <martin.jansa at gmail.com> wrote:
>
> On Mon, Feb 03, 2020 at 04:26:41PM -0500, bruce.ashfield at gmail.com wrote:
> > From: Bruce Ashfield <bruce.ashfield at gmail.com>
> >
> > Updating the SRCREV to pickup tweaks to symbol_why.py to be
> > python3 safe:
> >
> >   - we explicitly call /usr/bin/env python3
> >   - we full specifiy our symbols
> >   - do not assume that 'None' can be converted to a string
> >
> > Signed-off-by: Bruce Ashfield <bruce.ashfield at gmail.com>
> > ---
> >
> > I didn't realized the v5.4 series had gone in, or I would have
> > send this sooner. This should resolve the errors that are thrown
> > when symbol_why is run to detect missing symbol dependencies.
> >
> > Bruce
> >
> >  meta/recipes-kernel/kern-tools/kern-tools-native_git.bb | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
> > index a4c0b6fb8a..57ec1abc6d 100644
> > --- a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
> > +++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
> > @@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://git/tools/kgit;beginline=5;endline=9;md5=9c30e971d435
> >
> >  DEPENDS = "git-native"
> >
> > -SRCREV = "7465c8497893ef8f6503c918aeede969f7e9753b"
> > +SRCREV = "5358eb293399867db05fd73d04ce908d69a03bed"
> >  PR = "r12"
> >  PV = "0.2+git${SRCPV}"
>
> This needs a bit more cleanup for python3.

Martin,

I've got builds and tests running on the rest of the patches that have
come in recently, and I wanted to loop back to this one.

I'm dropping into a devshell and running the symbol_why.py script
using python3 from the sysroot and I didn't see the same issues (But I
do have changes for what's in your log).

I'll double check once my build churns through the queued patches
here, but I thought I'd check with you to see if you are still seeing
this with the various fixes for the gold linker you've pulled together
? I'm guessing that now that it isn't aborting early, the warnings
aren't triggering and hence it isn't even running (like it was in my
runs), so you can't say one way or the other,

I'm mainly interested to hear if it was a host python3 or the
sysroot-native one that was tossing those errors, so I can detangle my
last changes and test in a similar env.

Cheers,

Bruce

>
> DEBUG: Executing python function do_kernel_configcheck
> Traceback (most recent call last):
>   File "/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native/usr/bin/kconfiglib.py", line 2776, in _expand_macro
>     res += args[int(new_args[0])]
> ValueError: invalid literal for int() with base 10: 'error-if'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File "/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native/usr/bin/symbol_why.py", line 295, in <module>
>     conf = kconfiglib.Kconfig( kconf, show_errors, show_errors )
>   File "/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native/usr/bin/kconfiglib.py", line 947, in __init__
>     self._init(filename, warn, warn_to_stderr, encoding)
>   File "/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native/usr/bin/kconfiglib.py", line 1085, in _init
>     self._parse_block(None, self.top_node, self.top_node).next = None
>   File "/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native/usr/bin/kconfiglib.py", line 2982, in _parse_block
>     prev = self._parse_block(None, parent, prev)
>   File "/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native/usr/bin/kconfiglib.py", line 2907, in _parse_block
>     while self._next_line():
>   File "/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native/usr/bin/kconfiglib.py", line 2234, in _next_line
>     self._tokens = self._tokenize(line)
>   File "/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native/usr/bin/kconfiglib.py", line 2364, in _tokenize
>     self._parse_assignment(s)
>   File "/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native/usr/bin/kconfiglib.py", line 2604, in _parse_assignment
>     s, i = self._expand_macro(s, i, ())
>   File "/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native/usr/bin/kconfiglib.py", line 2780, in _expand_macro
>     res += self._fn_val(new_args)
>   File "/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native/usr/bin/kconfiglib.py", line 2843, in _fn_val
>     return py_fn(self, *args)
>   File "/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native/usr/bin/kconfiglib.py", line 6769, in _error_if_fn
>     kconf.filename, kconf.linenr, msg))
> kconfiglib.KconfigError: scripts/Kconfig.include:39:  gold linker 'x86_64-oe-linux-ld --sysroot=/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot  ' not supported
> Traceback (most recent call last):
>   File "/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native/usr/bin/kconfiglib.py", line 2776, in _expand_macro
>     res += args[int(new_args[0])]
> ValueError: invalid literal for int() with base 10: 'error-if'
>
> During handling of the above exception, another exception occurred:
>
> and the log is full of this (the warnings at the end look the same as before)
>
> # wc -l /OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/temp/log.do_kernel_configcheck.28364
> 11804 /OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/temp/log.do_kernel_configcheck.28364
>
> Maybe kernel_configcheck now needs KERNEL_LD exported as well? See:
> https://patchwork.openembedded.org/patch/169702/
> which fixed do_configure with 5.4.



-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


More information about the Openembedded-core mailing list