Hello everybody.
I was trying to install VTK v5.4.2 on Ubuntu (in WSL2).
Those are my steps (starting from my home directory):
- git clone -b v5.4.2 https://gitlab.kitware.com/vtk/vtk
- mkdir VTK-linux
- cd VTK-linux
- ccmake …/vtk
- set the CMAKE_CXX_FLAGS to “-std=c++03” → this was to fix an error I was getting later on during “make install”; the error was about some kind of number format conversion
- make install
Here is the problem. “Make install” reaches the 87% and then I get:
vtk/Infovis/vtkOrderStatistics.cxx:107:52: error: call of overloaded ‘div(int, vtkIdType&)’ is ambiguous
107 | div_t q = div( i << 2, this->NumberOfIntervals );
/usr/include/c++/9/cstdlib:213:3: note: candidate: ‘lldiv_t __gnu_cxx::div(long long int, long long int)’
213 | div(long long __n, long long __d)
| ^~~
/usr/include/c++/9/cstdlib:177:3: note: candidate: ‘ldiv_t std::div(long int, long int)’
177 | div(long __i, long __j) { return ldiv(__i, __j); }
| ^~~
make[2]: *** [Infovis/CMakeFiles/vtkInfovis.dir/build.make:609: Infovis/CMakeFiles/vtkInfovis.dir/vtkOrderStatistics.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:3193: Infovis/CMakeFiles/vtkInfovis.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
I am completely stuck and no clue on how to fix it.
Could any of you give me some help?
Thanks in advance.