ParaView build fails on arm clusters
We have a compiler error/failure when building ParaView on arm clusters. Here is the issue, and how to solve it:
95%] Building CXX object Remoting/ViewsPython/CMakeFiles/RemotingViewsPython.dir/vtkPythonRepresentation.cxx.o
[ 95%] Building CXX object Remoting/ViewsPython/CMakeFiles/RemotingViewsPython.dir/vtkPythonView.cxx.o
[ 95%] Generating client_server wrapper sources for vtkSMSpreadSheetRepresentationProxy
<snip>/bin/ld: ../../../lib/libvtklibxml2-pv5.8.a(xpath.c.o): undefined reference to symbol 'xmlXPathNINF@@LIBXML2_2.4.30'
<snip>/bin/ld: /lib64/libxml2.so.2: error adding symbols: DSO missing from command line
[ 95%] Building CXX object Remoting/ViewsPython/CMakeFiles/RemotingViewsPython.dir/vtkSMPythonViewProxy.cxx.o
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[5]: *** [bin/pvtkpython] Error 1
gmake[4]: *** [VTK/Wrapping/Python/CMakeFiles/pvtkpython.dir/all] Error 2
gmake[4]: *** Waiting for unfinished jobs....
[ 95%] Generating client_server wrapper sources for vtkSMSpreadSheetViewProxy
[ 95%] Generating client_server wrapper sources for vtkSMTextWidgetRepresentationProxy
And, here is the fix that Tom Otahal came up with that I am using to fix the issue. Totally impressed, I have no idea at all how he figured it out! Note this is in the VTK directory.
$ git diff CMakeLists.txt
diff --git a/ThirdParty/libxml2/vtklibxml2/CMakeLists.txt b/ThirdParty/libxml2/vtklibxml2/CMakeLists.txt
index 1cfb10d..88660ff 100644
--- a/ThirdParty/libxml2/vtklibxml2/CMakeLists.txt
+++ b/ThirdParty/libxml2/vtklibxml2/CMakeLists.txt
@@ -177,6 +177,8 @@ set(sources
xpath.c
xpointer.c)
+set_source_files_properties(xpath.c PROPERTIES COMPILE_FLAGS -fno-common)
+
# Create the platform configuration header.
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/config_cmake.h.in"
$ pwd
/<snip>/VTK/ThirdParty/libxml2/vtklibxml2