[packages/eigen3] Rel 2

arekm arekm at pld-linux.org
Sun Sep 20 21:59:07 CEST 2026


commit 2dafa16396f80e51bc8b88fa38aedf4300c16700
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sun Sep 20 21:58:20 2026 +0200

    Rel 2

 eigen3-cxx20-this-capture.patch | 44 +++++++++++++++++++++++++++++++++++++++++
 eigen3.spec                     |  4 +++-
 2 files changed, 47 insertions(+), 1 deletion(-)
---
diff --git a/eigen3.spec b/eigen3.spec
index 6ff57ef..c6c9b7a 100644
--- a/eigen3.spec
+++ b/eigen3.spec
@@ -7,12 +7,13 @@ Summary:	C++ template library for linear algebra
 Summary(pl.UTF-8):	Biblioteka szablonów C++ do algebry liniowej
 Name:		eigen3
 Version:	3.4.1
-Release:	1
+Release:	2
 License:	MPL v2.0 with LGPL v2.1+ parts
 Group:		Development/Libraries
 #Source0Download: https://libeigen.gitlab.io/
 Source0:	https://gitlab.com/libeigen/eigen/-/archive/%{version}/eigen-%{version}.tar.bz2
 # Source0-md5:	e066eafde28de575ed6530a5ecb06462
+Patch0:		%{name}-cxx20-this-capture.patch
 URL:		https://libeigen.gitlab.io/
 BuildRequires:	cmake >= 3.10.0
 %{?with_gdb:BuildRequires:	python3-modules >= 1:3.2}
@@ -86,6 +87,7 @@ do pliku ~/.gdbinit .
 
 %prep
 %setup -q -n eigen-%{version}
+%patch -P0 -p1
 
 %build
 install -d build
diff --git a/eigen3-cxx20-this-capture.patch b/eigen3-cxx20-this-capture.patch
new file mode 100644
index 0000000..a7ee8e3
--- /dev/null
+++ b/eigen3-cxx20-this-capture.patch
@@ -0,0 +1,44 @@
+Member-function lambdas capturing this implicitly through [=] are deprecated in
+C++20 and fail consumers building with -Werror=deprecated (onnxruntime). Upstream
+3.4 branch past 3.4.1 already spells the captures out; same change, minimal form.
+
+--- eigen-3.4.1/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h.orig	2025-09-30 01:25:14.000000000 +0200
++++ eigen-3.4.1/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h	2026-09-20 21:57:10.394768287 +0200
+@@ -1006,7 +1006,7 @@
+       } else {
+         eigen_assert(!use_thread_local);
+         device_.enqueueNoNotification(
+-            [=]() { kernel(m, n, k, use_thread_local); });
++            [this, m, n, k, use_thread_local]() { kernel(m, n, k, use_thread_local); });
+       }
+     }
+ 
+@@ -1060,7 +1060,7 @@
+         while (end - start > 1) {
+           Index mid = (start + end) / 2;
+           device_.enqueueNoNotification(
+-              [=]() { enqueue_packing_helper(mid, end, k, rhs); });
++              [this, mid, end, k, rhs]() { enqueue_packing_helper(mid, end, k, rhs); });
+           end = mid;
+         }
+ 
+@@ -1079,7 +1079,7 @@
+ 
+         if (pack_async) {
+           device_.enqueueNoNotification(
+-              [=]() { enqueue_packing_helper(start, end, k, rhs); });
++              [this, start, end, k, rhs]() { enqueue_packing_helper(start, end, k, rhs); });
+         } else {
+           enqueue_packing_helper(start, end, k, rhs);
+         }
+--- eigen-3.4.1/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceThreadPool.h.orig	2025-09-30 01:25:14.000000000 +0200
++++ eigen-3.4.1/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceThreadPool.h	2026-09-20 21:57:10.395388483 +0200
+@@ -207,7 +207,7 @@
+     // block_count leaves that do actual computations.
+     Barrier barrier(static_cast<unsigned int>(block.count));
+     std::function<void(Index, Index)> handleRange;
+-    handleRange = [=, &handleRange, &barrier, &f](Index firstIdx,
++    handleRange = [this, block, &handleRange, &barrier, &f](Index firstIdx,
+                                                   Index lastIdx) {
+       while (lastIdx - firstIdx > block.size) {
+         // Split into halves and schedule the second half on a different thread.
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/eigen3.git/commitdiff/2dafa16396f80e51bc8b88fa38aedf4300c16700



More information about the pld-cvs-commit mailing list