Skip to content

Conversation

varunagrawal
Copy link
Contributor

@varunagrawal varunagrawal commented Oct 25, 2022

This fixes the issue that was encountered after merging #1304 since that PR unearthed this subtle bug. Kudos to @OznOg for helping with this.

The issue is that Eigen is being find_packaged twice, and if the first one is the system Eigen, it keeps using that even if the USE_SYSTEM_EIGEN flag is set to OFF.

As a result, the version set by CMake is the 3rdparty one, but GTSAM is compiled against the system Eigen, hence version mismatch.

Easy fix is to just not do the first find_package since that is being used to set a default flag value (which is now OFF directly). KISS

@varunagrawal varunagrawal added the cmake Related to CMake and build system label Oct 25, 2022
@varunagrawal varunagrawal self-assigned this Oct 25, 2022
Copy link
Member

@dellaert dellaert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll approve and merge because GTSAM is broken after $1304, but @jlblancoc please take a second look to see if you agree with the changes? We can always do another PR if not.

@dellaert dellaert merged commit 2dfc683 into develop Oct 26, 2022
@dellaert dellaert deleted the fix/cmake-eigen branch October 26, 2022 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmake Related to CMake and build system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants