guix_mirror_bot pushed a commit to branch kde-team
in repository guix.

commit 8ae83e66557df9172276685f902e4e5b41909c7e
Author: Sughosha <[email protected]>
AuthorDate: Mon Jun 8 16:49:14 2026 +0530

    gnu: eigen: Update to 5.0.1.
    
    * gnu/packages/algebra.scm (eigen): Update to 5.0.1.
    [source]: Realign.
    {patches}: Remove field.
    <snippet>: Remove trailing #t.
    [arguments]: Switch to gexp.
    * gnu/packages/patches/eigen-fix-strict-aliasing-bug.patch: Remove file.
    * gnu/local.mk: Deregister it.
    
    Change-Id: I3dd8694fa722d9be9b3b53c4c6c726ad5a39d328
---
 gnu/local.mk                                       |   1 -
 gnu/packages/algebra.scm                           | 133 ++++++++++-----------
 .../patches/eigen-fix-strict-aliasing-bug.patch    |  73 -----------
 3 files changed, 64 insertions(+), 143 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 00382d453d..4899ca7fa8 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1231,7 +1231,6 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/efitools-riscv64-support.patch          \
   %D%/packages/patches/efivar-fix-fprint-format.patch          \
   %D%/packages/patches/elastix-1404.patch                      \
-  %D%/packages/patches/eigen-fix-strict-aliasing-bug.patch     \
   %D%/packages/patches/einstein-build.patch                    \
   %D%/packages/patches/elfutils-tests-ptrace.patch             \
   %D%/packages/patches/elixir-httpoison-tag-network-dependent-test-cases.patch 
                \
diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index 31382a6ae4..ac5dc116d2 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -22,6 +22,7 @@
 ;;; Copyright © 2025 Skylar Hill <[email protected]>
 ;;; Copyright © 2025 Janneke Nieuwenhuizen <[email protected]>
 ;;; Copyright © 2025 Andy Tai <[email protected]>
+;;; Copyright © 2026 Sughosha <[email protected]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1291,76 +1292,71 @@ Python.")
 (define-public eigen
   (package
     (name "eigen")
-    (version "3.4.0")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://gitlab.com/libeigen/eigen.git";)
-                    (commit version)))
-              (sha256
-               (base32
-                "0k1c4qnymwwvm68rv6s0cyk08xbw65ixvwqccsh36c2axcqk3znp"))
-              (file-name (git-file-name name version))
-              (patches (search-patches "eigen-fix-strict-aliasing-bug.patch"))
-              (modules '((guix build utils)))
-              (snippet
-               ;; There are 3 test failures in the "unsupported" directory,
-               ;; but maintainers say it's a known issue and it's unsupported
-               ;; anyway, so just skip them.
-               '(begin
-                  (substitute* "unsupported/CMakeLists.txt"
-                    (("add_subdirectory\\(test.*")
-                     "# Do not build the tests for unsupported features.\n"))
-                  #t))))
+    (version "5.0.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://gitlab.com/libeigen/eigen.git";)
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1aksb7jmxxhp45q8aa3z483cvz3nl52nsn7fka4hbnpd8lqvadgi"))
+       (modules '((guix build utils)))
+       (snippet
+        ;; There are 3 test failures in the "unsupported" directory, but 
maintainers
+        ;; say it's a known issue and it's unsupported anyway, so just skip 
them.
+        '(begin
+           (substitute* "unsupported/CMakeLists.txt"
+             (("add_subdirectory\\(test.*")
+              "# Do not build the tests for unsupported features.\n"))))))
     (build-system cmake-build-system)
     (arguments
-     `(;; Turn off debugging symbols to save space.
-       #:build-type "Release"
-
-       #:modules ((ice-9 match)
-                  (guix build utils)
-                  (guix build cmake-build-system))
-
-       #:phases
-       (modify-phases %standard-phases
-                  (add-after 'unpack 'disable-some-tests
-                    ;; Not all platforms are well supported by the test suite.
-                    (lambda _
-                      ,@(match (%current-system)
-                          ("i686-linux"
-                           `((substitute* "test/CMakeLists.txt"
-                               ((".*packetmath.*") ""))))
-                          ("aarch64-linux"
-                           `((substitute* "test/CMakeLists.txt"
-                               ((".*array_cwise.*") "")
-                               ((".*vectorization_logic.*") ""))))
-                          ("armhf-linux"
-                           `((substitute* "test/CMakeLists.txt"
-                               ((".*geo_quaternion.*") "")
-                               ((".*jacobisvd.*") "")
-                               ((".*packetmath.*") "")
-                               ((".*prec_inverse.*") "")
-                               ((".*qr_colpivoting.*") "")
-                               ((".*vectorization_logic.*") ""))))
-                          ("riscv64-linux"
-                           `((substitute* "test/CMakeLists.txt"
-                               ((".*array_cwise.*") "")
-                               ((".*geo_quaternion.*") ""))))
-                          (_
-                            '((display "No tests to disable on this 
architecture.\n"))))))
-                  (replace 'check
-                    (lambda* (#:key tests? #:allow-other-keys)
-                      (let* ((cores  (parallel-job-count))
-                             (dash-j (format #f "-j~a" cores)))
-                        (when tests?
-                          (setenv "EIGEN_SEED" "1") ;for reproducibility
-                          ;; First build the tests, in parallel.  See
-                          ;; 
<http://eigen.tuxfamily.org/index.php?title=Tests>.
-                          (invoke "make" "buildtests" dash-j)
-
-                          ;; Then run 'CTest' with -V so we get more
-                          ;; details upon failure.
-                          (invoke "ctest" "-V" dash-j))))))))
+     (list
+      ;; Turn off debugging symbols to save space.
+      #:build-type "Release"
+      #:modules '((guix build utils)
+                  (guix build cmake-build-system)
+                  (ice-9 match))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'disable-some-tests
+            ;; Not all platforms are well supported by the test suite.
+            (lambda _
+              (match #$(%current-system)
+                ("i686-linux"
+                 `((substitute* "test/CMakeLists.txt"
+                     ((".*packetmath.*") ""))))
+                ("aarch64-linux"
+                 `((substitute* "test/CMakeLists.txt"
+                     ((".*array_cwise.*") "")
+                     ((".*vectorization_logic.*") ""))))
+                ("armhf-linux"
+                 `((substitute* "test/CMakeLists.txt"
+                     ((".*geo_quaternion.*") "")
+                     ((".*jacobisvd.*") "")
+                     ((".*packetmath.*") "")
+                     ((".*prec_inverse.*") "")
+                     ((".*qr_colpivoting.*") "")
+                     ((".*vectorization_logic.*") ""))))
+                ("riscv64-linux"
+                 `((substitute* "test/CMakeLists.txt"
+                     ((".*array_cwise.*") "")
+                     ((".*geo_quaternion.*") ""))))
+                (_
+                 '((display "No tests to disable on this architecture.\n"))))))
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (let* ((cores  (parallel-job-count))
+                     (dash-j (format #f "-j~a" cores)))
+                (when tests?
+                  (setenv "EIGEN_SEED" "1") ;for reproducibility
+                  ;; First build the tests, in parallel.  See
+                  ;; <http://eigen.tuxfamily.org/index.php?title=Tests>.
+                  (invoke "make" "buildtests" dash-j)
+                  ;; Then run 'CTest' with -V so we get more
+                  ;; details upon failure.
+                  (invoke "ctest" "-V" dash-j))))))))
     (home-page "https://eigen.tuxfamily.org/index.php?title=Main_Page";)
     (synopsis "C++ template library for linear algebra")
     (description
@@ -1369,7 +1365,6 @@ numerical solvers, and related algorithms.  It provides 
an elegant API based
 on \"expression templates\".  It is versatile: it supports all matrix sizes,
 all standard numeric types, various matrix decompositions and geometry
 features, and more.")
-
     ;; Most of the code is MPLv2, with a few files under LGPLv2.1+ or BSD-3.
     ;; See 'COPYING.README' for details.
     (license license:mpl2.0)))
diff --git a/gnu/packages/patches/eigen-fix-strict-aliasing-bug.patch 
b/gnu/packages/patches/eigen-fix-strict-aliasing-bug.patch
deleted file mode 100644
index 139d633c44..0000000000
--- a/gnu/packages/patches/eigen-fix-strict-aliasing-bug.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From f046e326d9e30772725d8fb26dc33328e418d9d3 Mon Sep 17 00:00:00 2001
-From: Antonio Sanchez <[email protected]>
-Date: Fri, 17 Sep 2021 12:49:01 -0700
-Subject: [PATCH] Fix strict aliasing bug causing product_small failure.
-
-Packet loading is skipped due to aliasing violation, leading to nullopt matrix
-multiplication.
-
-Fixes #2327.
-
-
-(cherry picked from commit 3c724c44cff3f9e2e9e35351abff0b5c022b320d)
----
- Eigen/src/Core/arch/AVX/Complex.h    |  4 +++-
- Eigen/src/Core/arch/AVX512/Complex.h |  4 +++-
- Eigen/src/Core/arch/SSE/Complex.h    | 11 +++--------
- 3 files changed, 9 insertions(+), 10 deletions(-)
-
-diff --git a/Eigen/src/Core/arch/AVX/Complex.h 
b/Eigen/src/Core/arch/AVX/Complex.h
-index ab7bd6c65..e9096c0a1 100644
---- a/Eigen/src/Core/arch/AVX/Complex.h
-+++ b/Eigen/src/Core/arch/AVX/Complex.h
-@@ -99,7 +99,9 @@ template<> EIGEN_STRONG_INLINE Packet4cf 
ploadu<Packet4cf>(const std::complex<fl
- 
- template<> EIGEN_STRONG_INLINE Packet4cf pset1<Packet4cf>(const 
std::complex<float>& from)
- {
--  return Packet4cf(_mm256_castpd_ps(_mm256_broadcast_sd((const double*)(const 
void*)&from)));
-+  const float re = std::real(from);
-+  const float im = std::imag(from);
-+  return Packet4cf(_mm256_set_ps(im, re, im, re, im, re, im, re));
- }
- 
- template<> EIGEN_STRONG_INLINE Packet4cf ploaddup<Packet4cf>(const 
std::complex<float>* from)
-diff --git a/Eigen/src/Core/arch/AVX512/Complex.h 
b/Eigen/src/Core/arch/AVX512/Complex.h
-index 49c72b3f1..074253859 100644
---- a/Eigen/src/Core/arch/AVX512/Complex.h
-+++ b/Eigen/src/Core/arch/AVX512/Complex.h
-@@ -97,7 +97,9 @@ template<> EIGEN_STRONG_INLINE Packet8cf 
ploadu<Packet8cf>(const std::complex<fl
- 
- template<> EIGEN_STRONG_INLINE Packet8cf pset1<Packet8cf>(const 
std::complex<float>& from)
- {
--  return Packet8cf(_mm512_castpd_ps(pload1<Packet8d>((const double*)(const 
void*)&from)));
-+  const float re = std::real(from);
-+  const float im = std::imag(from);
-+  return Packet8cf(_mm512_set_ps(im, re, im, re, im, re, im, re, im, re, im, 
re, im, re, im, re));
- }
- 
- template<> EIGEN_STRONG_INLINE Packet8cf ploaddup<Packet8cf>(const 
std::complex<float>* from)
-diff --git a/Eigen/src/Core/arch/SSE/Complex.h 
b/Eigen/src/Core/arch/SSE/Complex.h
-index 8fe22da46..215bfd7bb 100644
---- a/Eigen/src/Core/arch/SSE/Complex.h
-+++ b/Eigen/src/Core/arch/SSE/Complex.h
-@@ -106,14 +106,9 @@ template<> EIGEN_STRONG_INLINE Packet2cf 
ploadu<Packet2cf>(const std::complex<fl
- 
- template<> EIGEN_STRONG_INLINE Packet2cf pset1<Packet2cf>(const 
std::complex<float>&  from)
- {
--  Packet2cf res;
--#ifdef EIGEN_VECTORIZE_SSE3
--  res.v = _mm_castpd_ps(_mm_loaddup_pd(reinterpret_cast<double 
const*>(&from)));
--#else
--  res.v = _mm_castpd_ps(_mm_load_sd(reinterpret_cast<double const*>(&from)));
--  res.v = _mm_movelh_ps(res.v, res.v);
--#endif
--  return res;
-+  const float re = std::real(from);
-+  const float im = std::imag(from);
-+  return Packet2cf(_mm_set_ps(im, re, im, re));
- }
- 
- template<> EIGEN_STRONG_INLINE Packet2cf ploaddup<Packet2cf>(const 
std::complex<float>* from) { return pset1<Packet2cf>(*from); }
--- 
-2.37.0
-

Reply via email to