Skip to contentSkip to conversation

json-c: Re-enable '-Werror' now that icecc is not supported anymore

PATCH In review Moritz Haase 4 participants 4 messages Jun 26, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 json-c: Re-enable '-Werror' now that icecc is not supported anymore

6481e8b209b ("json-c: fix icecc compilation") disabled '-Werror' unconditionally for all compilers. As support for icecc has been removed via ba4fd5229893 ("classes/recipes-devtools: Drop icecc from OE-Core") recently, we can re-enable it.

---
 meta/recipes-devtools/json-c/json-c_0.18.bb | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
meta/recipes-devtools/json-c/json-c_0.18.bb +2 -4
index ece320d66ce1f03ce0c8655374c02c283a9364dd..5edeced4c55df088e1a9990d9e159fe970bb537b 100644
@@ -19,10 +19,8 @@ UPSTREAM_CHECK_REGEX = "json-c-(?P<pver>\d+(\.\d+)+)-\d+"
 
 RPROVIDES:${PN} = "libjson"
 
-# - '-Werror' must be disabled for ICECC builds
-# - Apps aren't needed/packaged and their CMakeLists.txt is incompatible with CMake 4+.
-EXTRA_OECMAKE = "-DDISABLE_WERROR=ON \
-                 -DBUILD_APPS=OFF \
+# Apps aren't needed/packaged and their CMakeLists.txt is incompatible with CMake 4+.
+EXTRA_OECMAKE = "-DBUILD_APPS=OFF \
 "
 
 inherit cmake ptest
Reviewed-by on v1 1/1
#1 lore raw

Hi Moritz,

Quoted 5 lines · Moritz Haase via lists.openembedded.org

6481e8b209b ("json-c: fix icecc compilation") disabled '-Werror' unconditionally for all compilers. As support for icecc has been removed via ba4fd5229893 ("classes/recipes-devtools: Drop icecc from OE-Core") recently, we can re-enable it.

Looks nice, thanks. Minor comment below.

Quoted 12 lines
---
  meta/recipes-devtools/json-c/json-c_0.18.bb | 6 ++----
  1 file changed, 2 insertions(+), 4 deletions(-)
meta/recipes-devtools/json-c/json-c_0.18.bb +0 -0
index ece320d66ce1f03ce0c8655374c02c283a9364dd..5edeced4c55df088e1a9990d9e159fe970bb537b 100644

meta/recipes-devtools/json-c/json-c_0.18.bb UPSTREAM_CHECK_REGEX = "json-c-(?P<pver>\d+(\.\d+)+)-\d+" · line 24

Quoted 10 lines
meta/recipes-devtools/json-c/json-c_0.18.bb +2 -4
@@ -19,10 +19,8 @@ UPSTREAM_CHECK_REGEX = "json-c-(?P<pver>\d+(\.\d+)+)-\d+"
 
  RPROVIDES:${PN} = "libjson"
 
-# - '-Werror' must be disabled for ICECC builds
-# - Apps aren't needed/packaged and their CMakeLists.txt is incompatible with CMake 4+.
-EXTRA_OECMAKE = "-DDISABLE_WERROR=ON \
-                 -DBUILD_APPS=OFF \
+# Apps aren't needed/packaged and their CMakeLists.txt is incompatible with CMake 4+.
+EXTRA_OECMAKE = "-DBUILD_APPS=OFF \
  "

We could have the closing quote character on the same line.

Thanks!
Quentin

#3 lore raw
In reply to Moritz Haase

meta/recipes-devtools/json-c/json-c_0.18.bb UPSTREAM_CHECK_REGEX = "json-c-(?P<pver>\d+(\.\d+)+)-\d+" · line 25

Quoted 4 lines · Moritz Haase via lists.openembedded.org
meta/recipes-devtools/json-c/json-c_0.18.bb +0 -4
-# - '-Werror' must be disabled for ICECC builds
-# - Apps aren't needed/packaged and their CMakeLists.txt is incompatible with CMake 4+.
-EXTRA_OECMAKE = "-DDISABLE_WERROR=ON \
-                 -DBUILD_APPS=OFF \

-Werror is horrible and we should be turning it off if upstream defaults to enabling it, so I’d say remove the comment but keep the disabling.

It makes switching C library or compilers very time-consuming when random libraries gain a new warning and the build fails.

Ross