From 8877cff15380b31860a1e7fd8c84f7229c585a6a Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Tue, 26 May 2020 20:51:43 -0600 Subject: [PATCH] Add patch to fix building with GCC 10 (bz#1800240) --- vtk-gcc10.patch | 32 ++++++++++++++++++++++++++++++++ vtk.spec | 7 +++++++ 2 files changed, 39 insertions(+) create mode 100644 vtk-gcc10.patch diff --git a/vtk-gcc10.patch b/vtk-gcc10.patch new file mode 100644 index 0000000..27b15cd --- /dev/null +++ b/vtk-gcc10.patch @@ -0,0 +1,32 @@ +diff -up VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c.gcc10 VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c +--- VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c.gcc10 2019-01-30 10:15:13.000000000 -0700 ++++ VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c 2020-05-08 21:38:46.401363001 -0600 +@@ -614,5 +614,5 @@ int ex_create_par_int(const char *path, + * Prevent warning in some versions of ranlib(1) because the object + * file has no symbols. + */ +-const char exodus_unused_symbol_dummy_1; ++const char exodus_unused_symbol_dummy_ex_create_par; + #endif +diff -up VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c.gcc10 VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c +--- VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c.gcc10 2019-01-30 10:15:13.000000000 -0700 ++++ VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c 2020-05-08 21:38:46.402363007 -0600 +@@ -474,5 +474,5 @@ int ex_open_par_int(const char *path, in + * Prevent warning in some versions of ranlib(1) because the object + * file has no symbols. + */ +-const char exodus_unused_symbol_dummy_1; ++const char exodus_unused_symbol_dummy_ex_open_par; + #endif +diff -up VTK-8.2.0/CMake/VTKGenerateExportHeader.cmake.gcc10 VTK-8.2.0/CMake/VTKGenerateExportHeader.cmake +--- VTK-8.2.0/CMake/VTKGenerateExportHeader.cmake.gcc10 2019-01-30 10:15:13.000000000 -0700 ++++ VTK-8.2.0/CMake/VTKGenerateExportHeader.cmake 2020-05-26 21:07:24.625840251 -0600 +@@ -174,7 +174,7 @@ macro(_vtk_test_compiler_hidden_visibili + execute_process(COMMAND ${CMAKE_C_COMPILER} --version + OUTPUT_VARIABLE _gcc_version_info + ERROR_VARIABLE _gcc_version_info) +- string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*" ++ string(REGEX MATCH "[1-9][0-9]*\\.[0-9]+\\.[0-9]+" + _gcc_version "${_gcc_version_info}") + # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the + # patch level, handle this here: diff --git a/vtk.spec b/vtk.spec index 7f2bd7b..3e50123 100644 --- a/vtk.spec +++ b/vtk.spec @@ -30,6 +30,9 @@ Source3: FindPEGTL.cmake Patch0: https://gitlab.kitware.com/vtk/vtk/merge_requests/5883.patch # Proj 6 support Patch1: vtk-proj6_compat.patch +# GCC 10 support based on: +# https://gitlab.kitware.com/vtk/vtk/-/merge_requests/6420 +Patch2: vtk-gcc10.patch URL: http://vtk.org/ @@ -541,6 +544,7 @@ programming languages. %setup -q -b 1 -n VTK-%{version} %patch0 -p1 -b .py38 %patch1 -p1 -b .proj6 +%patch2 -p1 -b .gcc10 # Remove included thirdparty sources just to be sure # TODO - diy2 - not yet packaged # TODO - exodusII - not yet packaged @@ -987,6 +991,9 @@ cat xorg.log %changelog +* Wed May 27 2020 Orion Poplawski - 8.2.0-14 +- Add patch to fix building with GCC 10 (bz#1800240) + * Tue May 26 2020 Miro HronĨok - 8.2.0-14 - Rebuilt for Python 3.9