Unable to build imx-linux-hardknott Linux 5.10.52_2.1.0 release with multilib

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to build imx-linux-hardknott Linux 5.10.52_2.1.0 release with multilib

2,731 Views
Shannon
Contributor II

Hi, I am trying to build Yocto from the latest imx-5.10.52-2.1.0 hardknott release.

However, multilib seems to be throwing errors for this build. The error I am receiving is:

ERROR: Nothing PROVIDES 'virtual/arm-pokymllib32-linux-gnueabi-binutils'. Close matches:
virtual/lib32-arm-pokymllib32-linux-gnueabi-binutils
virtual/lib32-arm-pokymllib32-linux-gnueabi-gcc
virtual/lib32-arm-pokymllib32-linux-gnueabi-go-runtime
ERROR: Nothing PROVIDES 'virtual/arm-pokymllib32-linux-gnueabi-gcc'. Close matches:
virtual/lib32-arm-pokymllib32-linux-gnueabi-g++
virtual/lib32-arm-pokymllib32-linux-gnueabi-gcc
virtual/lib32-arm-pokymllib32-linux-gnueabi-go-runtime

I am able to reproduce the error with the following steps:

# Fetch and configure release
repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-hardknott -m imx-5.10.52-2.1.0.xml
repo sync
DISTRO=fsl-imx-xwayland MACHINE=imx8mmevk source ./imx-setup-release.sh -b build

Add to local.conf basic multiconf configuration, alongside installation of qtbase:

require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "armv7athf-neon"
IMAGE_INSTALL_append = " lib32-glibc lib32-libgcc lib32-libstdc++ qtbase"

Remove package management for deb package as it is not supported:

# Comment out deb package management
# PACKAGE_CLASSES = "package_deb"

# EXTRA_IMAGE_FEATURES += "package-management"

And building core-image-minimal:

bitbake core-image-minimal

If the `qtbase` recipe is removed from the image, then I do not see this error. This does not seem to apply to all recipes. For example, adding the recipes poco, rsyslog, zlib, etc do not trigger this error. Some more recipes that have this issue include weston, weston-init, qtmultimedia and qtwebengine.

I am unable to reproduce this issue when using the gatesgarth release (using the following manifest instead):

repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-gatesgarth -m imx-5.10.9-1.0.0.xml

 Is there any way I can resolve this error for the hardknott release?

Thanks

Labels (1)
0 Kudos
8 Replies

2,621 Views
Shannon
Contributor II

I have found the following patch to poky works around the issue:

diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index d38b60f519..9d99c20745 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -386,8 +386,8 @@ do_kernel_metadata[depends] = "kern-tools-native:do_populate_sysroot"
do_kernel_metadata[file-checksums] = " ${@get_dirs_with_fragments(d)}"
do_validate_branches[depends] = "kern-tools-native:do_populate_sysroot"

-do_kernel_configme[depends] += "virtual/${TARGET_PREFIX}binutils:do_populate_sysroot"
-do_kernel_configme[depends] += "virtual/${TARGET_PREFIX}gcc:do_populate_sysroot"
+do_kernel_configme[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}binutils:do_populate_sysroot"
+do_kernel_configme[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}gcc:do_populate_sysroot"
do_kernel_configme[depends] += "bc-native:do_populate_sysroot bison-native:do_populate_sysroot"
do_kernel_configme[depends] += "kern-tools-native:do_populate_sysroot"
do_kernel_configme[dirs] += "${S} ${B}"

 I think this is probably not a proper fix and is perhaps a workaround, but with this applied I do not see the error any more.

2,239 Views
shao-gaoyan
Contributor II

How did you solve it in the end?

thanks

0 Kudos

1,988 Views
Shannon
Contributor II
We have been using this patch so far, but I don't think this is a proper solution.
0 Kudos

2,722 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Please see the newest bsp usr guide:

https://www.nxp.com/docs/en/user-guide/IMX_YOCTO_PROJECT_USERS_GUIDE.pdf

Multilib is not supported with the debian package management. It requires the RPM system. Comment out the two package management lines in local.conf to go to the default RPM.

2,693 Views
Shannon
Contributor II

@Zhiming_Liusorry, I think I must have mistakenly resolved this after doing some wrong testing. This is my local conf after removing those lines, as suggested:

MACHINE ??= 'imx8mmevk'
DISTRO ?= 'fsl-imx-xwayland'
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
STOPTASKS,/tmp,100M,100K \
ABORT,${TMPDIR},100M,1K \
ABORT,${DL_DIR},100M,1K \
ABORT,${SSTATE_DIR},100M,1K \
ABORT,/tmp,10M,1K"
PACKAGECONFIG_append_pn-qemu-system-native = " sdl"
CONF_VERSION = "1"

DL_DIR ?= "${BSPDIR}/downloads/"
ACCEPT_FSL_EULA = "1"

require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "armv7athf-neon"
IMAGE_INSTALL_append = " lib32-glibc lib32-libgcc lib32-libstdc++ qtbase"

 Which still seems to present the same issue.

0 Kudos

2,709 Views
Shannon
Contributor II

Thanks, that does fix the issue which I presented in this post. I will close this as a result, thanks.

Unfortunately, however, the fact this fixes it was a bug in me trying to reduce my problem down to a minimal reproducible example. The situation that I am hitting this doesn't have debian set.

But I am still seeing the same error reported. I will try to reduce my use case that to something better without that bug.

Thanks a lot for your help

0 Kudos

2,033 Views
sake
Contributor I

Hi, I have the same issue, and I am already using the RPM. and your workaround did fix it. Do you find any other better solution to it?

0 Kudos

1,989 Views
Shannon
Contributor II

Hi, we haven't implemented any other workaround yet unfortunately.

Any better fix idea would be appreciated!

0 Kudos