Bug 1809830 - eigen3-devel installs FindEigen.cmake to cmake internal module path
Summary: eigen3-devel installs FindEigen.cmake to cmake internal module path
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: eigen3
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Rich Mattes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-04 00:38 UTC by Charles Barto
Modified: 2020-10-23 22:04 UTC (History)
3 users (show)

Fixed In Version: eigen3-3.3.8-2.fc33
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-23 22:04:52 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Charles Barto 2020-03-04 00:38:46 UTC
Description of problem:

There's a patch in the eigen3 package that installs eigens "cmake/FindEigen3.cmake" file to /usr/share/cmake/Modules, which is the
path for cmake's own modules (i.e. the ones documented in cmake-modules(7)).

The FindEigen3.cmake file in the eigen source tree is designed to be copied to consuming projects source trees if they want to use it. By installing the module globally you break the build of anyone doing "find_package(Eigen3 REQUIRED)" then linking to "Eigen3::Eigen" because now cmake will use the find module you installed instead of the config module that eigen3 provides as a built artifact (and is installed by eigen3-devel at /usr/share/eigen3)

Version-Release number of selected component (if applicable):
eigen3-3.3.7-3.fc31.src.rpm

How reproducible:

Very

Steps to Reproduce:

install eigen3-devel

Configure a project that looks like the following:

CMakeLists.txt
cmake_minimum_required(VERSION 3.16)
project(some_project LANGUAGES CXX)
find_package(Eigen3 REQUIRED)
add_executable(some_project some_project.cpp)
target_link_libraries(some_project PRIVATE Eigen3::Eigen)

Actual results:

Build failure

Expected results:

Build success

Additional info:


It looks like this patch (to install the find module) was adopted from debian,
so it's not impossible that this will have compatibility impacts, that said I think eigen's config file defines the same variables as findEigen, so who knows.

Comment 1 Sandro Mani 2020-03-05 10:18:11 UTC
So what would the fix be? Not shipping FindEigen3.cmake?

Comment 2 Ben Cotton 2020-08-11 13:12:42 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 33 development cycle.
Changing version to 33.

Comment 3 Fedora Update System 2020-10-06 14:30:38 UTC
FEDORA-2020-a5af68ea4c has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-a5af68ea4c

Comment 4 Fedora Update System 2020-10-07 14:29:09 UTC
FEDORA-2020-a5af68ea4c has been pushed to the Fedora 33 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-a5af68ea4c`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-a5af68ea4c

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2020-10-23 22:04:52 UTC
FEDORA-2020-a5af68ea4c has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.