g2o icon indicating copy to clipboard operation
g2o copied to clipboard

Internal compiler error with VS 2015

Open Winotix opened this issue 4 years ago • 11 comments

Hi, I'm trying to build g2o with VS2015 but getting the error:

20> c:\g2o\g2o\core\base_fixed_sized_edge.h(169): fatal error C1001: An internal error has occurred in the compiler.
20>  (compiler file 'msc1.cpp', line 1468)
20>   To work around this problem, try simplifying or changing the program near the locations listed above.
20>  Please choose the Technical Support command on the Visual C++
20>   Help menu, or open the Technical Support help file for more information
20>  c:\g2o\g2o\core\base_fixed_sized_edge.h(264): note: see reference to class template instantiation 'g2o::BaseFixedSizedEdge<D,E,VertexTypes...>' being compiled
20>  INTERNAL COMPILER ERROR in 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\CL.exe'
20>      Please choose the Technical Support command on the Visual C++
20>      Help menu, or open the Technical Support help file for more information

It complains about one template, but I have a feeling it's because of something else: image

Do you have any Idea? Thanks

Winotix avatar Jan 15 '21 14:01 Winotix

I am not actively using Windows at this point in time. Thus, I am also not using VS2015. On appveyor, we build using VS2019 which seems to be fine.

Is upgrading to a more recent version of VS an option?

RainerKuemmerle avatar Jan 19 '21 18:01 RainerKuemmerle

Also working on VS 2017. But still missing include libs in cspare_extension (stuff) and missing #include in one header that I can not remember ...

Pablitinho avatar Jan 21 '21 13:01 Pablitinho

Would be awesome to receive a PR to fix above mentioned issues. Thanks.

RainerKuemmerle avatar Jan 21 '21 16:01 RainerKuemmerle

In solver_cholmod is missing the include directories of cholmod and SuiteSparse_config

Pablitinho avatar Jan 21 '21 17:01 Pablitinho

optimizable_graph.cpp was giving an error because missing:

#include <iterator>

Pablitinho avatar Jan 22 '21 10:01 Pablitinho

In solver_cholmod is missing the include directories of cholmod and SuiteSparse_config

Not sure what you mean by this. How did you fix this? Did CMake initially not find Cholmod?

RainerKuemmerle avatar Jan 22 '21 17:01 RainerKuemmerle

It seems that it was not found by cmake. I added manually in VS.

Pablitinho avatar Jan 25 '21 13:01 Pablitinho

I think you would have to add it on cmake-gui instead such that exporting the includes for all targets in cmake picks up the variables.

Am 25.01.2021 um 14:19 schrieb Pablitinho [email protected]:

 It seems that it was not found by cmake. I added manually in VS.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

RainerKuemmerle avatar Jan 25 '21 14:01 RainerKuemmerle

I did it... But it is fine. Adding manually, it is working. image

Pablitinho avatar Jan 25 '21 14:01 Pablitinho

FYI: This commit was possible to be compiled on VS2015 with cholmod activated.

https://github.com/RainerKuemmerle/g2o/tree/20200410_git

Pablitinho avatar Jan 25 '21 15:01 Pablitinho

Ran into the exactly same error with VS2015, WIn 10, x64 build . Cholmod is enbabled. Eigen 3.3.3 used. Seems like the internal::index_to_pair(K) call is somehow causing the crash inside VS2015. Using 20230223 G2O codebase. Any suggestions ? Its seems related to the issue VS 2015 has with constexpr

turmansky avatar Apr 28 '23 17:04 turmansky