Bug 14150

Summary: devtool: modify: fails for gstreamer1.0-plugins-good
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Sourabh <sbanerje>
Component: devtools / tool chainAssignee: Unassigned <unassigned>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: Medium+ CC: chee.yang.lee, meta.mr.watcher, meta.watcher, ndec13, randy.macleod, sgw, tim.orling
Version: 3.1.4   
Target Milestone: 4.1 M3   
Hardware: x86   
OS: x86_64   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Sourabh 2020-12-11 09:50:24 UTC
I have an esdk generated and installed from following configurations:

 * MACHINE = "qemux86-64"
 * DISTRO = "poky"

Image used core-image-clutter.

edk generated as follows:
* bitbake -c populate_sdk_ext core-image-clutter

Error observed on following command:
$ devtool modify gstreamer1.0-plugins-good

ERROR: 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:devtool_post_unpack(d)
     0003:
File: '/local/mnt/workspace/sbanerje/DUNFELL_2/SDK_INSTALL/layers/poky/meta/classes/devtool-source.bbclass', lineno: 68, function: devtool_post_unpack
     0064:}
     0065:
     0066:
     0067:python devtool_post_unpack() {
 *** 0068:    import oe.recipeutils
     0069:    import shutil
     0070:    sys.path.insert(0, os.path.join(d.getVar('COREBASE'), 'scripts', 'lib'))
     0071:    import scriptutils
     0072:    from devtool import setup_git_repo
Comment 1 Randy MacLeod 2020-12-17 15:33:57 UTC
Happening on dunfell, someone should check if it's happening on master.
Comment 2 Sourabh 2020-12-18 08:37:13 UTC
I will get back with observation on master.

I did a bit of digging into what's going wrong here, here are my observations:

 1) The real error is as follows

        File: '/local/mnt/workspace/sbanerje/DUNFELL_2/SDK_INSTALL/buildtools/sysroots/x86_64-pokysdk-linux/usr/lib/python3.8/sysconfig.py', lineno: 423, function: _init_posix
             0419:    """Initialize the module as appropriate for POSIX systems."""
             0420:    # _sysconfigdata is generated at build time, see _generate_posix_vars()
             0421:    name = _get_sysconfigdata_name()
             0422:    print(name)
         *** 0423:    _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
             0424:    build_time_vars = _temp.build_time_vars
             0425:    vars.update(build_time_vars)
             0426:
             0427:def _init_non_posix(vars):
        Exception: ModuleNotFoundError: No module named '_sysconfigdata'
        
 2) On deeper digging, seems the above import statement is attempting to import "_sysconfigdata__linux_x86_64-linux-gnu"

 3) The file is present in following paths:

    ./tmp/sysroots/x86_64/usr/lib/python3.8/_sysconfigdata__linux_x86_64-linux-gnu.py
    ./tmp/sysroots/qemux86-64/usr/lib/python3.8/_sysconfigdata__linux_x86_64-linux-gnu.py
    ./tmp/work/core2-64-poky-linux/python3/3.8.2-r0/sysroot-destdir/usr/lib/python3.8/_sysconfigdata__linux_x86_64-linux-gnu.py
    ./tmp/sysroots-components/core2-64/python3/usr/lib/python3.8/_sysconfigdata__linux_x86_64-linux-gnu.py
    ./buildtools/sysroots/x86_64-pokysdk-linux/usr/lib/python3.8/_sysconfigdata__linux_x86_64-linux-gnu.py

    
Hence, I wonder what may be missing? Is it an export path? 

P.S: I am using an "Ubuntu 16.04.6 LTS" as my build-host.
I see a similar discussion here https://patchwork.openembedded.org/patch/175735/
Comment 3 Chee Yang 2022-09-21 01:15:18 UTC
i was not able to reproduce the error with current dunfell (65cf3249fa189d5605fb4ee33c429ab79e3bc865) on "Ubuntu 16.04.7 LTS" host.

not sure if i'm not doing this in right steps or is it fixed ?

the way i tried:
with default local.conf
$ bitbake -c populate_sdk_ext core-image-clutter

after the build, run the esdk script 
./tmp/deploy/sdk/poky-glibc-x86_64-core-image-clutter-core2-64-qemux86-64-toolchain-ext-3.1.19.sh

at another session, go to the path with esdk setup in previous script, run 
$ . ./environment-setup-core2-64-poky-linux

and then
$ devtool modify gstreamer1.0-plugins-good
Comment 4 Randy MacLeod 2022-10-13 17:23:24 UTC
Works for Chee Yang, re-open with clear instructions for reproducing if this still affects you.
Comment 5 Randy MacLeod 2025-02-14 16:46:25 UTC
bulk change to add Saul's non-WR address.
Comment 6 Randy MacLeod 2025-02-14 16:48:23 UTC
Bulk change: Remove Saul's old WR address.