【问题标题】:Bitbake build fails because of a python function由于 python 函数,Bitbake 构建失败
【发布时间】:2021-12-12 00:00:42
【问题描述】:

在执行 bitbake 命令期间,构建 rpm 包的任务由于 python 函数而失败。我一直无法确定是什么导致此功能失败。大家有什么想法吗?

    ERROR: perl-5.30.1-r0 do_package_write_rpm: Error executing a python function in exec_func_python() 
autogenerated:The stack trace of python calls that resulted in this exception/failure was: File: 'exec_func_python() autogenerated', lineno: 2, function: <module>
0001: *** 
0002:do_package_rpm(d)     
0003:
File: '/srv/yocto/poky/meta/classes/package_rpm.bbclass', lineno: 712, function: do_package_rpm     
0708:     
0709:    # Build the rpm package!     
0710:    d.setVar('BUILDSPEC', cmd + \"\\n\" + cleanupcmd + \"\\n\")     
0711:    d.setVarFlag('BUILDSPEC', 'func', '1')
0712:    bb.build.exec_func('BUILDSPEC', d)     
0713:     
0714:    if d.getVar('RPM_SIGN_PACKAGES') == '1':
0715:        bb.build.exec_func(\"sign_rpm\", d)     
0716:}
File: '/srv/yocto/poky/bitbake/lib/bb/build.py', lineno: 254, function: exec_func     
0250:    with bb.utils.fileslocked(lockfiles):     
0251:    if ispython:     
0252:            exec_func_python(func, d, runfile, cwd=adir)     
0253:    else: *** 
0254:            exec_func_shell(func, d, runfile, cwd=adir)     
0255:     
0256:    try:     
0257:        curcwd = os.getcwd()     
0258:    except:
File: '/srv/yocto/poky/bitbake/lib/bb/build.py', lineno: 455, function: exec_func_shell     
0451:    with open(fifopath, 'r+b', buffering=0) as fifo:     
0452:        try:     
0453:            bb.debug(2, \"Executing shell function %s\" % func)    
0454:            with open(os.devnull, 'r+') as stdin, logfile: *** 
0455:                bb.process.run(cmd, shell=False, stdin=stdin, log=logfile, extrafiles=[(fifo,readfifo)])     
0456:        finally:     
0457:            os.unlink(fifopath)    
0458:     
0459:    bb.debug(2, \"Shell function %s finished\" % func)
File: '/srv/yocto/poky/bitbake/lib/bb/process.py', lineno: 184, function: run     
0180:     
0181:    if pipe.returncode != 0:     
0182:        if log:     
0183:            # Don't duplicate the output in the exception if logging it *** 
0184:            raise ExecutionError(cmd, pipe.returncode, None, None)     
0185:        raise ExecutionError(cmd, pipe.returncode, stdout, stderr)     
0186:    return stdout, stderr Exception: bb.process.ExecutionError: Execution of '/srv/yocto/build/tmp/work/corei7-64-poky-linux/perl/5.30.1-r0/temp/run.BUILDSPEC.35372' failed with exit code 1

【问题讨论】:

  • 您找到解决方案了吗?遇到同样的问题...
  • 不幸的是我没有。查看日志文件,我在问题中发布的错误之前注意到以下错误:Deprecated external dependency generator is used! create archive failed: cpio: write WARNING: exit code 1 from a shell command. 我已经联系了 yocto 邮件列表中的一些开发人员,其中一位建议运行 'strace ' 在 bitbake 命令上。但是,它会产生过多的输出,因此并没有真正的帮助。

标签: yocto rpm bitbake


【解决方案1】:

我遇到了同样的问题,并意识到我的系统缺少此处定义的一些先决条件:https://docs.yoctoproject.org/3.3.3/ref-manual/system-requirements.html

执行以下命令解决了我的问题:

sudo apt-get install gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint3 xterm python3-subunit mesa-common-dev

【讨论】:

    【解决方案2】:

    我遇到了同样的问题,因为我的食谱中的 SECTION 变量为空 (SECTION="")。我赋予它任何价值,例如SECTION = "a",它解决了问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-09-21
      • 2019-09-24
      • 2012-08-21
      • 2020-12-22
      • 1970-01-01
      • 1970-01-01
      • 2022-12-29
      • 2020-01-16
      相关资源
      最近更新 更多