| Message ID | 20250411172803.3706607-6-tom.hochstein@oss.nxp.com |
|---|---|
| State | New |
| Headers | show |
| Series | [v6,1/6] meson: Allow user to override setup command options | expand |
On Fri, 2025-04-11 at 12:28 -0500, Tom Hochstein via lists.openembedded.org wrote: > The SDK Meson test fails when the SDK is not for the build machine: > ``` > Traceback (most recent call last): > File "/srv/pokybuild/yocto-worker/qemux86/build/meta/lib/oeqa/sdk/cases/meson.py", line 47, in test_epoxy > self.assertNotEqual(data["build"]["c"]["exelist"], data["host"]["c"]["exelist"]) > ~~~~~~~~~~~~~^^^^^ > KeyError: 'c' > ``` > > Skip the test in this case. > > Signed-off-by: Tom Hochstein <tom.hochstein@oss.nxp.com> > --- > meta/lib/oeqa/sdk/cases/meson.py | 5 +++++ > 1 file changed, 5 insertions(+) I think this may not be quite right as I saw: https://autobuilder.yoctoproject.org/valkyrie/#/builders/42/builds/1370 in my build with this series applied. Cheers, Richard
On 4/15/2025 5:48 AM, Richard Purdie wrote: > [You don't often get email from richard.purdie@linuxfoundation.org. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] > > On Fri, 2025-04-11 at 12:28 -0500, Tom Hochstein via lists.openembedded.org wrote: >> The SDK Meson test fails when the SDK is not for the build machine: >> ``` >> Traceback (most recent call last): >> File "/srv/pokybuild/yocto-worker/qemux86/build/meta/lib/oeqa/sdk/cases/meson.py", line 47, in test_epoxy >> self.assertNotEqual(data["build"]["c"]["exelist"], data["host"]["c"]["exelist"]) >> ~~~~~~~~~~~~~^^^^^ >> KeyError: 'c' >> ``` >> >> Skip the test in this case. >> >> Signed-off-by: Tom Hochstein <tom.hochstein@oss.nxp.com> >> --- >> meta/lib/oeqa/sdk/cases/meson.py | 5 +++++ >> 1 file changed, 5 insertions(+) > > I think this may not be quite right as I saw: > > https://autobuilder.yoctoproject.org/valkyrie/#/builders/42/builds/1370 > > in my build with this series applied. > > Cheers, > > Richard Thanks, Richard. I'm able to reproduce this. It's specific to meta-ide-support. The setup looks fine: $ meson setup --warnlevel 1 -Degl=no -Dglx=no -Dx11=false build meson-wrapper: Running meson with setup options: " --cross-file=.../poky/build/tmp/sysroots/x86_64/usr/share/meson/arm-poky-linux-gnueabi-meson.cross --native-file=.../poky/build/tmp/sysroots/x86_64/usr/share/meson/meson.native " The Meson build system Version: 1.7.2 ... The KeyError appears because the build machine data is empty: $ meson introspect -i --compilers build { "host": { "c": { "id": "gcc", "exelist": [ "arm-poky-linux-gnueabi-gcc", "-mthumb", "-mfpu=neon", "-mfloat-abi=hard", "-mcpu=cortex-a15", "-fstack-protector-strong", "-O2", "-D_FORTIFY_SOURCE=2", "-Wformat", "-Wformat-security", "-Werror=format-security", "-D_TIME_BITS=64", "-D_FILE_OFFSET_BITS=64", "--sysroot=.../poky/build/tmp/sysroots/qemuarm" ], "linker_exelist": [ "arm-poky-linux-gnueabi-gcc", "-mthumb", "-mfpu=neon", "-mfloat-abi=hard", "-mcpu=cortex-a15", "-fstack-protector-strong", "-O2", "-D_FORTIFY_SOURCE=2", "-Wformat", "-Wformat-security", "-Werror=format-security", "-D_TIME_BITS=64", "-D_FILE_OFFSET_BITS=64", "--sysroot=.../poky/build/tmp/sysroots/qemuarm" ], "file_suffixes": [ "c" ], "default_suffix": "c", "version": "14.2.0", "full_version": "arm-poky-linux-gnueabi-gcc (GCC) 14.2.0", "linker_id": "ld.bfd" } }, "build": {} } I don't understand why. The meson.native file looks the same as for the standalone SDK case, and the meson machine data seems fine. $ meson introspect -i --machines build/ { "host": { "system": "linux", "cpu_family": "arm", "cpu": "arm", "endian": "little", "kernel": null, "subsystem": null, "is_64_bit": false, "exe_suffix": "", "object_suffix": "o" }, "build": { "system": "linux", "cpu_family": "x86_64", "cpu": "x86_64", "endian": "little", "kernel": "linux", "subsystem": "linux", "is_64_bit": true, "exe_suffix": "", "object_suffix": "o" }, "target": { "system": "linux", "cpu_family": "arm", "cpu": "arm", "endian": "little", "kernel": null, "subsystem": null, "is_64_bit": false, "exe_suffix": "", "object_suffix": "o" } } I'm stuck. Tom
On 4/16/2025 11:16 AM, Tom Hochstein via lists.openembedded.org wrote: > On 4/15/2025 5:48 AM, Richard Purdie wrote: >> [You don't often get email from richard.purdie@linuxfoundation.org. >> Learn why this is important at >> https://aka.ms/LearnAboutSenderIdentification ] >> >> On Fri, 2025-04-11 at 12:28 -0500, Tom Hochstein via >> lists.openembedded.org wrote: >>> The SDK Meson test fails when the SDK is not for the build machine: >>> ``` >>> Traceback (most recent call last): >>> File >>> "/srv/pokybuild/yocto-worker/qemux86/build/meta/lib/oeqa/sdk/cases/meson.py", line 47, in test_epoxy >>> self.assertNotEqual(data["build"]["c"]["exelist"], >>> data["host"]["c"]["exelist"]) >>> ~~~~~~~~~~~~~^^^^^ >>> KeyError: 'c' >>> ``` >>> >>> Skip the test in this case. >>> >>> Signed-off-by: Tom Hochstein <tom.hochstein@oss.nxp.com> >>> --- >>> meta/lib/oeqa/sdk/cases/meson.py | 5 +++++ >>> 1 file changed, 5 insertions(+) >> >> I think this may not be quite right as I saw: >> >> https://autobuilder.yoctoproject.org/valkyrie/#/builders/42/builds/1370 >> >> in my build with this series applied. >> >> Cheers, >> >> Richard > > > Thanks, Richard. I'm able to reproduce this. It's specific to > meta-ide-support. > > The setup looks fine: > > $ meson setup --warnlevel 1 -Degl=no -Dglx=no -Dx11=false build > meson-wrapper: Running meson with setup options: " > --cross-file=.../poky/build/tmp/sysroots/x86_64/usr/share/meson/arm-poky-linux-gnueabi-meson.cross --native-file=.../poky/build/tmp/sysroots/x86_64/usr/share/meson/meson.native " > The Meson build system > Version: 1.7.2 > ... > > The KeyError appears because the build machine data is empty: This assertion turns out to be wrong. In fact, the build machine data is empty in the working case as well. I propose to drop this part of the new test, as the remaining part of the test seems sufficient. > > $ meson introspect -i --compilers build > { > "host": { > "c": { > "id": "gcc", > "exelist": [ > "arm-poky-linux-gnueabi-gcc", > "-mthumb", > "-mfpu=neon", > "-mfloat-abi=hard", > "-mcpu=cortex-a15", > "-fstack-protector-strong", > "-O2", > "-D_FORTIFY_SOURCE=2", > "-Wformat", > "-Wformat-security", > "-Werror=format-security", > "-D_TIME_BITS=64", > "-D_FILE_OFFSET_BITS=64", > "--sysroot=.../poky/build/tmp/sysroots/qemuarm" > ], > "linker_exelist": [ > "arm-poky-linux-gnueabi-gcc", > "-mthumb", > "-mfpu=neon", > "-mfloat-abi=hard", > "-mcpu=cortex-a15", > "-fstack-protector-strong", > "-O2", > "-D_FORTIFY_SOURCE=2", > "-Wformat", > "-Wformat-security", > "-Werror=format-security", > "-D_TIME_BITS=64", > "-D_FILE_OFFSET_BITS=64", > "--sysroot=.../poky/build/tmp/sysroots/qemuarm" > ], > "file_suffixes": [ > "c" > ], > "default_suffix": "c", > "version": "14.2.0", > "full_version": "arm-poky-linux-gnueabi-gcc (GCC) 14.2.0", > "linker_id": "ld.bfd" > } > }, > "build": {} > } > > I don't understand why. The meson.native file looks the same as for the > standalone SDK case, and the meson machine data seems fine. > > $ meson introspect -i --machines build/ > { > "host": { > "system": "linux", > "cpu_family": "arm", > "cpu": "arm", > "endian": "little", > "kernel": null, > "subsystem": null, > "is_64_bit": false, > "exe_suffix": "", > "object_suffix": "o" > }, > "build": { > "system": "linux", > "cpu_family": "x86_64", > "cpu": "x86_64", > "endian": "little", > "kernel": "linux", > "subsystem": "linux", > "is_64_bit": true, > "exe_suffix": "", > "object_suffix": "o" > }, > "target": { > "system": "linux", > "cpu_family": "arm", > "cpu": "arm", > "endian": "little", > "kernel": null, > "subsystem": null, > "is_64_bit": false, > "exe_suffix": "", > "object_suffix": "o" > } > } > > I'm stuck. > > Tom > > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#215000): https://lists.openembedded.org/g/openembedded-core/message/215000 > Mute This Topic: https://lists.openembedded.org/mt/112214633/3617670 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [tom.hochstein@oss.nxp.com] > -=-=-=-=-=-=-=-=-=-=-=- >
diff --git a/meta/lib/oeqa/sdk/cases/meson.py b/meta/lib/oeqa/sdk/cases/meson.py index 407b94d242..63bdac93a9 100644 --- a/meta/lib/oeqa/sdk/cases/meson.py +++ b/meta/lib/oeqa/sdk/cases/meson.py @@ -27,6 +27,11 @@ class MesonTest(OESDKTestCase): self.tc.hasHostPackage("meson-native")): raise unittest.SkipTest("MesonTest: needs meson") + sdk_arch = self.td["SDK_ARCH"] + build_arch = self._run("uname -m").strip() + if not sdk_arch == build_arch: + raise unittest.SkipTest("MesonTest: SDK arch '%s' not valid for build machine arch '%s'" % (sdk_arch, build_arch)) + def test_epoxy(self): with tempfile.TemporaryDirectory(prefix="epoxy", dir=self.tc.sdk_dir) as testdir: tarball = self.fetch(testdir, self.td["DL_DIR"], "https://github.com/anholt/libepoxy/releases/download/1.5.3/libepoxy-1.5.3.tar.xz")
The SDK Meson test fails when the SDK is not for the build machine: ``` Traceback (most recent call last): File "/srv/pokybuild/yocto-worker/qemux86/build/meta/lib/oeqa/sdk/cases/meson.py", line 47, in test_epoxy self.assertNotEqual(data["build"]["c"]["exelist"], data["host"]["c"]["exelist"]) ~~~~~~~~~~~~~^^^^^ KeyError: 'c' ``` Skip the test in this case. Signed-off-by: Tom Hochstein <tom.hochstein@oss.nxp.com> --- meta/lib/oeqa/sdk/cases/meson.py | 5 +++++ 1 file changed, 5 insertions(+)