<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>510760</bug_id>
          
          <creation_ts>2025-10-18 17:51:13 +0000</creation_ts>
          <short_desc>Could NOT find Eigen3 5.0.0</short_desc>
          <delta_ts>2025-12-25 10:53:58 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>digikam</product>
          <component>Plugin-Editor-Sharpen</component>
          <version>8.8.0</version>
          <rep_platform>Fedora RPMs</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="nucleo">nucleo</reporter>
          <assigned_to name="Digikam Developers">digikam-bugs-null</assigned_to>
          <cc>caulier.gilles</cc>
    
    <cc>grzybr1</cc>
    
    <cc>metzpinguin</cc>
          
          <cf_commitlink>https://invent.kde.org/graphics/digikam/-/commit/e7d4be62f8a523cf9a07fa7af39f439df3d93ea5</cf_commitlink>
          <cf_versionfixedin>9.0.0</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2462949</commentid>
    <comment_count>0</comment_count>
    <who name="nucleo">nucleo</who>
    <bug_when>2025-10-18 17:51:13 +0000</bug_when>
    <thetext>SUMMARY
Eigen3 5.0.0 could not be found 

STEPS TO REPRODUCE
1.  Try to compile with eigen3 5.0.0
2. 
3. 

OBSERVED RESULT
-- Eigen3 version .. found in /usr/include/eigen3, but at least version 2.91.0 is required
-- Could NOT find Eigen3 (missing: EIGEN3_VERSION_OK) (Required is at least version &quot;2.91.0&quot;)
--  libeigen3 found.......................... NO  (optional)
--  digiKam will be compiled without Refocus tool support.
--  Please install the libeigen3 (version &gt;= 3.0.0) development package.


EXPECTED RESULT
-- Found Eigen3: /usr/include/eigen3 (Required is at least version &quot;2.91.0&quot;)

SOFTWARE/OS VERSIONS
Fedora 44</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2462969</commentid>
    <comment_count>1</comment_count>
    <who name="Maik Qualmann">metzpinguin</who>
    <bug_when>2025-10-18 19:23:52 +0000</bug_when>
    <thetext>Eigen 5.0.0, released on October 9, 2025, may not yet be compatible with digiKam. Use Eigen 3.4.x.

Maik</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2462978</commentid>
    <comment_count>2</comment_count>
    <who name="Antonio Rojas">arojas</who>
    <bug_when>2025-10-18 19:54:13 +0000</bug_when>
    <thetext>DigiKam finds Eigen 5 and builds just fine if using Eigen&apos;s upstream cmake config, but DigiKam&apos;s own FindEigen module (which is not compatible with Eigen 5) gets in the way.

Just rm core/cmake/modules/FindEigen3.cmake and pass -DEIGEN3_INCLUDE_DIR=/usr/include/eigen3 to cmake as a workaround</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2473685</commentid>
    <comment_count>3</comment_count>
    <who name="Robert">grzybr1</who>
    <bug_when>2025-11-30 16:21:45 +0000</bug_when>
    <thetext>Currently, Digikam&apos;s `../core/cmake/modules/FindEigen3.cmake` has a macro defined ( `_eigen3_check_version` ) which rely on being able to find the following defines:
```
#define EIGEN_WORLD_VERSION 3
#define EIGEN_MAJOR_VERSION 4
#define EIGEN_MINOR_VERSION 1
```
by looking for them in a file from Eigen  project called `../core/cmake/modules/FindEigen3.cmake`.
This used to work for Eigen versions up to and including version 3.4.1.

Starting with version 5 the Eigen project did the sensible thing and adopted semantic versioning, while at same time moving the definitions to a different file `Eigen/Version`:
```
#ifndef EIGEN_VERSION_H
#define EIGEN_VERSION_H

// The &quot;WORLD&quot; version will forever remain &quot;3&quot; for the &quot;Eigen3&quot; library.
#define EIGEN_WORLD_VERSION 3
// As of Eigen3 5.0.0, we have moved to Semantic Versioning (semver.org).
#define EIGEN_MAJOR_VERSION 5
#define EIGEN_MINOR_VERSION 0
#define EIGEN_PATCH_VERSION 1
#define EIGEN_PRERELEASE_VERSION &quot;dev&quot;
#define EIGEN_BUILD_VERSION &quot;master&quot;
#define EIGEN_VERSION_STRING &quot;5.0.1-dev+master&quot;

#endif  // EIGEN_VERSION_H
```

The cmake find module should be amended to parse the definitions from the new file (and possibly as a fallback from the previous file).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2473687</commentid>
    <comment_count>4</comment_count>
    <who name="Robert">grzybr1</who>
    <bug_when>2025-11-30 16:32:09 +0000</bug_when>
    <thetext>Correction:

&gt; Currently, Digikam&apos;s `../core/cmake/modules/FindEigen3.cmake` has a macro defined ( `_eigen3_check_version` ) which rely on being able to find the following defines:
&gt; ...
&gt; by looking for them in a file from Eigen  project called `../core/cmake/modules/FindEigen3.cmake`.
&gt; This used to work for Eigen versions up to and including version 3.4.1.

The above should read:

by looking for them in a file from Eigen  project called `../Eigen/src/Core/util/Macros.h`.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2473688</commentid>
    <comment_count>5</comment_count>
    <who name="Antonio Rojas">arojas</who>
    <bug_when>2025-11-30 16:34:30 +0000</bug_when>
    <thetext>Again, the cmake module should just be removed in favor of the upstream one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2473691</commentid>
    <comment_count>6</comment_count>
    <who name="Robert">grzybr1</who>
    <bug_when>2025-11-30 16:48:45 +0000</bug_when>
    <thetext>On 30/11/2025 16:34, Antonio Rojas wrote:
&gt; https://bugs.kde.org/show_bug.cgi?id=510760
&gt;
&gt; --- Comment #5 from Antonio Rojas &lt;arojas@archlinux.org&gt; ---
&gt; Again, the cmake module should just be removed in favor of the upstream one.

Agree, this would be the most appropriate solution ...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2473792</commentid>
    <comment_count>7</comment_count>
    <who name="">caulier.gilles</who>
    <bug_when>2025-12-01 06:56:03 +0000</bug_when>
    <thetext>As i can see here on my Kubuntu 24.04 LTS, the Eigen3 version 3.5.0 is already ported to Cmake and configuration are shared on the system. This want mean that we can drop the findeigen3.cmake script at all and set the minimum dependency to 3.5.0

Note: on the gihub mirror, Eigen3 version 3.2.0 is already ported to cmake, but i don&apos;t know if cmake configuration have been already shared on the system.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2473795</commentid>
    <comment_count>8</comment_count>
    <who name="">caulier.gilles</who>
    <bug_when>2025-12-01 07:10:38 +0000</bug_when>
    <thetext>Git commit e7d4be62f8a523cf9a07fa7af39f439df3d93ea5 by Gilles Caulier.
Committed on 01/12/2025 at 07:09.
Pushed by cgilles into branch &apos;master&apos;.

Use Eigen3 cmake configuration shared on the system.
FIXED-IN: 8.9.0

M  +2    -2    NEWS
M  +1    -1    core/app/utils/digikam_config.h.cmake.in
D  +0    -83   core/cmake/modules/FindEigen3.cmake

https://invent.kde.org/graphics/digikam/-/commit/e7d4be62f8a523cf9a07fa7af39f439df3d93ea5</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2473797</commentid>
    <comment_count>9</comment_count>
    <who name="Antonio Rojas">arojas</who>
    <bug_when>2025-12-01 07:48:39 +0000</bug_when>
    <thetext>Note that this is not ennogh to build with eigen 5.x, since the EIGEN3_INCLUDE_DIRS variable is removed in that version. See https://invent.kde.org/graphics/digikam/-/merge_requests/377</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2475692</commentid>
    <comment_count>10</comment_count>
    <who name="Robert">grzybr1</who>
    <bug_when>2025-12-09 23:18:14 +0000</bug_when>
    <thetext>Thank you for fixing this, as of today the flatpack version is built with Eigen 5.0.1 and the Refocus tool is working again:
```
          ID: org.kde.digikam
         Ref: app/org.kde.digikam/x86_64/stable
        Arch: x86_64
      Branch: stable
     Version: 8.8.0
     License: GPL-2.0+
      Origin: flathub
  Collection: org.flathub.Stable
Installation: system
   Installed: 670.3 MB
     Runtime: org.kde.Platform/x86_64/6.10
         Sdk: org.kde.Sdk/x86_64/6.10

      Commit: 42b2eb64a4297b01f45e7bc085a70889b1129ed10757eb474e3b3d56f8f3d41d
      Parent: 8fd5c75ba795d5b69c6917e8973aa28274609ab2779c381ed4e618817c285ef0
     Subject: Merge pull request #277 from flathub/fix-eigen3 (2fe609cb1e1f)
        Date: 2025-12-09 16:06:12 +0000
```</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>