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



Yocto编译失败glibcdo_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".

当我们在没有任何状态缓存的情况下进行新构建时,在glibc do_stash_locale中构建失败。这将是非常有帮助的,如果一些指针得到这个?

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

这里:

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

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

最新更新