COMP: Add ITKZLIB private dependency to ITKReview#6433
Conversation
itkVoxBoCUBImageIO.cxx calls itkzlib_gz* but ITKZLIB was dropped from the link closure when module dependencies moved to COMPILE_DEPENDS (ada67f6), leaving libITKReview with undefined zlib symbols in shared-library builds. Assisted-by: Claude Code — root-cause analysis from ITKSphinxExamples CI logs
|
Audited all of ITK for further instances of this issue: ITKReview was the only link-breaking case. A second, compile-time-only gap in Montage is fixed in the follow-up commit. Audit method and findingsScanned every non-ThirdParty module's
All other modules declare their third-party dependencies correctly. Rationale for the Montage commit: Eigen is header-only, so the missing declaration cannot cause a link failure; Montage currently compiles only because |
itkTileMontage.hxx is an installed header that includes itk_eigen.h, so consumers need the Eigen include path too; declare it under DEPENDS like every other ITKEigen3 consumer.
cbc3ea0 to
628a534
Compare
This comment was marked as resolved.
This comment was marked as resolved.
blowekamp
left a comment
There was a problem hiding this comment.
Please just simplify/correct the added documentation for COMPILE_DEPENDS.
a780e38 to
eeef992
Compare
|
LGTM. Thank for updating the sphinx examples too! |
fcfd098
into
InsightSoftwareConsortium:main
Fixes the
libITKReviewshared-library link failure (undefined_itkzlib_gz*symbols) seen in ITKSphinxExamples python-superbuild CI by addingITKZLIBto the module'sPRIVATE_DEPENDS.Root cause and verification
itkVoxBoCUBImageIO.cxxincludesitk_zlib.hand callsitkzlib_gzopen/gzread/gzwrite/..., but ada67f6 ("COMP: Update ITKReview depends and linkage") moved all module dependencies exceptITKIOImageBasetoCOMPILE_DEPENDS, dropping zlib from the link closure.ITKZLIBwas never declared in either list.The failure only manifests in
BUILD_SHARED_LIBS=ONbuilds (e.g. Python wrapping), which is why ITK's own static-build CI stayed green. First observed in ITKSphinxExamples CI:https://github.com/InsightSoftwareConsortium/ITKSphinxExamples/actions/runs/27319825769/job/80794743298
Reproduced and fix verified locally on macOS arm64 (AppleClang, Release, shared libs,
Module_ITKReview=ON,ITK_BUILD_DEFAULT_MODULES=ON,ITK_LEGACY_REMOVE=ON): link succeeds andotool -Lshows@rpath/libitkzlib-6.0.1.dylib.PRIVATE_DEPENDSmatches the pattern used by ITKIOVTK and ITKIOGIPL, since zlib is referenced only from the.cxx, not from module headers.