Repository navigation
feat: drop vendored libiimod, consume from libcvc-deps - #63
Merged
Merged
Conversation
libcvc has carried a curated subset of IMOD's image I/O library
(libiimod + a few libcfshr files) directly under src/cvc/libiimod/
for years. That copy
* duplicates ~11.5k lines of upstream C in our source tree,
* is included in our code-coverage stats (it sat at 0 %, 3,864
uncovered lines, dragging the headline number down by ~10pp),
* cannot be patched without diverging from upstream,
* never gets updated.
libcvc-deps PR transfix/libcvc-deps#6 promotes libiimod into the
dependency bundle, built from the upstream LabShare-Archive/IMOD
repository at a pinned commit
(8c592ce4cfae5e0748314da56d73334de7465776). The bundle now ships
libiimod.a (or iimod.lib) plus headers under include/libiimod/ and
exports a libiimod::iimod CMake imported target whose PUBLIC
properties carry both the include directory and the NOTIFFLIBS
compile definition.
This change:
* Deletes src/cvc/libiimod/ entirely (27 files, ~11.5k LoC).
* Replaces the inline source/include lists in
src/cvc/CMakeLists.txt with
find_package(libiimod CONFIG REQUIRED)
list(APPEND CVC_LINK_LIBS libiimod::iimod)
when CVC_USING_IMOD_MRC is ON. The CVC_USING_IMOD_MRC
compile definition is still emitted because mrc_io.cpp guards
its libiimod code paths on it.
* Updates README.md to drop the libiimod/ entry from the
src/cvc/ tree diagram.
* Adds a status note to
docs/roadmap/COVERAGE_IMPROVEMENT_PLAN.md explaining the
Phase-3 libiimod scope-out is now mechanically achieved by
removal from this repository.
Locally validated: libcvc-deps third-party/libiimod installed to
/tmp/libiimod-prefix, then libcvc configured with
-DCMAKE_PREFIX_PATH=/tmp/libiimod-prefix -DCVC_USING_IMOD_MRC=ON
and built clean to libcvc.so.3.0. The compile command for
mrc_io.cpp picks up -DCVC_USING_IMOD_MRC, -DNOTIFFLIBS, and
-I.../include/libiimod from the imported target with no further
configuration on the libcvc side.
This PR depends on libcvc-deps shipping a release that includes
libiimod (libcvc-deps PR #6). It should not be merged until that
release is available.
…s-libiimod # Conflicts: # .github/workflows/ci.yml
…eftover)
Resolving the merge conflict between feat/use-libcvc-deps-libiimod and
master left two steps with id: libcvc-deps-windows in the Windows job:
the early one ('Windows speedup', uses matrix.build_type) and a later
duplicate from HEAD (uses Release). GitHub rejected this as an invalid
workflow file (duplicate step id), causing every push-event run to
fail with 0 jobs and no pull_request:synchronize run to fire at all.
Drop the late duplicate; the early step already runs before vcpkg
cache restore and gates all downstream fallback steps via
steps.libcvc-deps-windows.outputs.path.
v1.0.1 macOS bundles shipped a broken VTKPython-targets.cmake that
referenced .cpython-*-darwin.so files not included in the bundle,
causing consumer configure-time failure:
CMake Error at .../VTKPython-targets.cmake:464:
The imported target 'VTK::vtkCommonCorePython' references the file
'.../lib/python3.14/site-packages/vtkmodules/vtkCommonCore.cpython-314-darwin.so'
but this file does not exist.
v1.0.2 builds VTK with -DVTK_WRAP_PYTHON=OFF (we don't consume VTK's
Python bindings anyway). Linux and Windows bundles were also rebuilt
identically.
… Windows debug layout mirror)
…r gtest discovery and ctest gtest_discover_tests' default POST_BUILD mode runs each test executable at build time to enumerate test names. On Windows the consumed DLLs (libcvc-deps' Boost/HDF5/FFTW/Qt6/VTK plus libcvc itself) are not on PATH during 'cmake --build', so MSBuild's spawned discovery process exits with STATUS_DLL_NOT_FOUND (0xc0000135), and CMake aborts the build with 'GoogleTestAddTests.cmake:132: Error running test executable. Result: Exit code 0xc0000135'. Fix by prepending the deps bin dir, the aqt Qt6 bin dir, and the per-config build/bin output dir to PATH in both the Build and Run tests steps (the latter so the tests themselves can launch). Switch Run tests on Windows from bash to pwsh so PATH plumbing is consistent with the rest of the windows packaging job.
vcpkg ships Debug DLLs at debug/bin/ with the same filename as their Release counterparts at bin/ (e.g. both contain hdf5.dll, boost_thread-*-mt-*.dll). When PATH lists bin/ first, a Debug build loads Release DLLs against a Debug import lib, producing CRT/iterator-debug-level mismatches that surface as SEH access violations (0xc0000005) inside libcvc::volume::write (CvcRawRoundTrip) and 'unknown C++ exception' failures inside H5::H5File constructor calls (13 HDF5Test failures). For Debug builds prepend $depsPath\\debug\\bin; for Release builds prepend $depsPath\\bin. Never mix.
…Cored.dll resolution
This was referenced May 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Drops the in-tree copy of libiimod under
src/cvc/libiimod/and consumes it from the libcvc-deps distribution instead.For years libcvc has vendored a curated subset of IMOD's image I/O library (
libiimod/+ a fewlibcfshr/files). That copy:libcvc-deps PR #6 promotes libiimod into the dependency bundle, built from the upstream LabShare-Archive/IMOD repo (archived/read-only) at a pinned SHA. The bundle now ships
libiimod.a/iimod.libplus headers underinclude/libiimod/, and exports alibiimod::iimodimported target whose PUBLIC properties carry the include directory and theNOTIFFLIBScompile definition.Changes
Deletes
src/cvc/libiimod/entirely (27 files, −11,516 LoC).Replaces the inline source/include lists in
src/cvc/CMakeLists.txtwith:CVC_USING_IMOD_MRCis still emitted becausemrc_io.cppguards its libiimod code paths on it.NOTIFFLIBSand theinclude/libiimod/include dir come from the imported target.Updates
README.mdto drop thelibiimod/entry from thesrc/cvc/tree diagram.Adds a status note to
docs/roadmap/COVERAGE_IMPROVEMENT_PLAN.mdexplaining that Phase-3 libiimod scope-out is now mechanically achieved by removing the directory.Local validation
third-party/libiimodstandalone into/tmp/libiimod-prefix.-DCMAKE_PREFIX_PATH=/tmp/libiimod-prefix -DCVC_USING_IMOD_MRC=ON.find_package(libiimod CONFIG REQUIRED)succeeds,mrc_io.cpp's compile command picks up-DCVC_USING_IMOD_MRC,-DNOTIFFLIBS, and-I/tmp/libiimod-prefix/include/libiimodfrom the imported target.libcvc.so.3.0build succeeds with no libiimod-related warnings or errors. libiimod is statically linked into the shared library; no new runtimeNEEDEDentries are introduced.Dependencies / ordering
This PR depends on libcvc-deps shipping a release that includes libiimod (libcvc-deps PR #6). Do not merge until that release is tagged and the libcvc-deps fetch action is pointed at it; otherwise the CI configure step will fail with
find_package(libiimod CONFIG REQUIRED).Diff size