glibc - Yocto Dunfell - glibc do_stash_locale 在启用多库的环境中失败

Yocto 在 glibc 中构建失败。在 do_stash_locale 中构建失败并出现以下错误。

ERROR: lib64-glibc-2.31+gitAUTOINC+1094741224-r0 do_stash_locale: The recipe lib64-glibc is trying to install files into a shared area when those files already exist. Those files and their manifest location are:
 /mnt/********/workspace/********/build-********/tmp/sysroots-components/aarch64/glibc-stash-locale/SUPPORTED
(matched in manifest-aarch64-glibc.stash_locale)
 /mnt/********/workspace/********/build-********/tmp/sysroots-components/aarch64/glibc-stash-locale/scripts/sotruss
(matched in manifest-aarch64-glibc.stash_locale)
/mnt/********/workspace/********/build-********/tmp/sysroots-components/aarch64/glibc-stash-locale/scripts/xtrace
(matched in manifest-aarch64-glibc.stash_locale)
/mnt/********/workspace/********/build-********/tmp/sysroots-components/aarch64/glibc-stash-locale/scripts/mtrace
(matched in manifest-aarch64-glibc.stash_locale)
/mnt/********/workspace/********/build-********/tmp/sysroots-components/aarch64/glibc-stash-locale/usr/share/info/libc.info
(matched in manifest-aarch64-glibc.stash_locale)
.....

在构建中,我们启用了 multilib,因为:

  1. 64位机器(aarch64),内核需要使用64位工具链构建。
  2. 32 位用户空间应用程序,因此启用了 multilib。
  3. 此外,我们还必须运行几个 64 位应用程序,因此还使用了 multilib:lib64。

所以这里我们的配置是:

require conf/machine/include/tune-cortexa53.inc
  require conf/multilib.conf
  MULTILIBS = "multilib:lib32 multilib:lib64"
  DEFAULTTUNE_virtclass-multilib-lib32 = "armv7at-neon"
  IMAGE_INSTALL_append = " lib32-glib-2.0 lib32-bash"
  DEFAULTTUNE = "cortexa53"
  DEFAULTTUNE_virtclass-multilib-lib64 = "armv8a"

在这里,我们将最终目标构建为 lib32-xxxxx-image,并将图像配方中包含的 64 位应用程序构建为 IMAGE_INSTALL_append += "lib64-xxxxx"。

当我们在没有任何 sstate 缓存的情况下进行全新构建时,构建在 glibc do_stash_locale 中失败。如果有一些指示会非常有帮助吗?

回答1

我通过将所需的配方添加到 NON_MULTILIB_RECIPES 中找到了一个解决方案,因此对于这些包,mlprefix 将被删除并使用默认工具链来构建它。

所以在这里:

  1. 定义 multilib:lib32 以使用 32 位工具链构建用户空间应用程序。
  2. 对于需要 64 位工具链的应用程序,将这些配方添加到 NON_MULTILIB_RECIPES += " xxxx yyyy "

所以这里不需要同时添加 32 位和 64 位的 multilib,因为默认调谐是 64 位。

相似文章

npm - Yocto 使用 npm v8 构建失败

问题和背景我目前正在迁移到YoctoKirkstone,需要在映像上安装一些npm软件包。我之前使用的是随npmv6一起提供的Dunfell,我可以毫无问题地构建它.但是对于Kirkstone(和np...

随机推荐

最新文章