Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package tesseract for openSUSE:Factory checked in at 2026-08-11 17:17:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/tesseract (Old) and /work/SRC/openSUSE:Factory/.tesseract.new.17972 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "tesseract" Tue Aug 11 17:17:15 2026 rev:7 rq:1370644 version:2024_06_15 Changes: -------- --- /work/SRC/openSUSE:Factory/tesseract/tesseract.changes 2024-06-19 16:37:10.078648587 +0200 +++ /work/SRC/openSUSE:Factory/.tesseract.new.17972/tesseract.changes 2026-08-11 17:18:54.906570192 +0200 @@ -1,0 +2,5 @@ +Tue Aug 4 07:46:40 UTC 2026 - Bernhard Wiedemann <[email protected]> + +- Add tesseract-gcc16-placement-new.patch to fix compilation with gcc16 + +------------------------------------------------------------------- New: ---- tesseract-gcc16-placement-new.patch ----------(New B)---------- New: - Add tesseract-gcc16-placement-new.patch to fix compilation with gcc16 ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ tesseract.spec ++++++ --- /var/tmp/diff_new_pack.zag5iY/_old 2026-08-11 17:18:56.466636301 +0200 +++ /var/tmp/diff_new_pack.zag5iY/_new 2026-08-11 17:18:56.474636640 +0200 @@ -27,6 +27,8 @@ Source1: tesseract.desktop Source2: tesseract.png Source3: update.sh +# PATCH-FIX-UPSTREAM tesseract-gcc16-placement-new.patch -- do not redefine the standard placement new/delete operators, which breaks the build with gcc16 +Patch0: tesseract-gcc16-placement-new.patch BuildRequires: Mesa-devel BuildRequires: fdupes BuildRequires: gcc-c++ @@ -62,7 +64,7 @@ This package provides the data files for the Tesseract game. %prep -%setup -q -n %{name} +%autosetup -p1 -n %{name} %build rm -r bin_unix ++++++ tesseract-gcc16-placement-new.patch ++++++ >From 820f0115b97458196b90eb1967024cf0f4e474bd Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" <[email protected]> Date: Tue, 4 Aug 2026 09:36:21 +0200 Subject: [PATCH] Do not redefine the standard placement new/delete operators tools.h defined the placement forms of operator new/delete itself instead of pulling them in from <new>. That only works as long as no standard library header defining them has been included before. As of GCC 16, libstdc++ includes <new> from <bits/stl_iterator.h>, which cube.h drags in via <math.h> -> <cmath>, so the definitions in tools.h now collide with the ones from the standard library and the build fails: In file included from shared/cube.h:55: shared/tools.h:39:14: error: redefinition of 'void* operator new(size_t, void*)' 39 | inline void *operator new(size_t, void *p) { return p; } | ^~~~~~~~ /usr/include/c++/16/new:168:7: note: 'void* operator new(std::size_t, void*)' previously defined here Include <new> and drop the hand-written definitions. The standard ones are inline and behave identically - and, unlike ours, are constexpr where the standard requires it. The custom operator new(size_t, bool) overloads are not affected. Tested with GCC 13 and GCC 16. --- src/shared/tools.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/shared/tools.h b/src/shared/tools.h index 4cbe103..26edd61 100644 --- a/src/shared/tools.h +++ b/src/shared/tools.h @@ -3,6 +3,8 @@ #ifndef _TOOLS_H #define _TOOLS_H +#include <new> // for the placement forms of operator new/delete + #ifdef NULL #undef NULL #endif @@ -36,10 +38,6 @@ typedef unsigned long long int ullong; void *operator new(size_t, bool); void *operator new[](size_t, bool); -inline void *operator new(size_t, void *p) { return p; } -inline void *operator new[](size_t, void *p) { return p; } -inline void operator delete(void *, void *) {} -inline void operator delete[](void *, void *) {} #ifdef swap #undef swap
