Eigen errors when compiling develop branch
I'm getting the following error when compiling the latest commit on the develop branch (commit 5e5e3fffb212448d7b06a3aacc1bf0049836b701). As shown below, the error is in geometry/Cal3Bundler.cpp
, but I also get the same errors in Car3DS2.cpp
, Cal3DS2_Base.cpp
, Cal3Unified.cpp
, Car3_S2Stereo.cpp
, Cal3_S2.cpp
, Pont3.cpp
and Point2.cpp
.
...
c:\eigen_3.3.4\eigen\src/Core/DenseCoeffsBase.h(216): error C2338: OUT_OF_RANGE_ACCESS (compiling source file C:\gtsam\gtsam\geometry\Cal3Bundler.cpp)
5> c:\eigen_3.3.4\eigen\src/Core/DenseCoeffsBase.h(215): note: while compiling class template member function 'const double &Eigen::DenseCoeffsBase<Derived,0>::w(void) const'
5> with
5> [
5> Derived=gtsam::Vector3
5> ] (compiling source file C:\gtsam\gtsam\geometry\Cal3Bundler.cpp)
5> c:\eigen_3.3.4\eigen\src/Core/DenseCoeffsBase.h(301): note: see reference to class template instantiation 'Eigen::DenseCoeffsBase<Derived,0>' being compiled
5> with
5> [
5> Derived=gtsam::Vector3
5> ] (compiling source file C:\gtsam\gtsam\geometry\Cal3Bundler.cpp)
5> c:\eigen_3.3.4\eigen\src/Core/DenseCoeffsBase.h(553): note: see reference to class template instantiation 'Eigen::DenseCoeffsBase<Derived,1>' being compiled
5> with
5> [
5> Derived=gtsam::Vector3
5> ] (compiling source file C:\gtsam\gtsam\geometry\Cal3Bundler.cpp)
5> c:\eigen_3.3.4\eigen\src/Core/DenseBase.h(47): note: see reference to class template instantiation 'Eigen::DenseCoeffsBase<Derived,3>' being compiled
5> with
5> [
5> Derived=gtsam::Vector3
5> ] (compiling source file C:\gtsam\gtsam\geometry\Cal3Bundler.cpp)
5> c:\eigen_3.3.4\eigen\src/Core/MatrixBase.h(50): note: see reference to class template instantiation 'Eigen::DenseBase<Derived>' being compiled
5> with
5> [
5> Derived=gtsam::Vector3
5> ] (compiling source file C:\gtsam\gtsam\geometry\Cal3Bundler.cpp)
5> C:\gtsam\gtsam/base/Vector.h(45): note: see reference to class template instantiation 'Eigen::MatrixBase<gtsam::Vector3>' being compiled (compiling source file C:\gtsam\gtsam\geometry\Cal3Bundler.cpp)
...
I'm on Windows 10 x64, compiling with Visual Studio 2015 (VS14). I'm using the release version of Eigen 3.3.4 (GTSAM_USE_SYSTEM_EIGEN
is enabled) since I need to use eigen with my main project. Full config is below.
GTSAM_SOURCE_ROOT_DIR: [C:/gtsam]
Boost version: 1.64.0
Found the following Boost libraries:
serialization
system
filesystem
thread
program_options
date_time
timer
chrono
atomic
Ignoring Boost restriction on optional lvalue assignment from rvalues
[Warning] FindTBB.cmake: The use of TBB_ARCHITECTURE and TBB_COMPILER is deprecated and may not be supported in future versions. Please set $ENV{TBB_ARCH_PLATFORM} (using tbbvars.[bat|csh|sh]).
Found Intel TBB
Building 3rdparty
Could NOT find GeographicLib (missing: GeographicLib_LIBRARY_DIRS GeographicLib_LIBRARIES GeographicLib_INCLUDE_DIRS)
Building base
Building geometry
Building inference
Building symbolic
Building discrete
Building linear
Building nonlinear
Building sam
Building sfm
Building slam
Building smart
Building navigation
GTSAM Version: 4.0.0
Install prefix: C:/Program Files/GTSAM
Building GTSAM - shared
Building wrap module gtsam
Installing Matlab Toolbox to C:/Program Files/GTSAM/gtsam_toolbox
Building base_unstable
Building geometry_unstable
Building linear_unstable
Building discrete_unstable
Building dynamics_unstable
Building nonlinear_unstable
Building slam_unstable
GTSAM_UNSTABLE Version: 4.0.0
Install prefix: C:/Program Files/GTSAM
Building GTSAM_UNSTABLE - shared
Building wrap module gtsam_unstable
Installing Matlab Toolbox to C:/Program Files/GTSAM/gtsam_toolbox
Wrote C:/gtsam/build/GTSAMConfig.cmake
Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
===============================================================
================ Configuration Options ======================
CMAKE_CXX_COMPILER_ID type : MSVC
CMAKE_CXX_COMPILER_VERSION : 19.0.24215.1
Build flags
Build Tests : Enabled
Build examples with 'make all' : Enabled
Build timing scripts with 'make all': Disabled
Build static GTSAM library instead of shared: Disabled
Put build type in library name : Enabled
Build libgtsam_unstable : Enabled
Use System Eigen : Yes
Use Intel TBB : Yes
Eigen will use MKL : Yes
Eigen will use MKL and OpenMP : OpenMP found but GTSAM_WITH_EIGEN_MKL_OPENMP is disabled
Default allocator : TBB
Packaging flags
CPack Source Generator : TGZ
CPack Generator : TGZ
GTSAM flags
Quaternions as default Rot3 : Disabled
Runtime consistency checking : Disabled
Rot3 retract is full ExpMap : Disabled
Pose3 retract is full ExpMap : Disabled
Deprecated in GTSAM 4 allowed : Enabled
Point3 is typedef to Vector3 : Disabled
Metis-based Nested Dissection : Enabled
Use tangent-space preintegration: Enabled
MATLAB toolbox flags
Install matlab toolbox : Enabled
Build Wrap : Enabled
Python module flags
Build python module : Disabled
Cython toolbox flags
Install Cython toolbox : Disabled
Build Wrap : Enabled
===============================================================
Comments (10)
-
reporter -
-
assigned issue to
-
assigned issue to
-
-
assigned issue to
-
assigned issue to
-
Hi Anup - I don't have a windows machine. Is this still an issue with the latest develop? We now build with 3.3.4 on system and see no problems on Ubuntu.
-
reporter Yes still the exact same issue.
-
Suspected Windows compilation issue: very little I can do, because I don't have a Windows machine. Nor do I have the experience with Windows compilers that I think is needed to resolve this. If any one of you wants to pick this up, please self-assign yourself to this issue. We would love to have some motivated windows contributors, and can also give write access to the repo so you don't have to fork :-) We're trying to actively run down the issue list in preparation for an official GTSAM 4 release. But If we can't find anyone to pick up these issues, I see no choice but to put these "on hold".
-
try fix/msvc2017 branch....
-
I'll give this a try with what I have on hand. Regarding your setup ...
- Which Visual Studio 2017 (Mine is 15.8.7)?
- Which boost (Mine is 1.68, targeting toolset vc141 on x86_64 [ex: libboost_serialization-vc141-mt-x64-1_68.lib])?
-
15.8.9, boost 167
-
- changed status to resolved
Eigen was upgraded, please pull develop and open a new issue if still a problem.
- Log in to comment
If I use the builtin eigen distributed with gtsam, I get the
THIS_METHOD_IS_ONLY_FOR_1x1_EXPRESSIONS
errors described in#357.