Skip to content

Commit

Permalink
vtk: update to 9.4.1
Browse files Browse the repository at this point in the history
Remove patches that have been applied upstream.
Fix compilation issues with `clang++` version 19.
Fix new build issues with fmt 11.
Cherry-pick patches from upstream VTK-m.
Update patch to make it apply cleanly.
Update DIY to version 3.6.0 to avoid compilation issue with C++ STL from LLVM 19 (`std::char_traits<T>` can no longer be instantiated with arbitrary types).
  • Loading branch information
mmuetzel committed Jan 14, 2025
1 parent 730d386 commit d94d2ea
Show file tree
Hide file tree
Showing 10 changed files with 26,469 additions and 212 deletions.
12 changes: 0 additions & 12 deletions mingw-w64-vtk/002-Fix-build-with-gcc-13.patch

This file was deleted.

14 changes: 14 additions & 0 deletions mingw-w64-vtk/002-llvm-19-compatibility.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
a template argument list is expected after a name prefixed by the template keyword

diff -urN VTK-9.3.1/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/internal/VariantImplDetail.h.orig VTK-9.3.1/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/internal/VariantImplDetail.h
--- VTK-9.3.1/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/internal/VariantImplDetail.h.orig 2024-06-28 18:00:10.000000000 +0200
+++ VTK-9.3.1/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/internal/VariantImplDetail.h 2025-01-13 15:35:29.812473900 +0100
@@ -548,7 +548,7 @@
// just the one that it currently holds.
return f(storage.V7, std::forward<Args>(args)...);
default:
- return VariantCases<NumCases - 8>::template CastAndCall(
+ return VariantCases<NumCases - 8>::template CastAndCall<>(
index - 8, std::forward<Functor>(f), storage.Remaining, std::forward<Args>(args)...);
}
}
48 changes: 15 additions & 33 deletions mingw-w64-vtk/003-fix-build-with-fmt-11.patch
Original file line number Diff line number Diff line change
@@ -1,40 +1,22 @@
--- a/ThirdParty/ioss/vtkioss/Ioss_IOFactory.C
+++ b/ThirdParty/ioss/vtkioss/Ioss_IOFactory.C
diff -urN VTK-9.4.1/ThirdParty/ioss/vtkioss/Ioss_Field.C.orig VTK-9.4.1/ThirdParty/ioss/vtkioss/Ioss_Field.C
--- VTK-9.4.1/ThirdParty/ioss/vtkioss/Ioss_Field.C.orig 2024-12-27 18:08:14.000000000 +0100
+++ VTK-9.4.1/ThirdParty/ioss/vtkioss/Ioss_Field.C 2025-01-13 16:46:04.272364200 +0100
@@ -12,6 +12,7 @@
#include <cstddef> // for nullptr
#include <cstdint>
#include "vtk_fmt.h"
#include VTK_FMT(fmt/ostream.h)
+#include VTK_FMT(fmt/ranges.h)
#include <map> // for _Rb_tree_iterator, etc
#include <ostream> // for basic_ostream, etc
#include <set>
--- a/ThirdParty/ioss/vtkioss/Ioss_StructuredBlock.C
+++ b/ThirdParty/ioss/vtkioss/Ioss_StructuredBlock.C
@@ -15,6 +15,7 @@
#include <Ioss_StructuredBlock.h>
#include "vtk_fmt.h"
#include VTK_FMT(fmt/ostream.h)
+#include VTK_FMT(fmt/ranges.h)

#include <cstddef> // for size_t
#include <numeric>
--- a/ThirdParty/ioss/vtkioss/Ioss_Utils.C
+++ b/ThirdParty/ioss/vtkioss/Ioss_Utils.C
@@ -21,6 +21,7 @@
#include VTK_FMT(fmt/chrono.h)
+#include VTK_FMT(fmt/xchar.h)
#include <iostream>
#include <string>
#include <vector>
diff -urN VTK-9.4.1/ThirdParty/ioss/vtkioss/Ioss_VariableType.C.orig VTK-9.4.1/ThirdParty/ioss/vtkioss/Ioss_VariableType.C
--- VTK-9.4.1/ThirdParty/ioss/vtkioss/Ioss_VariableType.C.orig 2024-12-27 18:08:14.000000000 +0100
+++ VTK-9.4.1/ThirdParty/ioss/vtkioss/Ioss_VariableType.C 2025-01-13 16:47:09.758522800 +0100
@@ -19,6 +19,7 @@
#include VTK_FMT(fmt/core.h)
#include VTK_FMT(fmt/format.h)
#include VTK_FMT(fmt/ostream.h)
+#include VTK_FMT(fmt/ranges.h)
#include <fstream>
+#include VTK_FMT(fmt/xchar.h)
#include <map>
#include <sstream>
#include <string>
--- a/ThirdParty/ioss/vtkioss/Ioss_ZoneConnectivity.C
+++ b/ThirdParty/ioss/vtkioss/Ioss_ZoneConnectivity.C
@@ -9,6 +9,7 @@
#include <cstddef> // for size_t
#include "vtk_fmt.h"
#include VTK_FMT(fmt/ostream.h)
+#include VTK_FMT(fmt/ranges.h)
#include <string> // for string
#include <vector> // for vector

96 changes: 0 additions & 96 deletions mingw-w64-vtk/005-opencascade-7.8.patch

This file was deleted.

31 changes: 31 additions & 0 deletions mingw-w64-vtk/005-remove-unused-method-from-mir-tables.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
From c805a6039ea500cb96158cfc11271987c9f67aa4 Mon Sep 17 00:00:00 2001
From: Kenneth Moreland <[email protected]>
Date: Tue, 15 Oct 2024 13:06:36 -0400
Subject: [PATCH] Remove unused method from MIR tables

The implementation of this method was incorrect as it referenced a class
member that does not exist. Many compilers allowed it in a templated
class when the method was never used, but other compilers attempt to
compile the inlined method regardless.

Since the method clearly is not needed, the easy solution is to remove
it.
---
vtkm/filter/contour/worklet/mir/MIRTables.h | 5 -----
1 file changed, 5 deletions(-)

diff -urN VTK-9.4.1/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/filter/contour/worklet/mir/MIRTables.h.orig VTK-9.4.1/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/filter/contour/worklet/mir/MIRTables.h
--- VTK-9.4.1/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/filter/contour/worklet/mir/MIRTables.h.orig 2024-12-27 18:08:14.000000000 +0100
+++ VTK-9.4.1/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/filter/contour/worklet/mir/MIRTables.h 2025-01-13 16:56:54.495714500 +0100
@@ -11400,11 +11400,6 @@
return FacesLookup[shape];
}

- VTKM_EXEC vtkm::UInt8 GetPoint(vtkm::Id pointIndex) const
- {
- return this->CellFacePortal.Get(pointIndex);
- }
-
private:
typename vtkm::cont::ArrayHandle<vtkm::UInt8>::ReadPortalType MIRTablesDataPortal;
typename vtkm::cont::ArrayHandle<vtkm::UInt16>::ReadPortalType MIRTablesIndicesPortal;
37 changes: 37 additions & 0 deletions mingw-w64-vtk/006-fix-compile-error-for-contour-tree-print.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
From 48e385af319543800398656645327243a29babfb Mon Sep 17 00:00:00 2001
From: Kenneth Moreland <[email protected]>
Date: Tue, 15 Oct 2024 12:01:34 -0400
Subject: [PATCH] Fix compile error for contour tree print

A print for one of the contour tree objects was referencing members of
itself that don't seem to exist. This causes the Intel compiler to fail
to compile it. I'm at a loss about how any other compiler does not error
out, but at any rate this should be correct.
---
.../worklet/contourtree_distributed/HierarchicalContourTree.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/filter/scalar_topology/worklet/contourtree_distributed/HierarchicalContourTree.h b/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/filter/scalar_topology/worklet/contourtree_distributed/HierarchicalContourTree.h
index a996d42928..e40d5f4f15 100644
--- a/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/filter/scalar_topology/worklet/contourtree_distributed/HierarchicalContourTree.h
+++ b/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/filter/scalar_topology/worklet/contourtree_distributed/HierarchicalContourTree.h
@@ -663,7 +663,7 @@ std::string HierarchicalContourTree<FieldType>::PrintDotSuperStructure(const cha
auto hyperarcsPortal = this->Hyperarcs.ReadPortal();
auto regularNodeGlobalIdsPortal = this->RegularNodeGlobalIds.ReadPortal();
auto whichIterationPortal = this->WhichIteration.ReadPortal();
- auto whichRoundPortal = this->whichRound.ReadPortal();
+ auto whichRoundPortal = this->WhichRound.ReadPortal();
auto superarcsPortal = this->Superarcs.ReadPortal();
auto superparentsPortal = this->Superparents.ReadPortal();
for (vtkm::Id supernode = 0; supernode < this->Supernodes.GetNumberOfValues(); supernode++)
@@ -708,7 +708,7 @@ std::string HierarchicalContourTree<FieldType>::PrintDotSuperStructure(const cha
if (contourtree_augmented::NoSuchElement(superarcTo))
{ // no superarc
// if it occurred on the final round, it's the global root and is shown as the NULL node
- if (whichRoundPortal.Get(superarcFrom) == this->NRounds)
+ if (whichRoundPortal.Get(superarcFrom) == this->NumRounds)
{ // root node
outstream << "\tSN" << std::setw(1) << superarcFrom << " -> SA" << std::setw(1) << superarc
<< " [label=\"S" << std::setw(1) << superarc << "\",style=dotted]\n";
--
GitLab
20 changes: 10 additions & 10 deletions mingw-w64-vtk/007-dll-export-some-functions.patch
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,20 @@
/**
* Get component @a comp of the tuple at @a tupleIdx.
*/
- ValueType GetTypedComponent(vtkIdType tupleIdx, int comp) const VTK_EXPECTS(0 <= tupleIdx &&
+ VTKCOMMONCORE_EXPORT ValueType GetTypedComponent(vtkIdType tupleIdx, int comp) const VTK_EXPECTS(0 <= tupleIdx &&
tupleIdx < GetNumberOfTuples()) VTK_EXPECTS(0 <= comp && comp < GetNumberOfComponents())
- ValueType GetTypedComponent(vtkIdType tupleIdx, int comp) const
+ VTKCOMMONCORE_EXPORT ValueType GetTypedComponent(vtkIdType tupleIdx, int comp) const
VTK_EXPECTS(0 <= tupleIdx && GetNumberOfComponents() * tupleIdx + comp < GetNumberOfValues())
VTK_EXPECTS(0 <= comp && comp < GetNumberOfComponents())
{
return this->Buffer->GetBuffer()[this->NumberOfComponents * tupleIdx + comp];
@@ -116,7 +116,7 @@
/**
* Set component @a comp of the tuple at @a tupleIdx to @a value.
*/
- void SetTypedComponent(vtkIdType tupleIdx, int comp, ValueType value) VTK_EXPECTS(0 <= tupleIdx &&
+ VTKCOMMONCORE_EXPORT void SetTypedComponent(vtkIdType tupleIdx, int comp, ValueType value) VTK_EXPECTS(0 <= tupleIdx &&
tupleIdx < GetNumberOfTuples()) VTK_EXPECTS(0 <= comp && comp < GetNumberOfComponents())
- void SetTypedComponent(vtkIdType tupleIdx, int comp, ValueType value)
+ VTKCOMMONCORE_EXPORT void SetTypedComponent(vtkIdType tupleIdx, int comp, ValueType value)
VTK_EXPECTS(0 <= tupleIdx && GetNumberOfComponents() * tupleIdx + comp < GetNumberOfValues())
VTK_EXPECTS(0 <= comp && comp < GetNumberOfComponents())
{
const vtkIdType valueIdx = tupleIdx * this->NumberOfComponents + comp;
@@ -260,11 +260,11 @@
vtkIdType dstStart, vtkIdType n, vtkIdType srcStart, vtkAbstractArray* source) override;
// MSVC doesn't like 'using' here (error C2487). Just forward instead:
Expand All @@ -80,9 +80,9 @@
if (!strcmp(thisClassName, type)) \
{ \
@@ -836,7 +836,7 @@
return superclass::IsTypeOf(type); \
{ \
return this->thisClass::IsTypeOf(type); \
} \
vtkTypeBool IsA(const char* type) override { return this->thisClass::IsTypeOf(type); } \
- static thisClass* SafeDownCast(vtkObjectBase* o) \
+ static VTKCOMMONCORE_EXPORT thisClass* SafeDownCast(vtkObjectBase* o) \
{ \
Expand Down
46 changes: 0 additions & 46 deletions mingw-w64-vtk/008-fix-vtkm_openmp-exported-target.patch

This file was deleted.

Loading

0 comments on commit d94d2ea

Please sign in to comment.