Bug 14353

Summary: oe-selftest-ubuntu: buildoptions.ImageOptionsTests.test_ccache_tool failed
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Naveen Saini <naveen.kumar.saini>
Component: coreAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: meta.mr.watcher, meta.watcher, randy.macleod
Version: 3.3   
Target Milestone: 3.4 M1   
Hardware: x86   
OS: Multiple   
Whiteboard: AB-INT
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Naveen Saini 2021-04-21 03:38:18 UTC
ccache-native is failing on master-next:

worker: ubuntu1604-ty-1

https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/2041


NOTE: Running task 182 of 183 (virtual:native:/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/meta/recipes-devtools/ccache/ccache_4.2.1.bb:do_populate_sysroot)
NOTE: recipe ccache-native-4.2.1-r0: task do_populate_sysroot: Started
ERROR: ccache-native-4.2.1-r0 do_populate_sysroot: Error executing a python function in exec_python_func() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
     0001:
 *** 0002:uninative_changeinterp(d)
     0003:
File: '/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/meta/classes/uninative.bbclass', lineno: 170, function: uninative_changeinterp
     0166:                continue
     0167:            if not elf.isDynamic():
     0168:                continue
     0169:
 *** 0170:            subprocess.check_output(("patchelf-uninative", "--set-interpreter", d.getVar("UNINATIVE_LOADER"), f), stderr=subprocess.STDOUT)
     0171:}
File: '/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/buildtools/sysroots/x86_64-pokysdk-linux/usr/lib/python3.9/subprocess.py', lineno: 420, function: check_output
     0416:        # Explicitly passing input=None was previously equivalent to passing an
     0417:        # empty string. That is maintained here for backwards compatibility.
     0418:        kwargs['input'] = '' if kwargs.get('universal_newlines', False) else b''
     0419:
 *** 0420:    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
     0421:               **kwargs).stdout
     0422:
     0423:
     0424:class CompletedProcess(object):
File: '/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/buildtools/sysroots/x86_64-pokysdk-linux/usr/lib/python3.9/subprocess.py', lineno: 524, function: run
     0520:            # We don't call process.wait() as .__exit__ does that for us.
     0521:            raise
     0522:        retcode = process.poll()
     0523:        if check and retcode:
 *** 0524:            raise CalledProcessError(retcode, process.args,
     0525:                                     output=stdout, stderr=stderr)
     0526:    return CompletedProcess(process.args, retcode, stdout, stderr)
     0527:
     0528:
Exception: subprocess.CalledProcessError: Command '('patchelf-uninative', '--set-interpreter', '/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/build-st-45480/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2', '/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/build-st-45480/tmp/work/x86_64-linux/ccache-native/4.2.1-r0/sstate-build-populate_sysroot/recipe-sysroot-native/usr/bin/ccache')' returned non-zero exit status 1.

Subprocess output:
patchelf: cannot normalize PT_NOTE segment: non-contiguous SHT_NOTE sections

ERROR: Logfile of failure stored in: /home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/build-st-45480/tmp/work/x86_64-linux/ccache-native/4.2.1-r0/temp/log.do_populate_sysroot.9127
NOTE: recipe ccache-native-4.2.1-r0: task do_populate_sysroot: Failed
Comment 2 Randy MacLeod 2021-04-22 14:40:50 UTC
Only seen in master-next. We need to rebuild uninative to fix this.
Comment 4 Naveen Saini 2021-04-26 03:12:17 UTC
Again on master:
https://autobuilder.yoctoproject.org/typhoon/#/builders/56/builds/1433
Comment 5 Richard Purdie 2021-05-03 16:32:51 UTC
The patchelf fixes in master fix this and are included in uninative 3.1: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=fc277ba0117ea27a53790654a90503d457209f53