Message ID | 20250116134833.1838212-2-Harish.Sadineni@windriver.com |
---|---|
State | Accepted, archived |
Commit | 386e4132a9ced75599d92610cf5c0e8fe907c3b6 |
Headers | show |
Series | [V2,1/2] rust: fix for rust multilib sdk configuration | expand |
On 16 Jan 2025, at 13:48, Sadineni, Harish via lists.openembedded.org <Harish.Sadineni=windriver.com@lists.openembedded.org> wrote: > > From: Harish Sadineni <Harish.Sadineni@windriver.com> > > The do_testsdk for lib32-core-image-sato aborts with below error: > configure: error: Package requirements (gtk+-3.0) were not met: > No package 'gtk+-3.0' found > Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. > > This cuases due to an absolute path name in 'sdk_env', which is now stripped to have only the environment name. Can you give more context as to how this fails? The current code does a substring match so it’s not clear how this breaks, and why the AB doesn’t fail when it should be exercising multilib SDKs already. Cheers, Ross
>>Can you give more context as to how this fails? The current code does a substring match so it’s not clear >>how this breaks, When building with bitbake lib32-core-image-sato for multilib, lib32 packages are generated. After populating the SDK, when running testsdk, the gtk+3 test should be skipped if the gtk package is not present. For example, when running "bitbake lib32-core-image-sato -c testsdk" testing the following environments: sdk_env for environment-setup-armv7at2hf-neon-pokymllib32-linux-gnueabi: /home/poky/build/tmp/work/qemuarm64-pokymllib32-linux-gnueabi/lib32-core-image-sato/1.0/testimage-sdk/environment-setup-armv7at2hf-neon-pokymllib32-linux-gnueabi sdk_env for environment-setup-cortexa57-poky-linux: /home/poky/build/tmp/work/qemuarm64-pokymllib32-linux-gnueabi/lib32-core-image-sato/1.0/testimage-sdk/environment-setup-cortexa57-poky-linux if ('ml' + ml) in self.sdk_env: pkg = ml + '-' + pkg This code looks if mllib32 present in sdk_env. However, when testing with environment-setup-cortexa57-poky-linux, the code looks for the lib32-gtk+3 package instead of gtk+3 package due to mllib32 string is present in sdk_env. As a result, it incorrectly identifies the package as present, causing the test not to be skipped. This leads to an error during test execution. >>and why the AB doesn’t fail when it should be exercising multilib SDKs already May be in AutoBuilder we will not check for lib32-core-image-sato, this might be reason why it doesn't fail . thanks, Harish
diff --git a/meta/lib/oeqa/sdk/context.py b/meta/lib/oeqa/sdk/context.py index 01c38c24e6..77e6a98f39 100644 --- a/meta/lib/oeqa/sdk/context.py +++ b/meta/lib/oeqa/sdk/context.py @@ -41,11 +41,13 @@ class OESDKTestContext(OETestContext): def hasTargetPackage(self, pkg, multilib=False, regex=False): if multilib: - # match multilib according to sdk_env - mls = self.td.get('MULTILIB_VARIANTS', '').split() - for ml in mls: - if ('ml'+ml) in self.sdk_env: - pkg = ml + '-' + pkg + stripped_sdk_env = os.path.basename(self.sdk_env) + if stripped_sdk_env.startswith('environment-setup-'): + # match multilib according to sdk_env + mls = self.td.get('MULTILIB_VARIANTS', '').split() + for ml in mls: + if ('ml'+ml) in stripped_sdk_env: + pkg = ml + '-' + pkg return self._hasPackage(self.target_pkg_manifest, pkg, regex=regex) class OESDKTestContextExecutor(OETestContextExecutor):