diff mbox series

json-c: fix icecc compilation

Message ID 20231128224743.2854095-1-m.felsch@pengutronix.de
State Accepted, archived
Commit 915f8307b063e17ddadd5dface83578b8ad254e2
Headers show
Series json-c: fix icecc compilation | expand

Commit Message

Marco Felsch Nov. 28, 2023, 10:47 p.m. UTC
Skip -Werror to make it possible to compile this recipe with ICECC else
all fallthrough comments will be removed since we pre-process the files
on the host before sending them to the compile nodes which then cause
errors because of default -Werror switch.

Fixes: caf64f85b5c5 ("json-c: update 0.13.1 - > 0.14")
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
Hi,

I'm not familar with the stable material but IMHO this would be somthing
for kirkstone.

Regards,
  Marco

 meta/recipes-devtools/json-c/json-c_0.17.bb | 3 +++
 1 file changed, 3 insertions(+)

Comments

Peter Marko Nov. 29, 2023, 7:11 a.m. UTC | #1
-----Original Message-----
From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Marco Felsch via lists.openembedded.org
Sent: Tuesday, November 28, 2023 23:48
To: openembedded-core@lists.openembedded.org
Cc: yocto@pengutronix.de; mfe@pengutronix.de
Subject: [OE-core] [PATCH] json-c: fix icecc compilation

> Skip -Werror to make it possible to compile this recipe with ICECC else all fallthrough comments will be removed since we pre-process the files on the host before sending them to the compile nodes which then cause errors because of default -Werror switch.
>
> Fixes: caf64f85b5c5 ("json-c: update 0.13.1 - > 0.14")
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
> Hi,
>
> I'm not familar with the stable material but IMHO this would be somthing for kirkstone.

You need to send a separate patch for kirkstone as this one does not apply there.

>
> Regards,
>   Marco
>
>  meta/recipes-devtools/json-c/json-c_0.17.bb | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/meta/recipes-devtools/json-c/json-c_0.17.bb b/meta/recipes-devtools/json-c/json-c_0.17.bb
> index f4b7a32cea01..20bcece7685d 100644
> --- a/meta/recipes-devtools/json-c/json-c_0.17.bb
> +++ b/meta/recipes-devtools/json-c/json-c_0.17.bb
> @@ -17,6 +17,9 @@ UPSTREAM_CHECK_REGEX = "json-c-(?P<pver>\d+(\.\d+)+)-\d+"
>  
>  RPROVIDES:${PN} = "libjson"
>  
> +# Required for ICECC builds
> +EXTRA_OECMAKE = "-DDISABLE_WERROR=ON"

I don't like removing WERROR unconditionally which decreases quality checks.
Can we do it only in case ICECC is used?
Something like "${@'-DDISABLE_WERROR=ON' if bb.data.inherits_class(icecc, d) else ''}"

> +
>  inherit cmake ptest
>  
>  do_install_ptest() {
--
2.39.2
Marco Felsch Nov. 29, 2023, 9:36 a.m. UTC | #2
On 23-11-29, Marko, Peter wrote:
> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Marco Felsch via lists.openembedded.org
> Sent: Tuesday, November 28, 2023 23:48
> To: openembedded-core@lists.openembedded.org
> Cc: yocto@pengutronix.de; mfe@pengutronix.de
> Subject: [OE-core] [PATCH] json-c: fix icecc compilation
> 
> > Skip -Werror to make it possible to compile this recipe with ICECC else all fallthrough comments will be removed since we pre-process the files on the host before sending them to the compile nodes which then cause errors because of default -Werror switch.
> >
> > Fixes: caf64f85b5c5 ("json-c: update 0.13.1 - > 0.14")
> > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> > ---
> > Hi,
> >
> > I'm not familar with the stable material but IMHO this would be somthing for kirkstone.
> 
> You need to send a separate patch for kirkstone as this one does not apply there.

Thanks for the information. So there are no stable maintainers
backporting this patch?

> > Regards,
> >   Marco
> >
> >  meta/recipes-devtools/json-c/json-c_0.17.bb | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/meta/recipes-devtools/json-c/json-c_0.17.bb b/meta/recipes-devtools/json-c/json-c_0.17.bb
> > index f4b7a32cea01..20bcece7685d 100644
> > --- a/meta/recipes-devtools/json-c/json-c_0.17.bb
> > +++ b/meta/recipes-devtools/json-c/json-c_0.17.bb
> > @@ -17,6 +17,9 @@ UPSTREAM_CHECK_REGEX = "json-c-(?P<pver>\d+(\.\d+)+)-\d+"
> >  
> >  RPROVIDES:${PN} = "libjson"
> >  
> > +# Required for ICECC builds
> > +EXTRA_OECMAKE = "-DDISABLE_WERROR=ON"
> 
> I don't like removing WERROR unconditionally which decreases quality checks.
> Can we do it only in case ICECC is used?
> Something like "${@'-DDISABLE_WERROR=ON' if bb.data.inherits_class(icecc, d) else ''}"

Good point, but IMHO IMHO Werror builds are for the project itself. It's
not oe-core's purpose to check each package that Werror builds do
succeed else you would need to enable it for all packages.

Regards,
  Marco


> 
> > +
> >  inherit cmake ptest
> >  
> >  do_install_ptest() {
> --
> 2.39.2
> 
>
Alexander Kanavin Nov. 29, 2023, 10:04 a.m. UTC | #3
On Wed, 29 Nov 2023 at 10:36, Marco Felsch <m.felsch@pengutronix.de> wrote:
> > I don't like removing WERROR unconditionally which decreases quality checks.
> > Can we do it only in case ICECC is used?
> > Something like "${@'-DDISABLE_WERROR=ON' if bb.data.inherits_class(icecc, d) else ''}"
>
> Good point, but IMHO IMHO Werror builds are for the project itself. It's
> not oe-core's purpose to check each package that Werror builds do
> succeed else you would need to enable it for all packages.

In general we remove -Werror wherever we see it. If all components had
it, every gcc version update would cause an unfixable mountain of
fails all over the place. And version updates for the components
themselves would cause non-deterministic native fails too, depending
on which gcc version the build host has.

-Werror is something components should run only in their own CI.

Alex
Marco Felsch Nov. 29, 2023, 11:15 a.m. UTC | #4
On 23-11-29, Alexander Kanavin wrote:
> On Wed, 29 Nov 2023 at 10:36, Marco Felsch <m.felsch@pengutronix.de> wrote:
> > > I don't like removing WERROR unconditionally which decreases quality checks.
> > > Can we do it only in case ICECC is used?
> > > Something like "${@'-DDISABLE_WERROR=ON' if bb.data.inherits_class(icecc, d) else ''}"
> >
> > Good point, but IMHO IMHO Werror builds are for the project itself. It's
> > not oe-core's purpose to check each package that Werror builds do
> > succeed else you would need to enable it for all packages.
> 
> In general we remove -Werror wherever we see it. If all components had
> it, every gcc version update would cause an unfixable mountain of
> fails all over the place. And version updates for the components
> themselves would cause non-deterministic native fails too, depending
> on which gcc version the build host has.
> 
> -Werror is something components should run only in their own CI.

Exactly :) So this patch is good for oe-core?

Regards,
  Marco
diff mbox series

Patch

diff --git a/meta/recipes-devtools/json-c/json-c_0.17.bb b/meta/recipes-devtools/json-c/json-c_0.17.bb
index f4b7a32cea01..20bcece7685d 100644
--- a/meta/recipes-devtools/json-c/json-c_0.17.bb
+++ b/meta/recipes-devtools/json-c/json-c_0.17.bb
@@ -17,6 +17,9 @@  UPSTREAM_CHECK_REGEX = "json-c-(?P<pver>\d+(\.\d+)+)-\d+"
 
 RPROVIDES:${PN} = "libjson"
 
+# Required for ICECC builds
+EXTRA_OECMAKE = "-DDISABLE_WERROR=ON"
+
 inherit cmake ptest
 
 do_install_ptest() {