[vtk] Avoid stdext::checked_array_iterator.#51794
Conversation
|
Withdrawing — switching to a local-only patch in my private vcpkg checkout. The patch (ports/vtk/diy2-fmt-remove-stdext-checked-array-iterator.patch) and its construction notes remain available in the commit if anyone wants to revive it as their own PR. |
|
Is there something wrong with it? (Why withdraw it? Would rather give you credit for the fix if it actually fixes) To be clear I have not reviewed, I just saw linked to my other PR |
|
This patch seems to have worked for me in my local port. Although I am on an older version of the vtk port than the current.
vtk[cgns,core,libharu,libtheora,netcdf,proj,seacas,sql]:x64-windows@9.3.0-pv5.12.1#15 package ABI: accdcd3c7beea8fc4108a4ccd3eb68d053af928ae7a0258325e5aede226ddc79
Building vtk[cgns,core,libharu,libtheora,netcdf,proj,seacas,sql]:x64-windows@9.3.0-pv5.12.1#15...
X:\vcpkgbased\DICOMUtilities\vcpkg/ports\vtk: info: installing overlay port from here
-- Using cached Kitware-VTK-09a76bc55b37caad94d0d8ebe865caaed1b438af.tar.gz
-- Extracting source X:/vcpkgbased/vcpkg/downloads/Kitware-VTK-09a76bc55b37caad94d0d8ebe865caaed1b438af.tar.gz
-- Applying patch ffmpeg.diff
-- Applying patch ffmpeg-8.diff
-- Applying patch FindLZMA.patch
-- Applying patch FindLZ4.patch
-- Applying patch libproj.patch
-- Applying patch mysql.diff
-- Applying patch pegtl.patch
-- Applying patch pythonwrapper.patch
-- Applying patch NoUndefDebug.patch
-- Applying patch fix-using-hdf5.patch
-- Applying patch FindExpat.patch
-- Applying patch cgns.patch
-- Applying patch vtkm.patch
-- Applying patch afxdll.patch
-- Applying patch vtkioss.patch
-- Applying patch jsoncpp.patch
-- Applying patch iotr.patch
-- Applying patch fast-float.patch
-- Applying patch fix-exprtk.patch
-- Applying patch devendor_exodusII.patch
-- Applying patch remove-prefix-changes.patch
-- Applying patch hdf5helper.patch
-- Applying patch opencascade-7.8.0.patch
-- Applying patch no-libharu-for-ioexport.patch
-- Applying patch no-libproj-for-netcdf.patch
-- Applying patch octree.patch
-- Applying patch fix-tbbsmptool.patch
-- Applying patch backport-bda8324.diff
-- Applying patch use-compile-tools.diff
-- Applying patch zspace.diff
-- Applying patch mpi-language.diff
-- Applying patch fix-eigen3.patch
-- Applying patch diy2-fmt-remove-stdext-checked-array-iterator.patch
-- Using source at X:/vcpkgbased/vcpkg/buildtrees/vtk/src/aed1b438af-00b856e7db.clean
|
|
Oops, sorry for the noise. I didn't realize a different version of this patch was merged and was actually in the current port. |
Fixes #51766.
What this fixes
VTK's bundled (pre-7.0) copy of fmtlib at
ThirdParty/diy2/vtkdiy2/include/vtkdiy2/fmt/format.hreferencesstdext::checked_array_iteratorunder#ifdef _SECURE_SCL. This extension has been removed from the MSVC standard library in MSVC 14.51 (VS 2026 Preview), so the build fails with:(full failure log in #51766)
Resolution
Drop the
_SECURE_SCLbranch and keep only the raw-pointer fallback. The patchedmake_checked/checked_ptraliases become unconditional pass-throughs. This is the same approach already accepted in vcpkg for the same removal across five other ports:Files
ports/vtk/diy2-fmt-remove-stdext-checked-array-iterator.patch— the source patchports/vtk/portfile.cmake— register the patchports/vtk/vcpkg.json— port-version 15 → 16versions/v-/vtk.json,versions/baseline.json— version DB bump (viavcpkg x-add-version vtk)Local verification
Built
vtk[core]:x64-windowsagainst this overlay port using MSVC 14.51.36231 (VS 2026 Preview, generatorVisual Studio 18 2026). The failingvtkDIYDataExchanger.cxxtranslation unit now compiles cleanly.Manifest
./vcpkg x-add-version --alland committing the result.