Commit a4d442c
authored
VTK: fix clang compatibility (spack#50117)
This is an implementation of the patches from Dimitry Andric described here to fix compatibility with vtk 9.2+ and clang 19+ derivative compilers including clang and apple-clang (and oneapi, but I have not tested). The patch is safe (afaik) to apply to non-clang compilers.
I have split the original patch so each part can be applied individually.
Patch 1:
std::char_traits<> is now only provided for char, char8_t, char16_t, char32_t and wchar_t, and any instantiation for other types will fail. [...] This is actually a problem in the vendored version of Victor Zverovich's
fmt library [2]. More recent versions of this library have completely
rewritten this part of the header, so work around the issue by making
the basic_string_view<char8_t> part conditional on char8_t being
actually available. (This is only in C++20 and later.)
This impacts vtk@9.2:9.4.
Patch 2:
There is also a typo that was fixed upstream in vtk 9.4+ that the clang compilers choke on. This is reported in spack#49623.
This impacts vtk@9.2:9.3.1 parent 4ae60f1 commit a4d442c
File tree
3 files changed
+40
-0
lines changed- var/spack/repos/spack_repo/builtin/packages/vtk
3 files changed
+40
-0
lines changedLines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
263 | 274 | | |
264 | 275 | | |
265 | 276 | | |
| |||
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments