public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Nicolas Chauvet <kwizart@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/opencv] opencv5: Fix build with Eigen3 > 3
Date: Fri, 28 Aug 2026 13:33:15 GMT	[thread overview]
Message-ID: <178792399586.1.15981227901806026808.rpms-opencv-781cdc0ccbe2@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/opencv
Branch : opencv5
Commit : 781cdc0ccbe28826f9c9b0a77542e8c28f441b36
Author : Nicolas Chauvet <kwizart@gmail.com>
Date   : 2025-12-10T15:13:00+01:00
Stats  : +59/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/opencv/c/781cdc0ccbe28826f9c9b0a77542e8c28f441b36?branch=opencv5

Log:
Fix build with Eigen3 > 3

---
diff --git a/27536.patch b/27536.patch
new file mode 100644
index 0000000..0b7a4ce
--- /dev/null
+++ b/27536.patch
@@ -0,0 +1,57 @@
+From 353b4ddf52db48ba85d2efaa33310afa0eb73a72 Mon Sep 17 00:00:00 2001
+From: Kumataro <Kumataro@users.noreply.github.com>
+Date: Sun, 13 Jul 2025 08:11:06 +0900
+Subject: [PATCH 1/2] eigen: fix to get version from eigen master branch
+
+---
+ cmake/OpenCVFindLibsPerf.cmake | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/cmake/OpenCVFindLibsPerf.cmake b/cmake/OpenCVFindLibsPerf.cmake
+index dfc94597bbba..55a08f72d00d 100644
+--- a/cmake/OpenCVFindLibsPerf.cmake
++++ b/cmake/OpenCVFindLibsPerf.cmake
+@@ -84,6 +84,12 @@ if(WITH_EIGEN AND NOT HAVE_EIGEN)
+         set(EIGEN_WORLD_VERSION ${EIGEN3_WORLD_VERSION})
+         set(EIGEN_MAJOR_VERSION ${EIGEN3_MAJOR_VERSION})
+         set(EIGEN_MINOR_VERSION ${EIGEN3_MINOR_VERSION})
++      elseif(DEFINED Eigen3_VERSION_MAJOR)
++        # see https://github.com/opencv/opencv/issues/27530
++        # Case sensitive is needed to support Eigen on Master branch at 13 July,2025.
++        set(EIGEN_WORLD_VERSION ${Eigen3_VERSION_MAJOR})
++        set(EIGEN_MAJOR_VERSION ${Eigen3_VERSION_MINOR})
++        set(EIGEN_MINOR_VERSION ${Eigen3_VERSION_PATCH})
+       else()  # Eigen config file
+         set(EIGEN_WORLD_VERSION ${EIGEN3_VERSION_MAJOR})
+         set(EIGEN_MAJOR_VERSION ${EIGEN3_VERSION_MINOR})
+
+From 94e909d4a6811bbd4774baae8722df79d057a2bc Mon Sep 17 00:00:00 2001
+From: Kumataro <Kumataro@users.noreply.github.com>
+Date: Mon, 14 Jul 2025 21:25:52 +0900
+Subject: [PATCH 2/2] add pointer to Eigen commit
+
+---
+ cmake/OpenCVFindLibsPerf.cmake | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/cmake/OpenCVFindLibsPerf.cmake b/cmake/OpenCVFindLibsPerf.cmake
+index 55a08f72d00d..861a39c47f9b 100644
+--- a/cmake/OpenCVFindLibsPerf.cmake
++++ b/cmake/OpenCVFindLibsPerf.cmake
+@@ -84,13 +84,13 @@ if(WITH_EIGEN AND NOT HAVE_EIGEN)
+         set(EIGEN_WORLD_VERSION ${EIGEN3_WORLD_VERSION})
+         set(EIGEN_MAJOR_VERSION ${EIGEN3_MAJOR_VERSION})
+         set(EIGEN_MINOR_VERSION ${EIGEN3_MINOR_VERSION})
+-      elseif(DEFINED Eigen3_VERSION_MAJOR)
++      elseif(DEFINED Eigen3_VERSION_MAJOR) # Recommended package config variables
+         # see https://github.com/opencv/opencv/issues/27530
+-        # Case sensitive is needed to support Eigen on Master branch at 13 July,2025.
+         set(EIGEN_WORLD_VERSION ${Eigen3_VERSION_MAJOR})
+         set(EIGEN_MAJOR_VERSION ${Eigen3_VERSION_MINOR})
+         set(EIGEN_MINOR_VERSION ${Eigen3_VERSION_PATCH})
+-      else()  # Eigen config file
++      else()  # Deprecated package config variables
++        # Removed on master at https://gitlab.com/libeigen/eigen/-/commit/f2984cd0778dd0a1d7e74216d826eaff2bc6bfab
+         set(EIGEN_WORLD_VERSION ${EIGEN3_VERSION_MAJOR})
+         set(EIGEN_MAJOR_VERSION ${EIGEN3_VERSION_MINOR})
+         set(EIGEN_MINOR_VERSION ${EIGEN3_VERSION_PATCH})

diff --git a/opencv.spec b/opencv.spec
index 9dcc9cc..eec89b8 100644
--- a/opencv.spec
+++ b/opencv.spec
@@ -107,6 +107,8 @@ Patch3:         opencv.python.patch
 Patch16:        qt69.patch
 # Fix build with FFmpeg 8
 Patch17:        https://github.com/opencv/opencv/pull/27691.patch
+# Fix detect Eigen3 > 3
+Patch18:        https://github.com/opencv/opencv/pull/27536.patch
 
 
 BuildRequires:  gcc-c++

                 reply	other threads:[~2026-08-28 13:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178792399586.1.15981227901806026808.rpms-opencv-781cdc0ccbe2@fedoraproject.org \
    --to=kwizart@gmail.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox