| Summary: | Could NOT find Eigen3 5.0.0 | ||
|---|---|---|---|
| Product: | [Applications] digikam | Reporter: | nucleo <nucleo> |
| Component: | Plugin-Editor-Sharpen | Assignee: | Digikam Developers <digikam-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | caulier.gilles, grzybr1, metzpinguin |
| Priority: | NOR | ||
| Version First Reported In: | 8.8.0 | ||
| Target Milestone: | --- | ||
| Platform: | Fedora RPMs | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/graphics/digikam/-/commit/e7d4be62f8a523cf9a07fa7af39f439df3d93ea5 | Version Fixed/Implemented In: | 9.0.0 |
| Sentry Crash Report: | |||
|
Description
nucleo
2025-10-18 17:51:13 UTC
Eigen 5.0.0, released on October 9, 2025, may not yet be compatible with digiKam. Use Eigen 3.4.x. Maik DigiKam finds Eigen 5 and builds just fine if using Eigen's upstream cmake config, but DigiKam'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 Currently, Digikam'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 "WORLD" version will forever remain "3" for the "Eigen3" 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 "dev" #define EIGEN_BUILD_VERSION "master" #define EIGEN_VERSION_STRING "5.0.1-dev+master" #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). Correction:
> Currently, Digikam's `../core/cmake/modules/FindEigen3.cmake` has a macro defined ( `_eigen3_check_version` ) which rely on being able to find the following defines:
> ...
> 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.
The above should read:
by looking for them in a file from Eigen project called `../Eigen/src/Core/util/Macros.h`.
Again, the cmake module should just be removed in favor of the upstream one. On 30/11/2025 16:34, Antonio Rojas wrote: > https://bugs.kde.org/show_bug.cgi?id=510760 > > --- Comment #5 from Antonio Rojas <arojas@archlinux.org> --- > Again, the cmake module should just be removed in favor of the upstream one. Agree, this would be the most appropriate solution ... 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't know if cmake configuration have been already shared on the system. Git commit e7d4be62f8a523cf9a07fa7af39f439df3d93ea5 by Gilles Caulier. Committed on 01/12/2025 at 07:09. Pushed by cgilles into branch 'master'. 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 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 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
```
|