Compile error in vtkWidgetRepresentation.cxx
When compiling ParaView 5.11.0 with GCC 6.5.0, I get a compile error about an ambiguous overload of std::abs
. The problem is that std::abs
is being called with a double
value. The compiler does not know whether to use the long
or long long
version of the function. The error happens on line 371 of VTK/Interaction/Widgets/vtkWidgetRepresentation.cxx.
The problem appears to be introduced by vtk/vtk!9081 (merged). I realize this is technically a VTK bug, but it is affecting the ParaView 5.11 rollout.
The full error is below.
[2023/20869] Building CXX object VTK/Interaction/Widgets/CMakeFiles/InteractionWidgets.dir/vtkWidgetRepresentation.cxx.o
FAILED: VTK/Interaction/Widgets/CMakeFiles/InteractionWidgets.dir/vtkWidgetRepresentation.cxx.o
/sw/andes/gcc/6.5.0/bin/g++ -DInteractionWidgets_EXPORTS -Dkiss_fft_scalar=double -DvtkRenderingCore_AUTOINIT_INCLUDE=\"/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/CMakeFiles/vtkModuleAutoInit_919f0246f6cf0fd410088f15e62762e0.h\" -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/Interaction/Widgets -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Interaction/Widgets -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/Common/Core -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Common/Core -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/Common/ExecutionModel -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Common/ExecutionModel -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/Common/DataModel -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Common/DataModel -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/Common/Math -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Common/Math -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/ThirdParty/kissfft/vtkkissfft -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/ThirdParty/kissfft/vtkkissfft -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/Common/Transforms -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Common/Transforms -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/Filters/General -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Filters/General -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/Common/Misc -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Common/Misc -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/Filters/Core -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Filters/Core -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/Filters/Sources -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Filters/Sources -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/Rendering/Core -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Rendering/Core -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/Rendering/Context2D -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Rendering/Context2D -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/Common/ComputationalGeometry -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Common/ComputationalGeometry -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/Common/System -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Common/System -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/Filters/Hybrid -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Filters/Hybrid -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/Filters/Geometry -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Filters/Geometry -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/Filters/Modeling -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Filters/Modeling -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/Filters/Texture -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Filters/Texture -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/Imaging/Color -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Imaging/Color -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/Imaging/Core -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Imaging/Core -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/Imaging/General -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Imaging/General -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/Imaging/Hybrid -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Imaging/Hybrid -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/Interaction/Style -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Interaction/Style -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/Rendering/Annotation -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Rendering/Annotation -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/Rendering/FreeType -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Rendering/FreeType -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/Rendering/Volume -I/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Rendering/Volume -isystem /ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/Utilities/KWIML -isystem /ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Utilities/KWIML -isystem /ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/Utilities/KWSys -isystem /ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Utilities/KWSys -isystem /ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/ThirdParty/kissfft -isystem /ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/ThirdParty/kissfft -isystem /ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/build/VTK/ThirdParty/freetype -isystem /ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/ThirdParty/freetype -isystem /ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/install/include/freetype2 -fPIC -std=c++11 -O3 -DNDEBUG -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++11 -MD -MT VTK/Interaction/Widgets/CMakeFiles/InteractionWidgets.dir/vtkWidgetRepresentation.cxx.o -MF VTK/Interaction/Widgets/CMakeFiles/InteractionWidgets.dir/vtkWidgetRepresentation.cxx.o.d -o VTK/Interaction/Widgets/CMakeFiles/InteractionWidgets.dir/vtkWidgetRepresentation.cxx.o -c /ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Interaction/Widgets/vtkWidgetRepresentation.cxx
/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Interaction/Widgets/vtkWidgetRepresentation.cxx: In member function 'bool vtkWidgetRepresentation::NearbyEvent(int, int, double*)':
/ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Interaction/Widgets/vtkWidgetRepresentation.cxx:371:24: error: call of overloaded 'abs(double)' is ambiguous
if (abs(dFocus[0] - X) < threshold && abs(dFocus[1] - Y) < threshold)
^
In file included from /autofs/nccs-svm1_sw/andes/gcc/6.5.0/include/c++/6.5.0/cstdlib:75:0,
from /autofs/nccs-svm1_sw/andes/gcc/6.5.0/include/c++/6.5.0/ext/string_conversions.h:41,
from /autofs/nccs-svm1_sw/andes/gcc/6.5.0/include/c++/6.5.0/bits/basic_string.h:5429,
from /autofs/nccs-svm1_sw/andes/gcc/6.5.0/include/c++/6.5.0/string:52,
from /autofs/nccs-svm1_sw/andes/gcc/6.5.0/include/c++/6.5.0/bits/locale_classes.h:40,
from /autofs/nccs-svm1_sw/andes/gcc/6.5.0/include/c++/6.5.0/bits/ios_base.h:41,
from /autofs/nccs-svm1_sw/andes/gcc/6.5.0/include/c++/6.5.0/ios:42,
from /autofs/nccs-svm1_sw/andes/gcc/6.5.0/include/c++/6.5.0/istream:38,
from /autofs/nccs-svm1_sw/andes/gcc/6.5.0/include/c++/6.5.0/fstream:38,
from /ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Common/Core/vtkIOStream.h:29,
from /ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Common/Core/vtkNew.h:47,
from /ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Interaction/Widgets/vtkWidgetRepresentation.h:46,
from /ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Interaction/Widgets/vtkWidgetRepresentation.cxx:15:
/usr/include/stdlib.h:837:12: note: candidate: int abs(int)
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
^~~
In file included from /autofs/nccs-svm1_sw/andes/gcc/6.5.0/include/c++/6.5.0/ext/string_conversions.h:41:0,
from /autofs/nccs-svm1_sw/andes/gcc/6.5.0/include/c++/6.5.0/bits/basic_string.h:5429,
from /autofs/nccs-svm1_sw/andes/gcc/6.5.0/include/c++/6.5.0/string:52,
from /autofs/nccs-svm1_sw/andes/gcc/6.5.0/include/c++/6.5.0/bits/locale_classes.h:40,
from /autofs/nccs-svm1_sw/andes/gcc/6.5.0/include/c++/6.5.0/bits/ios_base.h:41,
from /autofs/nccs-svm1_sw/andes/gcc/6.5.0/include/c++/6.5.0/ios:42,
from /autofs/nccs-svm1_sw/andes/gcc/6.5.0/include/c++/6.5.0/istream:38,
from /autofs/nccs-svm1_sw/andes/gcc/6.5.0/include/c++/6.5.0/fstream:38,
from /ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Common/Core/vtkIOStream.h:29,
from /ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Common/Core/vtkNew.h:47,
from /ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Interaction/Widgets/vtkWidgetRepresentation.h:46,
from /ccs/home/kmorel/world-shared/builds/andes-2022-12-02/paraview-v5.11.0/build/superbuild/paraview/src/VTK/Interaction/Widgets/vtkWidgetRepresentation.cxx:15:
/autofs/nccs-svm1_sw/andes/gcc/6.5.0/include/c++/6.5.0/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^~~
/autofs/nccs-svm1_sw/andes/gcc/6.5.0/include/c++/6.5.0/cstdlib:172:3: note: candidate: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
^~~
Edited by Kenneth Moreland