Internal Compiler Error for VS2013

Issue #115 resolved
Chris Beall created an issue

Run into a number of internal compiler errors:

C:\Users\Chris\git\gtsam\gtsam/base/LieVector.h(66): fatal error C1001: An internal error has occurred in the compiler.
  (compiler file 'msc1.cpp', line 1325)
   To work around this problem, try simplifying or changing the program near the locations listed above.
  Please choose the Technical Support command on the Visual C++ 
   Help menu, or open the Technical Support help file for more information (..\..\gtsam\base\LieVector.cpp)
  INTERNAL COMPILER ERROR in 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\CL.exe'
      Please choose the Technical Support command on the Visual C++
      Help menu, or open the Technical Support help file for more information

Comments (7)

  1. Andrew Melim

    This issue is caused by LieVector/LieMatrix functions implemented in the header that return instances of themselves (i.e. retract, identity, between, etc.) The fix is to move the implementation of those functions into the their respective cpp files.

    Not sure what the root cause is for VS12 to crash on these functions however.

  2. Andrew Melim

    Scratch that, the root issue is the use of template metaprogramming for LieVector and LieMatrix fix-sized constructors

    The offending constructor

      /** initialize from a fixed size normal vector */
      template<int N>
      LieVector(const Eigen::Matrix<double, N, 1>& v) : Vector(v) {}
    

    Going to try and create a simple case to forward to Microsoft to see if it's an issue they can fix with VS

  3. Andrew Melim

    This also threw during the compilation of the Cayley overloads in Rot3M.cpp

    The fixed size Cayley has been refactored into CayleyFixed

  4. Log in to comment