diff mbox series

[meta-oe] magic-enum: add recipe

Message ID 20240619094547.30863-1-mark.jonas@de.bosch.com
State Accepted
Headers show
Series [meta-oe] magic-enum: add recipe | expand

Commit Message

Jonas Mark (BT-FS/ENG1-GRB) June 19, 2024, 9:45 a.m. UTC
From: Ricardo Simoes <ricardo.simoes@pt.bosch.com>

magic-enum is a header-only C++17 library provides static reflection
for enums, works with any enum type without any macro or boilerplate
code.

Signed-off-by: Ricardo Simoes <ricardo.simoes@pt.bosch.com>
Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com>
---
 .../magic-enum/magic-enum/run-ptest           | 27 ++++++++++++
 .../magic-enum/magic-enum_0.9.5.bb            | 44 +++++++++++++++++++
 2 files changed, 71 insertions(+)
 create mode 100644 meta-oe/recipes-extended/magic-enum/magic-enum/run-ptest
 create mode 100644 meta-oe/recipes-extended/magic-enum/magic-enum_0.9.5.bb

Comments

Martin Jansa June 26, 2024, 3:52 p.m. UTC | #1
ptest seems to fail building

lib32-magic-enum/0.9.5/git/test/test_containers.cpp:290:89: error:
value computed is not used [-Werror=unused-value]
  290 |   magic_enum::containers::set color_set_not_const {Color::RED,
Color::GREEN, Color::BLUE};
      |
                         ^

On Wed, Jun 19, 2024 at 11:47 AM Mark Jonas via lists.openembedded.org
<mark.jonas=de.bosch.com@lists.openembedded.org> wrote:
>
> From: Ricardo Simoes <ricardo.simoes@pt.bosch.com>
>
> magic-enum is a header-only C++17 library provides static reflection
> for enums, works with any enum type without any macro or boilerplate
> code.
>
> Signed-off-by: Ricardo Simoes <ricardo.simoes@pt.bosch.com>
> Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com>
> ---
>  .../magic-enum/magic-enum/run-ptest           | 27 ++++++++++++
>  .../magic-enum/magic-enum_0.9.5.bb            | 44 +++++++++++++++++++
>  2 files changed, 71 insertions(+)
>  create mode 100644 meta-oe/recipes-extended/magic-enum/magic-enum/run-ptest
>  create mode 100644 meta-oe/recipes-extended/magic-enum/magic-enum_0.9.5.bb
>
> diff --git a/meta-oe/recipes-extended/magic-enum/magic-enum/run-ptest b/meta-oe/recipes-extended/magic-enum/magic-enum/run-ptest
> new file mode 100644
> index 000000000..865da9f69
> --- /dev/null
> +++ b/meta-oe/recipes-extended/magic-enum/magic-enum/run-ptest
> @@ -0,0 +1,27 @@
> +#!/bin/sh
> +
> +# SPDX-FileCopyrightText: 2024 Bosch Sicherheitssysteme GmbH
> +#
> +# SPDX-License-Identifier: MIT
> +
> +fail_count=0
> +all_count=0
> +
> +for test_suite in tests/test_*
> +do
> +    if "./$test_suite"
> +    then
> +        echo "PASS: $test_suite"
> +    else
> +        echo "FAIL: $test_suite"
> +        fail_count=$((fail_count + 1))
> +    fi
> +    all_count=$((all_count + 1))
> +done
> +
> +if [ $fail_count -eq 0 ]
> +then
> +    echo "PASS: All $all_count tests passed"
> +else
> +    echo "FAIL: $fail_count of $all_count tests failed"
> +fi
> diff --git a/meta-oe/recipes-extended/magic-enum/magic-enum_0.9.5.bb b/meta-oe/recipes-extended/magic-enum/magic-enum_0.9.5.bb
> new file mode 100644
> index 000000000..096f869c3
> --- /dev/null
> +++ b/meta-oe/recipes-extended/magic-enum/magic-enum_0.9.5.bb
> @@ -0,0 +1,44 @@
> +# SPDX-FileCopyrightText: 2024 Bosch Sicherheitssysteme GmbH
> +#
> +# SPDX-License-Identifier: MIT
> +
> +SUMMARY = "Static reflection for enums"
> +DESCRIPTION = "Header-only C++17 library provides static reflection for enums, works \
> +with any enum type without any macro or boilerplate code."
> +BUGTRACKER = "https://github.com/Neargye/magic_enum/issues"
> +HOMEPAGE = "https://github.com/Neargye/magic_enum"
> +
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=b15f48588464ec8ef87d2b560aad2caa"
> +
> +SRC_URI = " \
> +    git://github.com/Neargye/magic_enum.git;protocol=https;branch=master \
> +    file://run-ptest \
> +"
> +
> +SRCREV = "e55b9b54d5cf61f8e117cafb17846d7d742dd3b4"
> +S = "${WORKDIR}/git"
> +
> +inherit cmake ptest
> +
> +EXTRA_OECMAKE = "\
> +    -DMAGIC_ENUM_OPT_BUILD_EXAMPLES=OFF \
> +"
> +
> +do_install_ptest () {
> +    install -d ${D}${PTEST_PATH}/tests
> +    install -m 0755 ${B}/test/test_* ${D}${PTEST_PATH}/tests
> +}
> +
> +# Add catkin and colcon (ROS build system) support
> +FILES:${PN}-dev += "\
> +    ${datadir}/magic_enum/package.xml \
> +"
> +
> +# Header-only library
> +# ${PN} is empty so we need to tweak -dev and -dbg package dependencies
> +RDEPENDS:${PN}-dev = ""
> +RDEPENDS:${PN}-ptest = ""
> +RRECOMMENDS:${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
> +
> +BBCLASSEXTEND = "native nativesdk"
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#110963): https://lists.openembedded.org/g/openembedded-devel/message/110963
> Mute This Topic: https://lists.openembedded.org/mt/106757432/3617156
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [martin.jansa@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Jonas Mark (BT-FS/ENG1-GRB) June 27, 2024, 7 a.m. UTC | #2
Hi Martin,

Thank you for making us aware of the problem when compiling the ptest. We were able to reproduce the problem when compiling for qemuarm. We were not able to spot the problem on the autobuilder. How did you trigger the problem?

We looked into it and have to admit that we cannot explain why g++ 14.1.0 trips over that line.

- It is perfectly legal C++ 17.
- It compiles without that warning error for other machines, i.e. qemux86, qemux86-64, qemuarm64.
- It does not act up with g++ 11.4 (Kirkstone) with qemuarm, our own NXP i.MX6 machine, or any other machine we tried.

The problem can be mitigated by replacing the offending line

magic_enum::containers::set color_set_not_const {Color::RED, Color::GREEN, Color::BLUE};

with

magic_enum::containers::set color_set_not_const = {Color::RED, Color::GREEN, Color::BLUE};

We are working on sending a patch for the recipe containing a patch for magic_enum to the OE mailing list (this one).

We already got in contact with the upstream magic_enum project.

https://github.com/Neargye/magic_enum/issues/362

Cheers,
Mark


Building Technologies, Panel Software Fire (BT-FIR/ENG1-Grb)
Bosch Sicherheitssysteme GmbH | Postfach 11 11 | 85626 Grasbrunn | GERMANY | www.boschsecurity.com

Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart HRB 23118
Aufsichtsratsvorsitzender: Frank Meyer; Geschäftsführung: Thomas Quante, Peter Löffler, Henrik Siegle, Peter von Wartenberg

> -----Ursprüngliche Nachricht-----
> Von: Martin Jansa <martin.jansa@gmail.com>
> Gesendet: Mittwoch, 26. Juni 2024 17:53
> An: Jonas Mark (BT-FS/ENG1-GRB) <mark.jonas@de.bosch.com>
> Cc: openembedded-devel@lists.openembedded.org; raj.khem@gmail.com;
> Simoes Ricardo (BT-FS/ENG1.1-Ovr) <ricardo.simoes@pt.bosch.com>
> Betreff: Re: [oe] [meta-oe][PATCH] magic-enum: add recipe
> 
> ptest seems to fail building
> 
> lib32-magic-enum/0.9.5/git/test/test_containers.cpp:290:89: error:
> value computed is not used [-Werror=unused-value]
>   290 |   magic_enum::containers::set color_set_not_const {Color::RED,
> Color::GREEN, Color::BLUE};
>       |
>                          ^
> 
> On Wed, Jun 19, 2024 at 11:47 AM Mark Jonas via lists.openembedded.org
> <mark.jonas=de.bosch.com@lists.openembedded.org> wrote:
> >
> > From: Ricardo Simoes <ricardo.simoes@pt.bosch.com>
> >
> > magic-enum is a header-only C++17 library provides static reflection
> > for enums, works with any enum type without any macro or boilerplate
> > code.
> >
> > Signed-off-by: Ricardo Simoes <ricardo.simoes@pt.bosch.com>
> > Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com>
> > ---
> >  .../magic-enum/magic-enum/run-ptest           | 27 ++++++++++++
> >  .../magic-enum/magic-enum_0.9.5.bb            | 44
> +++++++++++++++++++
> >  2 files changed, 71 insertions(+)
> >  create mode 100644
> > meta-oe/recipes-extended/magic-enum/magic-enum/run-ptest
> >  create mode 100644
> > meta-oe/recipes-extended/magic-enum/magic-enum_0.9.5.bb
> >
> > diff --git a/meta-oe/recipes-extended/magic-enum/magic-enum/run-
> ptest
> > b/meta-oe/recipes-extended/magic-enum/magic-enum/run-ptest
> > new file mode 100644
> > index 000000000..865da9f69
> > --- /dev/null
> > +++ b/meta-oe/recipes-extended/magic-enum/magic-enum/run-ptest
> > @@ -0,0 +1,27 @@
> > +#!/bin/sh
> > +
> > +# SPDX-FileCopyrightText: 2024 Bosch Sicherheitssysteme GmbH # #
> > +SPDX-License-Identifier: MIT
> > +
> > +fail_count=0
> > +all_count=0
> > +
> > +for test_suite in tests/test_*
> > +do
> > +    if "./$test_suite"
> > +    then
> > +        echo "PASS: $test_suite"
> > +    else
> > +        echo "FAIL: $test_suite"
> > +        fail_count=$((fail_count + 1))
> > +    fi
> > +    all_count=$((all_count + 1))
> > +done
> > +
> > +if [ $fail_count -eq 0 ]
> > +then
> > +    echo "PASS: All $all_count tests passed"
> > +else
> > +    echo "FAIL: $fail_count of $all_count tests failed"
> > +fi
> > diff --git a/meta-oe/recipes-extended/magic-enum/magic-enum_0.9.5.bb
> > b/meta-oe/recipes-extended/magic-enum/magic-enum_0.9.5.bb
> > new file mode 100644
> > index 000000000..096f869c3
> > --- /dev/null
> > +++ b/meta-oe/recipes-extended/magic-enum/magic-enum_0.9.5.bb
> > @@ -0,0 +1,44 @@
> > +# SPDX-FileCopyrightText: 2024 Bosch Sicherheitssysteme GmbH # #
> > +SPDX-License-Identifier: MIT
> > +
> > +SUMMARY = "Static reflection for enums"
> > +DESCRIPTION = "Header-only C++17 library provides static reflection
> > +for enums, works \ with any enum type without any macro or
> boilerplate code."
> > +BUGTRACKER =
> "https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit
> hub.com%2FNeargye%2Fmagic_enum%2Fissues&data=05%7C02%7Cmark.jonas%40de
> .bosch.com%7C30c7277c5aa54b0fd67c08dc95f80c79%7C0ae51e1907c84e4bbb6d64
> 8ee58410f4%7C0%7C0%7C638550139794967735%7CUnknown%7CTWFpbGZsb3d8eyJWIj
> oiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C
> %7C&sdata=dTRcL1OePxuq8rbGeyR4SgdAjkLBeKX79lwaRns9pmQ%3D&reserved=0"
> > +HOMEPAGE =
> "https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit
> hub.com%2FNeargye%2Fmagic_enum&data=05%7C02%7Cmark.jonas%40de.bosch.co
> m%7C30c7277c5aa54b0fd67c08dc95f80c79%7C0ae51e1907c84e4bbb6d648ee58410f
> 4%7C0%7C0%7C638550139794976366%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> wMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata
> =6GyAhu2fPHE0jZyaohpwL6%2FkP70fly7o4Bfxs9oPdDQ%3D&reserved=0"
> > +
> > +LICENSE = "MIT"
> > +LIC_FILES_CHKSUM =
> "file://LICENSE;md5=b15f48588464ec8ef87d2b560aad2caa"
> > +
> > +SRC_URI = " \
> > +
> git://github.com/Neargye/magic_enum.git;protocol=https;branch=master \
> > +    file://run-ptest \
> > +"
> > +
> > +SRCREV = "e55b9b54d5cf61f8e117cafb17846d7d742dd3b4"
> > +S = "${WORKDIR}/git"
> > +
> > +inherit cmake ptest
> > +
> > +EXTRA_OECMAKE = "\
> > +    -DMAGIC_ENUM_OPT_BUILD_EXAMPLES=OFF \ "
> > +
> > +do_install_ptest () {
> > +    install -d ${D}${PTEST_PATH}/tests
> > +    install -m 0755 ${B}/test/test_* ${D}${PTEST_PATH}/tests }
> > +
> > +# Add catkin and colcon (ROS build system) support FILES:${PN}-dev
> +=
> > +"\
> > +    ${datadir}/magic_enum/package.xml \ "
> > +
> > +# Header-only library
> > +# ${PN} is empty so we need to tweak -dev and -dbg package
> > +dependencies RDEPENDS:${PN}-dev = ""
> > +RDEPENDS:${PN}-ptest = ""
> > +RRECOMMENDS:${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
> > +
> > +BBCLASSEXTEND = "native nativesdk"
> > --
> > 2.34.1
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#110963):
> >
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> > s.openembedded.org%2Fg%2Fopenembedded-
> devel%2Fmessage%2F110963&data=05
> >
> %7C02%7Cmark.jonas%40de.bosch.com%7C30c7277c5aa54b0fd67c08dc95f80c79%7
> >
> C0ae51e1907c84e4bbb6d648ee58410f4%7C0%7C0%7C638550139794981698%7CUnkno
> >
> wn%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiL
> >
> CJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=axWZTm%2FgV008AP6DiBtD1K3C6WXjF61ysAf
> > bYxCOIMo%3D&reserved=0 Mute This Topic:
> >
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> >
> s.openembedded.org%2Fmt%2F106757432%2F3617156&data=05%7C02%7Cmark.jona
> >
> s%40de.bosch.com%7C30c7277c5aa54b0fd67c08dc95f80c79%7C0ae51e1907c84e4b
> >
> bb6d648ee58410f4%7C0%7C0%7C638550139794985970%7CUnknown%7CTWFpbGZsb3d8
> >
> eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0
> >
> %7C%7C%7C&sdata=zmi38YI4iiU%2BwuaA1OESxzOb2blMvJEyjv9c7rsH3uM%3D&reser
> > ved=0 Group Owner: openembedded-devel+owner@lists.openembedded.org
> > Unsubscribe:
> >
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> > s.openembedded.org%2Fg%2Fopenembedded-
> devel%2Funsub&data=05%7C02%7Cmar
> >
> k.jonas%40de.bosch.com%7C30c7277c5aa54b0fd67c08dc95f80c79%7C0ae51e1907
> >
> c84e4bbb6d648ee58410f4%7C0%7C0%7C638550139794990014%7CUnknown%7CTWFpbG
> >
> Zsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%
> >
> 3D%7C0%7C%7C%7C&sdata=UFlwDFcdmqLHREOjshbhtNrFIkK07k9wMUVtIpMTrsk%3D&r
> > eserved=0 [martin.jansa@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
Martin Jansa June 27, 2024, 8:05 a.m. UTC | #3
> Thank you for making us aware of the problem when compiling the ptest. We were able to reproduce the problem when compiling for qemuarm. We were not able to spot the problem on the autobuilder. How did you trigger the problem?

I've just seen new build failure in world build and it was indeed with
32bit arm (from multilib builds).
Thanks for looking into it quickly.

> We looked into it and have to admit that we cannot explain why g++ 14.1.0 trips over that line.

Have you tried to compare preprocessed output from g++ from qemuarm
and qemuarm64 to see if there is some strange difference? The code
where color_set_not_const is used looks simple enough, but maybe some
REQUIRE* macro expansion does more than it looks in
https://github.com/search?q=repo%3ANeargye%2Fmagic_enum+color_set_not_const&type=code

Regards,

On Thu, Jun 27, 2024 at 9:00 AM Jonas Mark (BT-FS/ENG1-GRB)
<mark.jonas@de.bosch.com> wrote:
>
> Hi Martin,
>
> Thank you for making us aware of the problem when compiling the ptest. We were able to reproduce the problem when compiling for qemuarm. We were not able to spot the problem on the autobuilder. How did you trigger the problem?
>
> We looked into it and have to admit that we cannot explain why g++ 14.1.0 trips over that line.
>
> - It is perfectly legal C++ 17.
> - It compiles without that warning error for other machines, i.e. qemux86, qemux86-64, qemuarm64.
> - It does not act up with g++ 11.4 (Kirkstone) with qemuarm, our own NXP i.MX6 machine, or any other machine we tried.
>
> The problem can be mitigated by replacing the offending line
>
> magic_enum::containers::set color_set_not_const {Color::RED, Color::GREEN, Color::BLUE};
>
> with
>
> magic_enum::containers::set color_set_not_const = {Color::RED, Color::GREEN, Color::BLUE};
>
> We are working on sending a patch for the recipe containing a patch for magic_enum to the OE mailing list (this one).
>
> We already got in contact with the upstream magic_enum project.
>
> https://github.com/Neargye/magic_enum/issues/362
>
> Cheers,
> Mark
>
>
> Building Technologies, Panel Software Fire (BT-FIR/ENG1-Grb)
> Bosch Sicherheitssysteme GmbH | Postfach 11 11 | 85626 Grasbrunn | GERMANY | www.boschsecurity.com
>
> Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart HRB 23118
> Aufsichtsratsvorsitzender: Frank Meyer; Geschäftsführung: Thomas Quante, Peter Löffler, Henrik Siegle, Peter von Wartenberg
>
> > -----Ursprüngliche Nachricht-----
> > Von: Martin Jansa <martin.jansa@gmail.com>
> > Gesendet: Mittwoch, 26. Juni 2024 17:53
> > An: Jonas Mark (BT-FS/ENG1-GRB) <mark.jonas@de.bosch.com>
> > Cc: openembedded-devel@lists.openembedded.org; raj.khem@gmail.com;
> > Simoes Ricardo (BT-FS/ENG1.1-Ovr) <ricardo.simoes@pt.bosch.com>
> > Betreff: Re: [oe] [meta-oe][PATCH] magic-enum: add recipe
> >
> > ptest seems to fail building
> >
> > lib32-magic-enum/0.9.5/git/test/test_containers.cpp:290:89: error:
> > value computed is not used [-Werror=unused-value]
> >   290 |   magic_enum::containers::set color_set_not_const {Color::RED,
> > Color::GREEN, Color::BLUE};
> >       |
> >                          ^
> >
> > On Wed, Jun 19, 2024 at 11:47 AM Mark Jonas via lists.openembedded.org
> > <mark.jonas=de.bosch.com@lists.openembedded.org> wrote:
> > >
> > > From: Ricardo Simoes <ricardo.simoes@pt.bosch.com>
> > >
> > > magic-enum is a header-only C++17 library provides static reflection
> > > for enums, works with any enum type without any macro or boilerplate
> > > code.
> > >
> > > Signed-off-by: Ricardo Simoes <ricardo.simoes@pt.bosch.com>
> > > Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com>
> > > ---
> > >  .../magic-enum/magic-enum/run-ptest           | 27 ++++++++++++
> > >  .../magic-enum/magic-enum_0.9.5.bb            | 44
> > +++++++++++++++++++
> > >  2 files changed, 71 insertions(+)
> > >  create mode 100644
> > > meta-oe/recipes-extended/magic-enum/magic-enum/run-ptest
> > >  create mode 100644
> > > meta-oe/recipes-extended/magic-enum/magic-enum_0.9.5.bb
> > >
> > > diff --git a/meta-oe/recipes-extended/magic-enum/magic-enum/run-
> > ptest
> > > b/meta-oe/recipes-extended/magic-enum/magic-enum/run-ptest
> > > new file mode 100644
> > > index 000000000..865da9f69
> > > --- /dev/null
> > > +++ b/meta-oe/recipes-extended/magic-enum/magic-enum/run-ptest
> > > @@ -0,0 +1,27 @@
> > > +#!/bin/sh
> > > +
> > > +# SPDX-FileCopyrightText: 2024 Bosch Sicherheitssysteme GmbH # #
> > > +SPDX-License-Identifier: MIT
> > > +
> > > +fail_count=0
> > > +all_count=0
> > > +
> > > +for test_suite in tests/test_*
> > > +do
> > > +    if "./$test_suite"
> > > +    then
> > > +        echo "PASS: $test_suite"
> > > +    else
> > > +        echo "FAIL: $test_suite"
> > > +        fail_count=$((fail_count + 1))
> > > +    fi
> > > +    all_count=$((all_count + 1))
> > > +done
> > > +
> > > +if [ $fail_count -eq 0 ]
> > > +then
> > > +    echo "PASS: All $all_count tests passed"
> > > +else
> > > +    echo "FAIL: $fail_count of $all_count tests failed"
> > > +fi
> > > diff --git a/meta-oe/recipes-extended/magic-enum/magic-enum_0.9.5.bb
> > > b/meta-oe/recipes-extended/magic-enum/magic-enum_0.9.5.bb
> > > new file mode 100644
> > > index 000000000..096f869c3
> > > --- /dev/null
> > > +++ b/meta-oe/recipes-extended/magic-enum/magic-enum_0.9.5.bb
> > > @@ -0,0 +1,44 @@
> > > +# SPDX-FileCopyrightText: 2024 Bosch Sicherheitssysteme GmbH # #
> > > +SPDX-License-Identifier: MIT
> > > +
> > > +SUMMARY = "Static reflection for enums"
> > > +DESCRIPTION = "Header-only C++17 library provides static reflection
> > > +for enums, works \ with any enum type without any macro or
> > boilerplate code."
> > > +BUGTRACKER =
> > "https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit
> > hub.com%2FNeargye%2Fmagic_enum%2Fissues&data=05%7C02%7Cmark.jonas%40de
> > .bosch.com%7C30c7277c5aa54b0fd67c08dc95f80c79%7C0ae51e1907c84e4bbb6d64
> > 8ee58410f4%7C0%7C0%7C638550139794967735%7CUnknown%7CTWFpbGZsb3d8eyJWIj
> > oiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C
> > %7C&sdata=dTRcL1OePxuq8rbGeyR4SgdAjkLBeKX79lwaRns9pmQ%3D&reserved=0"
> > > +HOMEPAGE =
> > "https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit
> > hub.com%2FNeargye%2Fmagic_enum&data=05%7C02%7Cmark.jonas%40de.bosch.co
> > m%7C30c7277c5aa54b0fd67c08dc95f80c79%7C0ae51e1907c84e4bbb6d648ee58410f
> > 4%7C0%7C0%7C638550139794976366%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> > wMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata
> > =6GyAhu2fPHE0jZyaohpwL6%2FkP70fly7o4Bfxs9oPdDQ%3D&reserved=0"
> > > +
> > > +LICENSE = "MIT"
> > > +LIC_FILES_CHKSUM =
> > "file://LICENSE;md5=b15f48588464ec8ef87d2b560aad2caa"
> > > +
> > > +SRC_URI = " \
> > > +
> > git://github.com/Neargye/magic_enum.git;protocol=https;branch=master \
> > > +    file://run-ptest \
> > > +"
> > > +
> > > +SRCREV = "e55b9b54d5cf61f8e117cafb17846d7d742dd3b4"
> > > +S = "${WORKDIR}/git"
> > > +
> > > +inherit cmake ptest
> > > +
> > > +EXTRA_OECMAKE = "\
> > > +    -DMAGIC_ENUM_OPT_BUILD_EXAMPLES=OFF \ "
> > > +
> > > +do_install_ptest () {
> > > +    install -d ${D}${PTEST_PATH}/tests
> > > +    install -m 0755 ${B}/test/test_* ${D}${PTEST_PATH}/tests }
> > > +
> > > +# Add catkin and colcon (ROS build system) support FILES:${PN}-dev
> > +=
> > > +"\
> > > +    ${datadir}/magic_enum/package.xml \ "
> > > +
> > > +# Header-only library
> > > +# ${PN} is empty so we need to tweak -dev and -dbg package
> > > +dependencies RDEPENDS:${PN}-dev = ""
> > > +RDEPENDS:${PN}-ptest = ""
> > > +RRECOMMENDS:${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
> > > +
> > > +BBCLASSEXTEND = "native nativesdk"
> > > --
> > > 2.34.1
> > >
> > >
> > > -=-=-=-=-=-=-=-=-=-=-=-
> > > Links: You receive all messages sent to this group.
> > > View/Reply Online (#110963):
> > >
> > https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> > > s.openembedded.org%2Fg%2Fopenembedded-
> > devel%2Fmessage%2F110963&data=05
> > >
> > %7C02%7Cmark.jonas%40de.bosch.com%7C30c7277c5aa54b0fd67c08dc95f80c79%7
> > >
> > C0ae51e1907c84e4bbb6d648ee58410f4%7C0%7C0%7C638550139794981698%7CUnkno
> > >
> > wn%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiL
> > >
> > CJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=axWZTm%2FgV008AP6DiBtD1K3C6WXjF61ysAf
> > > bYxCOIMo%3D&reserved=0 Mute This Topic:
> > >
> > https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> > >
> > s.openembedded.org%2Fmt%2F106757432%2F3617156&data=05%7C02%7Cmark.jona
> > >
> > s%40de.bosch.com%7C30c7277c5aa54b0fd67c08dc95f80c79%7C0ae51e1907c84e4b
> > >
> > bb6d648ee58410f4%7C0%7C0%7C638550139794985970%7CUnknown%7CTWFpbGZsb3d8
> > >
> > eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0
> > >
> > %7C%7C%7C&sdata=zmi38YI4iiU%2BwuaA1OESxzOb2blMvJEyjv9c7rsH3uM%3D&reser
> > > ved=0 Group Owner: openembedded-devel+owner@lists.openembedded.org
> > > Unsubscribe:
> > >
> > https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> > > s.openembedded.org%2Fg%2Fopenembedded-
> > devel%2Funsub&data=05%7C02%7Cmar
> > >
> > k.jonas%40de.bosch.com%7C30c7277c5aa54b0fd67c08dc95f80c79%7C0ae51e1907
> > >
> > c84e4bbb6d648ee58410f4%7C0%7C0%7C638550139794990014%7CUnknown%7CTWFpbG
> > >
> > Zsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%
> > >
> > 3D%7C0%7C%7C%7C&sdata=UFlwDFcdmqLHREOjshbhtNrFIkK07k9wMUVtIpMTrsk%3D&r
> > > eserved=0 [martin.jansa@gmail.com]
> > > -=-=-=-=-=-=-=-=-=-=-=-
> > >
Jonas Mark (BT-FS/ENG1-GRB) June 28, 2024, 10:33 a.m. UTC | #4
Hi Martin,

Roughly an hour ago we sent a patch to this list which mitigates the problem.

https://lists.openembedded.org/g/openembedded-devel/topic/meta_oe_patch_magic_enum/106924966

The real fix would be in gcc. For details, see the patch above.

Cheers,
Mark


> -----Ursprüngliche Nachricht-----
> Von: Martin Jansa <martin.jansa@gmail.com>
> Gesendet: Donnerstag, 27. Juni 2024 10:06
> An: Jonas Mark (BT-FS/ENG1-GRB) <mark.jonas@de.bosch.com>
> Cc: openembedded-devel@lists.openembedded.org; raj.khem@gmail.com;
> Simoes Ricardo (BT-FS/ENG1.1-Ovr) <Ricardo.Simoes@pt.bosch.com>
> Betreff: Re: [oe] [meta-oe][PATCH] magic-enum: add recipe
>
> > Thank you for making us aware of the problem when compiling the
> ptest. We were able to reproduce the problem when compiling for
> qemuarm. We were not able to spot the problem on the autobuilder. How
> did you trigger the problem?
>
> I've just seen new build failure in world build and it was indeed with
> 32bit arm (from multilib builds).
> Thanks for looking into it quickly.
>
> > We looked into it and have to admit that we cannot explain why g++
> 14.1.0 trips over that line.
>
> Have you tried to compare preprocessed output from g++ from qemuarm
> and qemuarm64 to see if there is some strange difference? The code
> where color_set_not_const is used looks simple enough, but maybe some
> REQUIRE* macro expansion does more than it looks in
> https://gith/
> ub.com%2Fsearch%3Fq%3Drepo%253ANeargye%252Fmagic_enum%2Bcolor_set_not_
> const%26type%3Dcode&data=05%7C02%7Cmark.jonas%40de.bosch.com%7C8888a32
> d7d454f38df4f08dc967ffee0%7C0ae51e1907c84e4bbb6d648ee58410f4%7C0%7C0%7
> C638550723682028052%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIj
> oiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=DuD7dK32GW
> m1nbTgXns0nr6TramR55DoQb8WtKJQkDI%3D&reserved=0
>
> Regards,
>
> On Thu, Jun 27, 2024 at 9:00 AM Jonas Mark (BT-FS/ENG1-GRB)
> <mark.jonas@de.bosch.com> wrote:
> >
> > Hi Martin,
> >
> > Thank you for making us aware of the problem when compiling the
> ptest. We were able to reproduce the problem when compiling for
> qemuarm. We were not able to spot the problem on the autobuilder. How
> did you trigger the problem?
> >
> > We looked into it and have to admit that we cannot explain why g++
> 14.1.0 trips over that line.
> >
> > - It is perfectly legal C++ 17.
> > - It compiles without that warning error for other machines, i.e.
> qemux86, qemux86-64, qemuarm64.
> > - It does not act up with g++ 11.4 (Kirkstone) with qemuarm, our own
> NXP i.MX6 machine, or any other machine we tried.
> >
> > The problem can be mitigated by replacing the offending line
> >
> > magic_enum::containers::set color_set_not_const {Color::RED,
> > Color::GREEN, Color::BLUE};
> >
> > with
> >
> > magic_enum::containers::set color_set_not_const = {Color::RED,
> > Color::GREEN, Color::BLUE};
> >
> > We are working on sending a patch for the recipe containing a patch
> for magic_enum to the OE mailing list (this one).
> >
> > We already got in contact with the upstream magic_enum project.
> >
> >
> https://gith/
> >
> ub.com%2FNeargye%2Fmagic_enum%2Fissues%2F362&data=05%7C02%7Cmark.jonas
> >
> %40de.bosch.com%7C8888a32d7d454f38df4f08dc967ffee0%7C0ae51e1907c84e4bb
> >
> b6d648ee58410f4%7C0%7C0%7C638550723682039339%7CUnknown%7CTWFpbGZsb3d8e
> >
> yJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%
> >
> 7C%7C%7C&sdata=toTywh1d9xY2ZtWY1M%2FJ1sqgIGBoxkEe6ftOuUfol7Q%3D&reserv
> > ed=0
> >
> > Cheers,
> > Mark
> >
> >
> > Building Technologies, Panel Software Fire (BT-FIR/ENG1-Grb) Bosch
> > Sicherheitssysteme GmbH | Postfach 11 11 | 85626 Grasbrunn | GERMANY
> |
> >
> http://www.b/
> >
> oschsecurity.com%2F&data=05%7C02%7Cmark.jonas%40de.bosch.com%7C8888a32
> >
> d7d454f38df4f08dc967ffee0%7C0ae51e1907c84e4bbb6d648ee58410f4%7C0%7C0%7
> >
> C638550723682047912%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIj
> >
> oiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=pYBTXRdGRf
> > %2FslmOVYLTFlYIgQIUZEfNzdFcZ1xpUgKY%3D&reserved=0
> >
> > Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart HRB 23118
> > Aufsichtsratsvorsitzender: Frank Meyer; Geschäftsführung: Thomas
> > Quante, Peter Löffler, Henrik Siegle, Peter von Wartenberg
> >
> > > -----Ursprüngliche Nachricht-----
> > > Von: Martin Jansa <martin.jansa@gmail.com>
> > > Gesendet: Mittwoch, 26. Juni 2024 17:53
> > > An: Jonas Mark (BT-FS/ENG1-GRB) <mark.jonas@de.bosch.com>
> > > Cc: openembedded-devel@lists.openembedded.org; raj.khem@gmail.com;
> > > Simoes Ricardo (BT-FS/ENG1.1-Ovr) <ricardo.simoes@pt.bosch.com>
> > > Betreff: Re: [oe] [meta-oe][PATCH] magic-enum: add recipe
> > >
> > > ptest seems to fail building
> > >
> > > lib32-magic-enum/0.9.5/git/test/test_containers.cpp:290:89: error:
> > > value computed is not used [-Werror=unused-value]
> > >   290 |   magic_enum::containers::set color_set_not_const
> {Color::RED,
> > > Color::GREEN, Color::BLUE};
> > >       |
> > >                          ^
> > >
> > > On Wed, Jun 19, 2024 at 11:47 AM Mark Jonas via
> > > lists.openembedded.org
> <mark.jonas=de.bosch.com@lists.openembedded.org> wrote:
> > > >
> > > > From: Ricardo Simoes <ricardo.simoes@pt.bosch.com>
> > > >
> > > > magic-enum is a header-only C++17 library provides static
> > > > reflection for enums, works with any enum type without any macro
> > > > or boilerplate code.
> > > >
> > > > Signed-off-by: Ricardo Simoes <ricardo.simoes@pt.bosch.com>
> > > > Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com>
> > > > ---
> > > >  .../magic-enum/magic-enum/run-ptest           | 27 ++++++++++++
> > > >  .../magic-enum/magic-enum_0.9.5.bb            | 44
> > > +++++++++++++++++++
> > > >  2 files changed, 71 insertions(+)  create mode 100644
> > > > meta-oe/recipes-extended/magic-enum/magic-enum/run-ptest
> > > >  create mode 100644
> > > > meta-oe/recipes-extended/magic-enum/magic-enum_0.9.5.bb
> > > >
> > > > diff --git a/meta-oe/recipes-extended/magic-enum/magic-enum/run-
> > > ptest
> > > > b/meta-oe/recipes-extended/magic-enum/magic-enum/run-ptest
> > > > new file mode 100644
> > > > index 000000000..865da9f69
> > > > --- /dev/null
> > > > +++ b/meta-oe/recipes-extended/magic-enum/magic-enum/run-ptest
> > > > @@ -0,0 +1,27 @@
> > > > +#!/bin/sh
> > > > +
> > > > +# SPDX-FileCopyrightText: 2024 Bosch Sicherheitssysteme GmbH #
> #
> > > > +SPDX-License-Identifier: MIT
> > > > +
> > > > +fail_count=0
> > > > +all_count=0
> > > > +
> > > > +for test_suite in tests/test_*
> > > > +do
> > > > +    if "./$test_suite"
> > > > +    then
> > > > +        echo "PASS: $test_suite"
> > > > +    else
> > > > +        echo "FAIL: $test_suite"
> > > > +        fail_count=$((fail_count + 1))
> > > > +    fi
> > > > +    all_count=$((all_count + 1))
> > > > +done
> > > > +
> > > > +if [ $fail_count -eq 0 ]
> > > > +then
> > > > +    echo "PASS: All $all_count tests passed"
> > > > +else
> > > > +    echo "FAIL: $fail_count of $all_count tests failed"
> > > > +fi
> > > > diff --git
> > > > a/meta-oe/recipes-extended/magic-enum/magic-enum_0.9.5.bb
> > > > b/meta-oe/recipes-extended/magic-enum/magic-enum_0.9.5.bb
> > > > new file mode 100644
> > > > index 000000000..096f869c3
> > > > --- /dev/null
> > > > +++ b/meta-oe/recipes-extended/magic-enum/magic-enum_0.9.5.bb
> > > > @@ -0,0 +1,44 @@
> > > > +# SPDX-FileCopyrightText: 2024 Bosch Sicherheitssysteme GmbH #
> #
> > > > +SPDX-License-Identifier: MIT
> > > > +
> > > > +SUMMARY = "Static reflection for enums"
> > > > +DESCRIPTION = "Header-only C++17 library provides static
> > > > +reflection for enums, works \ with any enum type without any
> > > > +macro or
> > > boilerplate code."
> > > > +BUGTRACKER =
> > >
> "https://g/
> > >
> it%2F&data=05%7C02%7Cmark.jonas%40de.bosch.com%7C8888a32d7d454f38df4
> > >
> f08dc967ffee0%7C0ae51e1907c84e4bbb6d648ee58410f4%7C0%7C0%7C638550723
> > >
> 682054182%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMz
> > >
> IiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=PtSf9KX9ObMypY7g
> > > 6bKoBbxluwcsVNqnTOYBdMK0iqw%3D&reserved=0
> > >
> hub.com%2FNeargye%2Fmagic_enum%2Fissues&data=05%7C02%7Cmark.jonas%40
> > > de
> > >
> .bosch.com%7C30c7277c5aa54b0fd67c08dc95f80c79%7C0ae51e1907c84e4bbb6d
> > > 64
> > >
> 8ee58410f4%7C0%7C0%7C638550139794967735%7CUnknown%7CTWFpbGZsb3d8eyJW
> > > Ij
> > >
> oiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%
> > > 7C
> > >
> %7C&sdata=dTRcL1OePxuq8rbGeyR4SgdAjkLBeKX79lwaRns9pmQ%3D&reserved=0"
> > > > +HOMEPAGE =
> > >
> "https://g/
> > >
> it%2F&data=05%7C02%7Cmark.jonas%40de.bosch.com%7C8888a32d7d454f38df4
> > >
> f08dc967ffee0%7C0ae51e1907c84e4bbb6d648ee58410f4%7C0%7C0%7C638550723
> > >
> 682059265%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMz
> > >
> IiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=RyLQUwMZMsT9KRxk
> > > flvMIdP1dJQ%2Fm6pocmHBVhUj0zo%3D&reserved=0
> > >
> hub.com%2FNeargye%2Fmagic_enum&data=05%7C02%7Cmark.jonas%40de.bosch.
> > > co
> > >
> m%7C30c7277c5aa54b0fd67c08dc95f80c79%7C0ae51e1907c84e4bbb6d648ee5841
> > > 0f
> > >
> 4%7C0%7C0%7C638550139794976366%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wL
> > > jA
> > >
> wMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sda
> > > ta =6GyAhu2fPHE0jZyaohpwL6%2FkP70fly7o4Bfxs9oPdDQ%3D&reserved=0"
> > > > +
> > > > +LICENSE = "MIT"
> > > > +LIC_FILES_CHKSUM =
> > > "file://LICENSE;md5=b15f48588464ec8ef87d2b560aad2caa"
> > > > +
> > > > +SRC_URI = " \
> > > > +
> > >
> git://github.com/Neargye/magic_enum.git;protocol=https;branch=master
> > > \
> > > > +    file://run-ptest \
> > > > +"
> > > > +
> > > > +SRCREV = "e55b9b54d5cf61f8e117cafb17846d7d742dd3b4"
> > > > +S = "${WORKDIR}/git"
> > > > +
> > > > +inherit cmake ptest
> > > > +
> > > > +EXTRA_OECMAKE = "\
> > > > +    -DMAGIC_ENUM_OPT_BUILD_EXAMPLES=OFF \ "
> > > > +
> > > > +do_install_ptest () {
> > > > +    install -d ${D}${PTEST_PATH}/tests
> > > > +    install -m 0755 ${B}/test/test_* ${D}${PTEST_PATH}/tests }
> > > > +
> > > > +# Add catkin and colcon (ROS build system) support
> > > > +FILES:${PN}-dev
> > > +=
> > > > +"\
> > > > +    ${datadir}/magic_enum/package.xml \ "
> > > > +
> > > > +# Header-only library
> > > > +# ${PN} is empty so we need to tweak -dev and -dbg package
> > > > +dependencies RDEPENDS:${PN}-dev = ""
> > > > +RDEPENDS:${PN}-ptest = ""
> > > > +RRECOMMENDS:${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
> > > > +
> > > > +BBCLASSEXTEND = "native nativesdk"
> > > > --
> > > > 2.34.1
> > > >
> > > >
> > > > -=-=-=-=-=-=-=-=-=-=-=-
> > > > Links: You receive all messages sent to this group.
> > > > View/Reply Online (#110963):
> > > >
> > >
> https://li/
> > >
> st%2F&data=05%7C02%7Cmark.jonas%40de.bosch.com%7C8888a32d7d454f38df4
> > >
> f08dc967ffee0%7C0ae51e1907c84e4bbb6d648ee58410f4%7C0%7C0%7C638550723
> > >
> 682065056%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMz
> > >
> IiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=kuNvxhwzVx7aJHSl
> > > XWuehPoyWYjxpPByhk8NN6oaifs%3D&reserved=0
> > > > s.openembedded.org%2Fg%2Fopenembedded-
> > > devel%2Fmessage%2F110963&data=05
> > > >
> > >
> %7C02%7Cmark.jonas%40de.bosch.com%7C30c7277c5aa54b0fd67c08dc95f80c79
> > > %7
> > > >
> > >
> C0ae51e1907c84e4bbb6d648ee58410f4%7C0%7C0%7C638550139794981698%7CUnk
> > > no
> > > >
> > >
> wn%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWw
> > > iL
> > > >
> > >
> CJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=axWZTm%2FgV008AP6DiBtD1K3C6WXjF61ys
> > > Af
> > > > bYxCOIMo%3D&reserved=0 Mute This Topic:
> > > >
> > >
> https://li/
> > >
> st%2F&data=05%7C02%7Cmark.jonas%40de.bosch.com%7C8888a32d7d454f38df4
> > >
> f08dc967ffee0%7C0ae51e1907c84e4bbb6d648ee58410f4%7C0%7C0%7C638550723
> > >
> 682070802%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMz
> > >
> IiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=uQLjLkVSd8ffkxwS
> > > RoPsXKimw%2FEYyNH8uBpfs9lncaY%3D&reserved=0
> > > >
> > >
> s.openembedded.org%2Fmt%2F106757432%2F3617156&data=05%7C02%7Cmark.jo
> > > na
> > > >
> > >
> s%40de.bosch.com%7C30c7277c5aa54b0fd67c08dc95f80c79%7C0ae51e1907c84e
> > > 4b
> > > >
> > >
> bb6d648ee58410f4%7C0%7C0%7C638550139794985970%7CUnknown%7CTWFpbGZsb3
> > > d8
> > > >
> > >
> eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7
> > > C0
> > > >
> > >
> %7C%7C%7C&sdata=zmi38YI4iiU%2BwuaA1OESxzOb2blMvJEyjv9c7rsH3uM%3D&res
> > > er
> > > > ved=0 Group Owner: openembedded-
> devel+owner@lists.openembedded.org
> > > > Unsubscribe:
> > > >
> > >
> https://li/
> > >
> st%2F&data=05%7C02%7Cmark.jonas%40de.bosch.com%7C8888a32d7d454f38df4
> > >
> f08dc967ffee0%7C0ae51e1907c84e4bbb6d648ee58410f4%7C0%7C0%7C638550723
> > >
> 682076456%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMz
> > >
> IiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=vt5SKlHA9t7ieeaj
> > > Gt5bnE73jda6MZcxsI%2FcuPTMNBw%3D&reserved=0
> > > > s.openembedded.org%2Fg%2Fopenembedded-
> > > devel%2Funsub&data=05%7C02%7Cmar
> > > >
> > >
> k.jonas%40de.bosch.com%7C30c7277c5aa54b0fd67c08dc95f80c79%7C0ae51e19
> > > 07
> > > >
> > >
> c84e4bbb6d648ee58410f4%7C0%7C0%7C638550139794990014%7CUnknown%7CTWFp
> > > bG
> > > >
> > >
> Zsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn
> > > 0%
> > > >
> > >
> 3D%7C0%7C%7C%7C&sdata=UFlwDFcdmqLHREOjshbhtNrFIkK07k9wMUVtIpMTrsk%3D
> > > &r
> > > > eserved=0 [martin.jansa@gmail.com]
> > > > -=-=-=-=-=-=-=-=-=-=-=-
> > > >
diff mbox series

Patch

diff --git a/meta-oe/recipes-extended/magic-enum/magic-enum/run-ptest b/meta-oe/recipes-extended/magic-enum/magic-enum/run-ptest
new file mode 100644
index 000000000..865da9f69
--- /dev/null
+++ b/meta-oe/recipes-extended/magic-enum/magic-enum/run-ptest
@@ -0,0 +1,27 @@ 
+#!/bin/sh
+
+# SPDX-FileCopyrightText: 2024 Bosch Sicherheitssysteme GmbH
+#
+# SPDX-License-Identifier: MIT
+
+fail_count=0
+all_count=0
+
+for test_suite in tests/test_*
+do
+    if "./$test_suite"
+    then
+        echo "PASS: $test_suite"
+    else
+        echo "FAIL: $test_suite"
+        fail_count=$((fail_count + 1))
+    fi
+    all_count=$((all_count + 1))
+done
+
+if [ $fail_count -eq 0 ]
+then
+    echo "PASS: All $all_count tests passed"
+else
+    echo "FAIL: $fail_count of $all_count tests failed"
+fi
diff --git a/meta-oe/recipes-extended/magic-enum/magic-enum_0.9.5.bb b/meta-oe/recipes-extended/magic-enum/magic-enum_0.9.5.bb
new file mode 100644
index 000000000..096f869c3
--- /dev/null
+++ b/meta-oe/recipes-extended/magic-enum/magic-enum_0.9.5.bb
@@ -0,0 +1,44 @@ 
+# SPDX-FileCopyrightText: 2024 Bosch Sicherheitssysteme GmbH
+#
+# SPDX-License-Identifier: MIT
+
+SUMMARY = "Static reflection for enums"
+DESCRIPTION = "Header-only C++17 library provides static reflection for enums, works \
+with any enum type without any macro or boilerplate code."
+BUGTRACKER = "https://github.com/Neargye/magic_enum/issues"
+HOMEPAGE = "https://github.com/Neargye/magic_enum"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b15f48588464ec8ef87d2b560aad2caa"
+
+SRC_URI = " \
+    git://github.com/Neargye/magic_enum.git;protocol=https;branch=master \
+    file://run-ptest \
+"
+
+SRCREV = "e55b9b54d5cf61f8e117cafb17846d7d742dd3b4"
+S = "${WORKDIR}/git"
+
+inherit cmake ptest
+
+EXTRA_OECMAKE = "\
+    -DMAGIC_ENUM_OPT_BUILD_EXAMPLES=OFF \
+"
+
+do_install_ptest () {
+    install -d ${D}${PTEST_PATH}/tests
+    install -m 0755 ${B}/test/test_* ${D}${PTEST_PATH}/tests
+}
+
+# Add catkin and colcon (ROS build system) support
+FILES:${PN}-dev += "\
+    ${datadir}/magic_enum/package.xml \
+"
+
+# Header-only library
+# ${PN} is empty so we need to tweak -dev and -dbg package dependencies
+RDEPENDS:${PN}-dev = ""
+RDEPENDS:${PN}-ptest = ""
+RRECOMMENDS:${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
+
+BBCLASSEXTEND = "native nativesdk"