Repository navigation
cmake: also rewrite assimp's stale windows z.lib to ZLIB::ZLIB - #715
Merged
Merged
Conversation
The defensive rewrite of assimp's exported zlib link matched libz.* and zlib.*, but an assimp republished on the windows builder exports $<LINK_ONLY:.../cvcpkg-prefix-assimp-*/lib/z.lib> (zlib's CMake names its windows import library z.lib). Neither pattern matched, so the builder-absolute path survived into cvc.dll's link: `ninja: error: ...lib/z.lib, needed by bin/cvc.dll, missing` in the windows recipe lane and `nvlink fatal: Could not open input file ...lib/z.lib` in package-windows (red on master since the republish). Match a path ending in /z.lib or \z.lib too, through to the end of its list entry so a $<LINK_ONLY:...> wrapper does not leave a stray '>'.
transfix
force-pushed
the
fix/assimp-windows-zlib-export
branch
from
October 19, 2026 06:06
d521251 to
4990578
Compare
With the build-side rewrite fixed, the windows recipe lane got as far as its consumer smoke test and failed there: `LNK1181: cannot open input file ...cvcpkg-prefix-assimp-*\lib\z.lib` in smoke.vcxproj. cvcConfig.cmake re-finds assimp for every consumer and carries its own copy of the stale-zlib rewrite, with the old libz/zlib-only pattern. Give it the same pattern as src/cvc/CMakeLists.txt.
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.
package-windowsis red on master, and the Windows recipe lane is red on every open PR. Both fail on an absolute path into the Windows builder's sandbox:ninja: error: 'C:/Users/tfx/cvcpkg-builder/cvcpkg-job-assimp-in48sza4/cvcpkg-prefix-assimp-phowce8c/lib/z.lib', needed by 'bin/cvc.dll', missingnvlink fatal : Could not open input file '.../lib/z.lib'(the CUDA device link)The path comes from assimp's exported
INTERFACE_LINK_LIBRARIES. libcvc already rewrites assimp's stale zlib entry toZLIB::ZLIB(#158), but it matched onlylibz.*andzlib.*. The republished Windows assimp names zlib's import libraryz.lib, so the entry slipped through. #704, #707 and #710 passed these lanes before the republish.The fix also matches a path ending in
/z.libor\z.lib, through to the end of its list entry, because the export wraps it as$<LINK_ONLY:…/lib/z.lib>. The first push stopped atz.liband leftZLIB::ZLIB>, which configure rejected; this version consumes the wrapper. I checked the pattern withcmake -Pagainst all three zlib forms, with both slash styles, bare and inside$<LINK_ONLY:>. Each becomesZLIB::ZLIB, andzstd.lib,libzstd.aandbz2.libare left alone.The second commit gives
cvcConfig.cmake, which every consumer of libcvc loads, the same pattern. Once libcvc itself linked, the Windows recipe lane failed one step later, in its consumer smoke test:LNK1181: cannot open input file …\lib\z.libinsmoke.vcxproj. That config re-finds assimp for consumers and had its own copy of the old pattern. I checked the configured template's pattern withcmake -Ptoo.Not verified locally: there's no Windows here, so this PR's Windows lanes are the test. The real fix is a relocatable assimp export (the libcvc-deps follow-up the CMake comment names). This keeps libcvc building until then.