Bug#1075631: warzone2100: ftbfs with GCC-14

Gianfranco Costamagna locutusofborg at debian.org
Mon Jul 29 15:29:54 BST 2024


Hello, for warzone2100 I see two issues:
1) embedded rapidjson library is used, and that one is incompatible with gcc-14.

An east fix is to Depend on rapidjson-dev and clean the embedded one during build.

Second set of issues are related to alloc-zero and uninitialized gcc flags. I overridden them.
The gcc-14 related issues seem to come from regex header and not real bugs in the code, but I failed to fully understand what
was going on (and this is the reason I'm not tagging with patch)

diff -Nru warzone2100-4.4.2/debian/changelog warzone2100-4.4.2/debian/changelog
--- warzone2100-4.4.2/debian/changelog	2023-12-29 05:05:34.000000000 +0100
+++ warzone2100-4.4.2/debian/changelog	2024-07-29 15:09:34.000000000 +0200
@@ -1,3 +1,13 @@
+warzone2100 (4.4.2-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload
+  * Also add -Wno-error=alloc-zero, and -Wno-error=uninitialized
+    to fix a regex issue with g++-14
+  * Add external rapidjson library, and remove the embedded one on clean
+    target
+
+ -- Gianfranco Costamagna <locutusofborg at debian.org>  Mon, 29 Jul 2024 15:09:34 +0200
+
  warzone2100 (4.4.2-1) unstable; urgency=medium
  
    * new upstream release lots of bug fixes
diff -Nru warzone2100-4.4.2/debian/control warzone2100-4.4.2/debian/control
--- warzone2100-4.4.2/debian/control	2023-12-29 05:05:34.000000000 +0100
+++ warzone2100-4.4.2/debian/control	2024-07-26 18:58:16.000000000 +0200
@@ -42,6 +43,7 @@
   libxrandr-dev,
   ninja-build,
   pkg-config,
+ rapidjson-dev,
   unzip,
   xauth,
   xsltproc,
diff -Nru warzone2100-4.4.2/debian/rules warzone2100-4.4.2/debian/rules
--- warzone2100-4.4.2/debian/rules	2023-07-25 14:56:01.000000000 +0200
+++ warzone2100-4.4.2/debian/rules	2024-07-29 15:09:34.000000000 +0200
@@ -2,7 +2,7 @@
  
  #export DH_VERBOSE=1
  export DEB_BUILD_MAINT_OPTIONS = hardening=+all reproducible=-timeless
-export DEB_CPPFLAGS_MAINT_APPEND = -DNDEBUG
+export DEB_CPPFLAGS_MAINT_APPEND = -DNDEBUG -Wno-error=alloc-zero -Wno-error=uninitialized
  
  # workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81358
  ifneq (,$(filter $(DEB_HOST_ARCH), armel m68k mipsel powerpc riscv64 sh4))
@@ -48,4 +48,5 @@
  	# Do nothing here at the moment to work around a FTBFS
  
  override_dh_clean:
+	rm -rf 3rdparty/discord-rpc/thirdparty/rapidjson
  	rm -rf debian/build po/custom/fromJson.txt debian/warzone2100 debian/warzone2100-data debian/tmp debian/warzone2100-music debian/.debhelper
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-games-devel/attachments/20240729/649309e7/attachment.sig>


More information about the Pkg-games-devel mailing list