我正在使用 Dunfell yocto 发行版构建映像并在 do_rootfs 上出错。 例外:FileNotFoundError:[Errno 2] 没有这样的文件或目录:'cross-localedef':'cross-localedef'
Build Configuration:
BB_VERSION = "1.46.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "ubuntu-20.04"
TARGET_SYS = "x86_64-oe-linux"
MACHINE = hiding this
DISTRO = hiding this
DISTRO_VERSION = "1.2.0"
TUNE_FEATURES = "m64 corei7"
TARGET_FPU = ""
meta
meta-poky
meta-yocto-bsp = "HEAD:a13bda44fcda4e79e9aed39ca1495eabecb6a7b7"
meta-ipc-bsp = "<unknown>:<unknown>"
meta-intel = "HEAD:4922e10c7b8169585ff9322b0d913dadc525c68e"
meta-csp-system = "<unknown>:<unknown>"
meta-virtualization = "HEAD:502b81ae3ae11bf4d889b7eff6239fb9e6c55994"
meta-filesystems
meta-networking
meta-oe
meta-python = "HEAD:346681e7bf9c78008a845fc89031be4fd4ceb3a1"
初始化任务:100% |###################################### ############################################### ####################|时间:0:00:02 状态摘要:通缉 16 发现 5 错过 11 当前 1645(31% 匹配,99% 完成) 注意:执行任务 警告:apdaemon-1.0-r0 do_package_qa:QA 问题:apdaemon:SRC_URI 使用 PN 而不是 BPN [src-uri-bad] 错误:[图像]-1.0-r0 do_rootfs:在自动生成的 exec_python_func() 中执行 python 函数时出错:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:do_rootfs(d)
0003:
File: '/home/kamran/kamran_M3_2_0_Dunfell/yocto/meta/poky/meta/classes/image.bbclass', lineno: 245, function: do_rootfs
0241: progress_reporter.next_stage()
0242:
0243: # generate rootfs
0244: d.setVarFlag('REPRODUCIBLE_TIMESTAMP_ROOTFS', 'export', '1')
*** 0245: create_rootfs(d, progress_reporter=progress_reporter, logcatcher=logcatcher)
0246:
0247: progress_reporter.finish()
0248:}
0249:do_rootfs[dirs] = "${TOPDIR}"
File: '/home/kamran/kamran_M3_2_0_Dunfell/yocto/meta/poky/meta/lib/oe/rootfs.py', lineno: 975, function: create_rootfs
0971: env_bkp = os.environ.copy()
0972:
0973: img_type = d.getVar('IMAGE_PKGTYPE')
0974: if img_type == "rpm":
*** 0975: RpmRootfs(d, manifest_dir, progress_reporter, logcatcher).create()
0976: elif img_type == "ipk":
0977: OpkgRootfs(d, manifest_dir, progress_reporter, logcatcher).create()
0978: elif img_type == "deb":
0979: DpkgRootfs(d, manifest_dir, progress_reporter, logcatcher).create()
File: '/home/kamran/kamran_M3_2_0_Dunfell/yocto/meta/poky/meta/lib/oe/rootfs.py', lineno: 203, function: create
0199: if self.progress_reporter:
0200: self.progress_reporter.next_stage()
0201:
0202: # call the package manager dependent create method
*** 0203: self._create()
0204:
0205: sysconfdir = self.image_rootfs + self.d.getVar('sysconfdir')
0206: bb.utils.mkdirhier(sysconfdir)
0207: with open(sysconfdir + "/version", "w+") as ver:
File: '/home/kamran/kamran_M3_2_0_Dunfell/yocto/meta/poky/meta/lib/oe/rootfs.py', lineno: 450, function: _create
0446:
0447: if self.progress_reporter:
0448: self.progress_reporter.next_stage()
0449:
*** 0450: self.pm.install_complementary()
0451:
0452: if self.progress_reporter:
0453: self.progress_reporter.next_stage()
0454:
File: '/home/kamran/kamran_M3_2_0_Dunfell/yocto/meta/poky/meta/lib/oe/package_manager.py', lineno: 617, function: install_complementary
0613:
0614: target_arch = self.d.getVar('TARGET_ARCH')
0615: localedir = oe.path.join(self.target_rootfs, self.d.getVar("libdir"), "locale")
0616: if os.path.exists(localedir) and os.listdir(localedir):
*** 0617: generate_locale_archive(self.d, self.target_rootfs, target_arch, localedir)
0618: # And now delete the binary locales
0619: self.remove(fnmatch.filter(self.list_installed(), "glibc-binary-localedata-*"), False)
0620:
0621: def deploy_dir_lock(self):
File: '/home/kamran/kamran_M3_2_0_Dunfell/yocto/meta/poky/meta/lib/oe/package_manager.py', lineno: 141, function: generate_locale_archive
0137: if os.path.isdir(path):
0138: cmd = ["cross-localedef", "--verbose"]
0139: cmd += arch_options
0140: cmd += ["--add-to-archive", path]
*** 0141: subprocess.check_output(cmd, env=env, stderr=subprocess.STDOUT)
0142:
0143:class Indexer(object, metaclass=ABCMeta):
0144: def __init__(self, d, deploy_dir):
0145: self.d = d
File: '/usr/lib/python3.6/subprocess.py', lineno: 356, function: check_output
0352: # empty string. That is maintained here for backwards compatibility.
0353: kwargs['input'] = '' if kwargs.get('universal_newlines', False) else b''
0354:
0355: return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
*** 0356: **kwargs).stdout
0357:
0358:
0359:class CompletedProcess(object):
0360: """A process that has finished running.
File: '/usr/lib/python3.6/subprocess.py', lineno: 423, function: run
0419: if 'stdin' in kwargs:
0420: raise ValueError('stdin and input arguments may not both be used.')
0421: kwargs['stdin'] = PIPE
0422:
*** 0423: with Popen(*popenargs, **kwargs) as process:
0424: try:
0425: stdout, stderr = process.communicate(input, timeout=timeout)
0426: except TimeoutExpired:
0427: process.kill()
File: '/usr/lib/python3.6/subprocess.py', lineno: 729, function: __init__
0725: startupinfo, creationflags, shell,
0726: p2cread, p2cwrite,
0727: c2pread, c2pwrite,
0728: errread, errwrite,
*** 0729: restore_signals, start_new_session)
0730: except:
0731: # Cleanup if the child failed starting.
0732: for f in filter(None, (self.stdin, self.stdout, self.stderr)):
0733: try:
File: '/usr/lib/python3.6/subprocess.py', lineno: 1364, function: _execute_child
1360: if errno_num != 0:
1361: err_msg = os.strerror(errno_num)
1362: if errno_num == errno.ENOENT:
1363: err_msg += ': ' + repr(err_filename)
*** 1364: raise child_exception_type(errno_num, err_msg, err_filename)
1365: raise child_exception_type(err_msg)
1366:
1367:
1368: def _handle_exitstatus(self, sts, _WIFSIGNALED=os.WIFSIGNALED,
Exception: FileNotFoundError: [Errno 2] No such file or directory: 'cross-localedef': 'cross-localedef'
检查 ENABLE_BINARY_LOCALE_GENERATION 和 IMAGE_LINGUAS
$bitbake [image] -e | grep -E "^GLIBC_GENERATE_LOCALES=|^IMAGE_LINGUAS="
IMAGE_LINGUAS = "en-us en-gb"
ENABLE_BINARY_LOCALE_GENERATION = "1"