Hello, i’m installing paraview v 5.10-RC2 from source on scientific linux. Cmake is done, but when I make i have the following output:
In file included from /home/lib/ParaView-v5.10.0-RC2/VTK/Filters/ParallelDIY2/vtkProbeLineFilter.cxx:15:0:
/home/lib/ParaView-v5.10.0-RC2/VTK/Filters/ParallelDIY2/vtkProbeLineFilter.h: In function «{anonymous}::HitCellInfo {anonymous}::ProcessLimitPoint(vtkVector3d, vtkVector3d, int, vtkDataSet*, vtkAbstractCellLocator*, double)»:
/home/lib/ParaView-v5.10.0-RC2/VTK/Filters/ParallelDIY2/vtkProbeLineFilter.h:193:7: error: «int vtkProbeLineFilter::SamplingPattern» is protected
int SamplingPattern;
^
/home/lib/ParaView-v5.10.0-RC2/VTK/Filters/ParallelDIY2/vtkProbeLineFilter.cxx:176:43: error: in this context
else if (pattern == vtkProbeLineFilter::SamplingPattern::SAMPLE_LINE_AT_CELL_BOUNDARIES)
^
/home/lib/ParaView-v5.10.0-RC2/VTK/Filters/ParallelDIY2/vtkProbeLineFilter.cxx:176:43: error: «vtkProbeLineFilter::SamplingPattern» is not a class, namespace, or enumeration
/home/lib/ParaView-v5.10.0-RC2/VTK/Filters/ParallelDIY2/vtkProbeLineFilter.cxx: In the member function «vtkSmartPointer<vtkPolyData> vtkProbeLineFilter::SampleLineAtEachCell(const std::vector<vtkDataSet*>&, double) const»:
/home/lib/ParaView-v5.10.0-RC2/VTK/Filters/ParallelDIY2/vtkProbeLineFilter.cxx:535:112: error: «void prevEnd» has incomplete type
auto prevEnd = intersections.insert(intersections.end(), distIntersections.begin(), distIntersections.end());
^
make[2]: *** [VTK/Filters/ParallelDIY2/CMakeFiles/FiltersParallelDIY2.dir/vtkProbeLineFilter.cxx.o] error 1
make[1]: *** [VTK/Filters/ParallelDIY2/CMakeFiles/FiltersParallelDIY2.dir/all] Ошибка 2
make: *** [all] error 2
Indeed there’s a name conflict that wasn’t catch by the CI, this error might depdns of the compiler version you use. If you compile ParaView yourself you can replace vtkProbeLineFilter::SamplingPattern::SAMPLE_LINE_AT_CELL_BOUNDARIES by vtkProbeLineFilter::SAMPLE_LINE_AT_CELL_BOUNDARIES and this should do the trick.
I replaced in vtkProbeLineFilter.cx vtkProbeLineFilter::Sampling Pattern::SAMPLE_LINE_AT_ALL_BOUNDARIES by vtkProbeLineFilter::SAMPLE_LINE_AT_CELL_BOUNDARIES , but it didn’t help. I didn’t cmake again, should I? Output:
[ 20%] Building CXX object VTK/Filters/ParallelDIY2/CMakeFiles/FiltersParallelDIY2.dir/vtkProbeLineFilter.cxx.o
/home/lib/ParaView-v5.10.0-RC1/VTK/Filters/ParallelDIY2/vtkProbeLineFilter.cxx: In function member «vtkSmartPointer<vtkPolyData> vtkProbeLineFilter::SampleLineAtEachCell(const std::vector<vtkDataSet*>&, double) const»:
/home/lib/ParaView-v5.10.0-RC1/VTK/Filters/ParallelDIY2/vtkProbeLineFilter.cxx:528:112: error: «void prevEnd» has incomplete type
auto prevEnd = intersections.insert(intersections.end(), distIntersections.begin(), distIntersections.end());
^
make[2]: *** [VTK/Filters/ParallelDIY2/CMakeFiles/FiltersParallelDIY2.dir/vtkProbeLineFilter.cxx.o] Error 1
make[1]: *** [VTK/Filters/ParallelDIY2/CMakeFiles/FiltersParallelDIY2.dir/all] Ошибка 2
make: *** [all] error 2
Compiler and make versions: gcc (GCC) 4.8.5, GNU Make 3.82
Well a more recent compiler would definitely resolve the problem but if I remember correctly VTK is supposed to support gcc 4.8 + and so should ParaView.
intersections is of type std::vector<HitCellInfo>, and HitCellInfo is defined in an anonymous namespace on the upper part of the file. My quick guess would be to move HitCellInfo out of the anonymous namespace. You could also explicitely replace auto by std::vector<HitCellInfo>::iterator. Other than that I do not have any idea. Ifyou could try that would be great ! Otherwise I’ll install an old version of gcc and debug when I have some time.
Ok error is much clearer now. Anonymous namespace has nothing to do with it, I think it is because you do not compile using c++11. Here we can see it complains about not beeing able to convert void to iterator and std::vector::insert returns void until C++11 (see std::vector<T,Allocator>::insert - cppreference.com).