Index | Thread | Search

From:
Claudio Jeker <cjeker@diehard.n-r-g.com>
Subject:
various c++ fixes for gcc15
To:
ports@openbsd.org
Cc:
Theo Buehler <tb@openbsd.org>, Rafael Sadowski <rsadowski@openbsd.org>
Date:
Tue, 16 Dec 2025 17:04:20 +0100

Download raw body.

Thread
gcc15 is very sensitive to missing includes.
Here is a collection of ports that fail to build because something is
missing. In some cases upstream may have fixed this already but I just did
the minimal work here.

I bumped all port REVISIONS since I'm not sure if this alters code on
clang.
-- 
:wq Claudio

Index: cad/lib3mf/Makefile
===================================================================
RCS file: /cvs/ports/cad/lib3mf/Makefile,v
diff -u -p -r1.1.1.1 Makefile
--- cad/lib3mf/Makefile	29 Nov 2025 23:38:42 -0000	1.1.1.1
+++ cad/lib3mf/Makefile	16 Dec 2025 15:57:47 -0000
@@ -1,5 +1,6 @@
 
 V =		2.4.1
+REVISION =	0
 
 COMMENT =	implementation of the 3D Manufacturing Format file standard
 GH_ACCOUNT =	3MFConsortium
Index: cad/lib3mf/patches/patch-Source_Model_Writer_v100_NMR_ResourceDependencySorter_cpp
===================================================================
RCS file: cad/lib3mf/patches/patch-Source_Model_Writer_v100_NMR_ResourceDependencySorter_cpp
diff -N cad/lib3mf/patches/patch-Source_Model_Writer_v100_NMR_ResourceDependencySorter_cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ cad/lib3mf/patches/patch-Source_Model_Writer_v100_NMR_ResourceDependencySorter_cpp	15 Dec 2025 12:53:30 -0000
@@ -0,0 +1,21 @@
+error: 'find' is not a member of 'std';
+
+Index: Source/Model/Writer/v100/NMR_ResourceDependencySorter.cpp
+--- Source/Model/Writer/v100/NMR_ResourceDependencySorter.cpp.orig
++++ Source/Model/Writer/v100/NMR_ResourceDependencySorter.cpp
+@@ -30,6 +30,8 @@ NMR_ResourcDependencySorter resolves the dependencies 
+ sorting them topologically.
+ --*/
+ 
++#include <algorithm>
++
+ #include "Model/Writer/v100/NMR_ResourceDependencySorter.h"
+ 
+ #include "Common/Graph/DirectedGraph.h"
+@@ -122,4 +124,4 @@ namespace NMR
+         return m_resourceIDToIndex.at(resourceID);
+     }
+ 
+-}  // namespace NMR
+\ No newline at end of file
++}  // namespace NMR
Index: cad/lib3mf/patches/patch-Tests_CPP_Bindings_Source_Volumetric_cpp
===================================================================
RCS file: cad/lib3mf/patches/patch-Tests_CPP_Bindings_Source_Volumetric_cpp
diff -N cad/lib3mf/patches/patch-Tests_CPP_Bindings_Source_Volumetric_cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ cad/lib3mf/patches/patch-Tests_CPP_Bindings_Source_Volumetric_cpp	15 Dec 2025 12:53:30 -0000
@@ -0,0 +1,12 @@
+Index: Tests/CPP_Bindings/Source/Volumetric.cpp
+--- Tests/CPP_Bindings/Source/Volumetric.cpp.orig
++++ Tests/CPP_Bindings/Source/Volumetric.cpp
+@@ -30,6 +30,8 @@ Vulometric.cpp: Defines Unittests for the Volumetric e
+ 
+ --*/
+ 
++#include <algorithm>
++
+ #include "UnitTest_Utilities.h"
+ #include "lib3mf_implicit.hpp"
+ 
Index: graphics/rawstudio/Makefile
===================================================================
RCS file: /cvs/ports/graphics/rawstudio/Makefile,v
diff -u -p -r1.39 Makefile
--- graphics/rawstudio/Makefile	26 Sep 2023 11:39:09 -0000	1.39
+++ graphics/rawstudio/Makefile	16 Dec 2025 15:58:20 -0000
@@ -1,7 +1,7 @@
 COMMENT =	tool for working with RAW images
 
 DISTNAME =	rawstudio-1.2
-REVISION =	24
+REVISION =	25
 
 CATEGORIES =	graphics
 
Index: graphics/rawstudio/patches/patch-src_rs-batch_c
===================================================================
RCS file: graphics/rawstudio/patches/patch-src_rs-batch_c
diff -N graphics/rawstudio/patches/patch-src_rs-batch_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ graphics/rawstudio/patches/patch-src_rs-batch_c	15 Dec 2025 12:53:30 -0000
@@ -0,0 +1,11 @@
+Index: src/rs-batch.c
+--- src/rs-batch.c.orig
++++ src/rs-batch.c
+@@ -22,6 +22,7 @@
+ #include <gtk/gtk.h>
+ #include <config.h>
+ #include <libxml/encoding.h>
++#include <libxml/parser.h>
+ #include <libxml/xmlwriter.h>
+ #include "rawstudio.h"
+ #include "rs-batch.h"
Index: graphics/rawstudio/patches/patch-src_rs-cache_c
===================================================================
RCS file: graphics/rawstudio/patches/patch-src_rs-cache_c
diff -N graphics/rawstudio/patches/patch-src_rs-cache_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ graphics/rawstudio/patches/patch-src_rs-cache_c	15 Dec 2025 12:53:30 -0000
@@ -0,0 +1,11 @@
+Index: src/rs-cache.c
+--- src/rs-cache.c.orig
++++ src/rs-cache.c
+@@ -19,6 +19,7 @@
+ 
+ #include <glib.h>
+ #include <libxml/encoding.h>
++#include <libxml/parser.h>
+ #include <libxml/xmlwriter.h>
+ #include "rawstudio.h"
+ #include "rs-cache.h"
Index: graphics/rawstudio/patches/patch-src_rs-curve_c
===================================================================
RCS file: graphics/rawstudio/patches/patch-src_rs-curve_c
diff -N graphics/rawstudio/patches/patch-src_rs-curve_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ graphics/rawstudio/patches/patch-src_rs-curve_c	15 Dec 2025 12:53:30 -0000
@@ -0,0 +1,11 @@
+Index: src/rs-curve.c
+--- src/rs-curve.c.orig
++++ src/rs-curve.c
+@@ -20,6 +20,7 @@
+ 
+ #include <math.h>
+ #include <libxml/encoding.h>
++#include <libxml/parser.h>
+ #include <libxml/xmlwriter.h>
+ #include <string.h> /* memset() */
+ #include "color.h"
Index: graphics/rawstudio/patches/patch-src_rs-metadata_c
===================================================================
RCS file: graphics/rawstudio/patches/patch-src_rs-metadata_c
diff -N graphics/rawstudio/patches/patch-src_rs-metadata_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ graphics/rawstudio/patches/patch-src_rs-metadata_c	15 Dec 2025 12:53:30 -0000
@@ -0,0 +1,11 @@
+Index: src/rs-metadata.c
+--- src/rs-metadata.c.orig
++++ src/rs-metadata.c
+@@ -20,6 +20,7 @@
+ #include <glib/gstdio.h> /* g_unlink() */
+ #include <config.h>
+ #include <libxml/encoding.h>
++#include <libxml/parser.h>
+ #include <libxml/xmlwriter.h>
+ #include "gettext.h"
+ #include "rs-metadata.h"
Index: graphics/rawstudio/patches/patch-src_rs-store_c
===================================================================
RCS file: graphics/rawstudio/patches/patch-src_rs-store_c
diff -N graphics/rawstudio/patches/patch-src_rs-store_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ graphics/rawstudio/patches/patch-src_rs-store_c	15 Dec 2025 12:53:30 -0000
@@ -0,0 +1,11 @@
+Index: src/rs-store.c
+--- src/rs-store.c.orig
++++ src/rs-store.c
+@@ -21,6 +21,7 @@
+ #include <glib/gprintf.h>
+ #include <config.h>
+ #include <libxml/encoding.h>
++#include <libxml/parser.h>
+ #include <libxml/xmlwriter.h>
+ #include <glib.h>
+ #include "rawstudio.h"
Index: graphics/zxing-cpp/Makefile
===================================================================
RCS file: /cvs/ports/graphics/zxing-cpp/Makefile,v
diff -u -p -r1.5 Makefile
--- graphics/zxing-cpp/Makefile	11 Jul 2025 15:25:26 -0000	1.5
+++ graphics/zxing-cpp/Makefile	16 Dec 2025 15:59:06 -0000
@@ -4,7 +4,7 @@ GH_ACCOUNT=	zxing-cpp
 GH_PROJECT=	zxing-cpp
 # 2.3.0 depends on a newer libcxx
 GH_TAGNAME=	v2.2.1
-REVISION=	0
+REVISION=	1
 
 SHARED_LIBS +=  ZXing                     2.0 # 0.0
 
Index: graphics/zxing-cpp/patches/patch-core_src_Utf_cpp
===================================================================
RCS file: /cvs/ports/graphics/zxing-cpp/patches/patch-core_src_Utf_cpp,v
diff -u -p -r1.1 patch-core_src_Utf_cpp
--- graphics/zxing-cpp/patches/patch-core_src_Utf_cpp	11 Jul 2025 15:25:26 -0000	1.1
+++ graphics/zxing-cpp/patches/patch-core_src_Utf_cpp	15 Dec 2025 12:53:30 -0000
@@ -6,7 +6,15 @@ instantiation for other types will fail.
 Index: core/src/Utf.cpp
 --- core/src/Utf.cpp.orig
 +++ core/src/Utf.cpp
-@@ -20,7 +20,7 @@ namespace ZXing {
+@@ -13,6 +13,7 @@
+ #include <iomanip>
+ #include <cstdint>
+ #include <sstream>
++#include <vector>
+ 
+ namespace ZXing {
+ 
+@@ -20,7 +21,7 @@ namespace ZXing {
  #if __cplusplus <= 201703L
  using char8_t = uint8_t;
  #endif
@@ -15,7 +23,7 @@ Index: core/src/Utf.cpp
  
  using state_t = uint8_t;
  constexpr state_t kAccepted = 0;
-@@ -118,7 +118,8 @@ static void AppendFromUtf8(utf8_t utf8, std::wstring& 
+@@ -118,7 +119,8 @@ static void AppendFromUtf8(utf8_t utf8, std::wstring& 
  std::wstring FromUtf8(std::string_view utf8)
  {
  	std::wstring str;
Index: math/lean/Makefile
===================================================================
RCS file: /cvs/ports/math/lean/Makefile,v
diff -u -p -r1.8 Makefile
--- math/lean/Makefile	29 Jan 2025 11:34:37 -0000	1.8
+++ math/lean/Makefile	16 Dec 2025 15:59:23 -0000
@@ -3,7 +3,7 @@ COMMENT =		interactive and automated the
 GH_ACCOUNT =		leanprover-community
 GH_PROJECT =		lean
 GH_TAGNAME =		v3.48.0
-REVISION =		1
+REVISION =		2
 
 CATEGORIES =		math lang
 
Index: math/lean/patches/patch-src_shell_lean_js_cpp
===================================================================
RCS file: math/lean/patches/patch-src_shell_lean_js_cpp
diff -N math/lean/patches/patch-src_shell_lean_js_cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ math/lean/patches/patch-src_shell_lean_js_cpp	15 Dec 2025 12:53:30 -0000
@@ -0,0 +1,11 @@
+Index: src/shell/lean_js.cpp
+--- src/shell/lean_js.cpp.orig
++++ src/shell/lean_js.cpp
+@@ -5,6 +5,7 @@ Released under Apache 2.0 license as described in the 
+ Author: Leonardo de Moura
+ */
+ #include <string>
++#include <cstdint>
+ #include "library/module_mgr.h"
+ #include "library/st_task_queue.h"
+ #include "library/module.h"
Index: math/lean/patches/patch-src_shell_lean_js_h
===================================================================
RCS file: math/lean/patches/patch-src_shell_lean_js_h
diff -N math/lean/patches/patch-src_shell_lean_js_h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ math/lean/patches/patch-src_shell_lean_js_h	15 Dec 2025 12:53:30 -0000
@@ -0,0 +1,11 @@
+Index: src/shell/lean_js.h
+--- src/shell/lean_js.h.orig
++++ src/shell/lean_js.h
+@@ -6,6 +6,7 @@ Author: Leonardo de Moura
+ */
+ #pragma once
+ #include <string>
++#include <cstdint>
+ void initialize_emscripten();
+ void finalize_emscripten();
+ int emscripten_process_request(uintptr_t msg);
Index: sysutils/grive2/Makefile
===================================================================
RCS file: /cvs/ports/sysutils/grive2/Makefile,v
diff -u -p -r1.14 Makefile
--- sysutils/grive2/Makefile	25 Jul 2025 11:21:37 -0000	1.14
+++ sysutils/grive2/Makefile	16 Dec 2025 15:59:46 -0000
@@ -5,7 +5,7 @@ GH_PROJECT =	grive2
 GH_COMMIT =	548ea362f319cd1f7fcbad0344fde8449fa14255
 
 DISTNAME =	grive2-0.5.1
-REVISION =	0
+REVISION =	1
 
 CATEGORIES =	sysutils
 
Index: sysutils/grive2/patches/patch-libgrive_src_base_Syncer_hh
===================================================================
RCS file: sysutils/grive2/patches/patch-libgrive_src_base_Syncer_hh
diff -N sysutils/grive2/patches/patch-libgrive_src_base_Syncer_hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ sysutils/grive2/patches/patch-libgrive_src_base_Syncer_hh	15 Dec 2025 12:53:37 -0000
@@ -0,0 +1,14 @@
+Syncer.hh:58:22: error: 'unique_ptr' in namespace 'std' does not name
+a template type
+
+Index: libgrive/src/base/Syncer.hh
+--- libgrive/src/base/Syncer.hh.orig
++++ libgrive/src/base/Syncer.hh
+@@ -21,6 +21,7 @@
+ 
+ #include "util/FileSystem.hh"
+ 
++#include <memory>
+ #include <string>
+ #include <vector>
+ #include <iosfwd>