Update eigen 5.0.1 v3#6259
Conversation
|
Will this fix the breakage I reported a few days ago here? |
I am just testing from an installed ITK with SimpleITK and it seems to be working. There are more things that I need to check and it will take some time to do so. |
Build matrix results for PR #6259 (Linux, 48-core cortex.ecn.uiowa.edu)Repeating the M1–M6 gauntlet from PR #6249 against this PR's head (
Linux-specific substitutions for system EigenThe original PR #6249 matrix used macOS homebrew Eigen 5.0.1 for M4 and a downloaded Eigen 3.4.0 for M5. On Linux, the equivalent sources are:
Both report |
|
@blowekamp, very minor ghostflow issues. I think it may need to be addressed in ISC/eigen with a new branch that is then updated here. |
Used ISC eigen branch name "itk_module_install" as prior forked branch. Rebased all prior fork commits onto upstream 5.0.1. Ported ITK local commit for eigen to be applied to fork.
7700a8c to
eb3e74d
Compare
Yes that did the trick. I added another commit to the fork branch: Likely some of these should be squashed to make future updates easier. For example just one commit for the modification of the CMakeLists.txt file and the commit message updates. With these changes and workflow, Eigen should be updated to 5.0.1, and have the same functionality as before the update to 5 started. There are still a couple questionable features within the ITK Cmake infrastructure that are in a questionable state. |
|
@blowekamp I would recommend pushing this as-is to resolve the eigen bugs I introduced, and then follow up with
|
|
| Filename | Overview |
|---|---|
| Modules/ThirdParty/Eigen3/src/itkeigen/CMakeLists.txt | ITK-specific build integration updated for Eigen 5.0.1: include paths, export targets, and version parsing changed — version parsing now reads Macros.h which no longer defines version macros in Eigen 5, producing an empty EIGEN_VERSION_NUMBER. |
| Modules/ThirdParty/Eigen3/src/itkeigen/cmake/Eigen3Config.cmake.in | Target guard changed from Eigen3::Eigen to eigen; the latter is never defined, breaking idempotent find_package(Eigen3) calls. |
| Modules/ThirdParty/Eigen3/UpdateFromUpstream.sh | Updated upstream tag from for/itk-20260501-879885e1 to for/itk-5.0.1-v3 and promoted exact_tree_match=false to a readonly variable; straightforward bookkeeping change. |
| Modules/ThirdParty/Eigen3/src/itkeigen/Eigen/Version | Version bumped to the official 5.0.1 release; pre-release and build metadata cleared, version string is now "5.0.1". |
| Modules/ThirdParty/Eigen3/src/itkeigen/Eigen/src/Core/util/Macros.h | Upstream sync: CUDA version detection logic relaxed to support pre-9.0 toolchains and older CUDACC_VER form; minimum CUDA and ROCm/HIP version guards removed; RISC-V arch detection removed. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[CMakeLists.txt - ITK section] --> B{Version parsing}
B -->|reads| C["Eigen/src/Core/util/Macros.h\n(no version #defines in Eigen 5)"]
C --> D["EIGEN_VERSION_NUMBER = '..'"]
D --> E["write_basic_package_version_file\n❌ invalid version"]
A --> F[eigen_external target]
F --> G["Eigen3Targets.cmake\ncreates Eigen3::Eigen"]
G --> H["Eigen3Config.cmake from template"]
H --> I{"if NOT TARGET eigen"}
I -->|always true - eigen never created| J["Re-include Eigen3Targets.cmake\n❌ target already exists error"]
A --> K[eigen_internal target]
K --> L["BUILD_INTERFACE: CMAKE_CURRENT_SOURCE_DIR\n= itkeigen/ (was itkeigen/..)"]
L --> M["#include Eigen/X ✓\n#include itkeigen/Eigen/X requires parent dir"]
Comments Outside Diff (1)
-
Modules/ThirdParty/Eigen3/src/itkeigen/CMakeLists.txt, line 914-920 (link)The comment still says "go one directory before to localize the headers:
#include <itkeigen/Eigen/x>", butBUILD_INTERFACEnow points to${CMAKE_CURRENT_SOURCE_DIR}(theitkeigen/directory itself), which exposes#include <Eigen/x>. The..suffix that produced theitkeigen/Eigen/xpath was removed. The stale comment will mislead maintainers about how headers are resolved.
Reviews (1): Last reviewed commit: "Merge branch 'upstream-Eigen3' into upda..." | Re-trigger Greptile
Code extracted from:
https://github.com/InsightSoftwareConsortium/eigen
at commit d77dca0dddd36b243bf89079066695fe6c0b3bdb (for/itk-5.0.1-v3).
* upstream-Eigen3: Eigen3 2026-05-13 (d77dca0d)
eb3e74d to
798f0b2
Compare
|
Looks good on a glance. |
|
@blowekamp THANK YOU! |
|
I am working on a ReadMe in a welcome branch like slicer/ITK to provide documentation for the fork. We will probably need some common ITK docs documentation on this topic to and then do a similar thing to the DCMTK fork. |
PR Checklist
Refer to the ITK Software Guide for
further development details if necessary.