Repository navigation
Windows SDK builds keep cmcldeps.exe beside cmake.exe (seed, package, checks); name rc.exe beside CMAKE_MT - #1266
Conversation
…eside CMAKE_MT Both Windows lanes on e500abf: cmake's own build compiled CMakeVersion.rc with whatever rc.exe PATH offered — Resource Compiler 10.0.10011 (the 2015 kit), which rejects CMake's flags with 'RC1107: invalid usage'. rc.exe lives beside mt.exe in the same kit directory; both the cmake and the LLVM configure now pass it as CMAKE_RC_COMPILER.
…s it, the package ships it, both check for it Every Windows source-sdk lane failed building cmake itself at its one .rc file: `fatal error RC1107: invalid usage`. The lane log shows the failing command as ` RC D:\a\...\CMakeVersion.rc <depfile> <res> "Note: including file: " "clang-cl.exe" "rc.exe" -DUNICODE ... /fo <res> <src>` — a leading space where the Ninja generator's RC dependency scanner belongs. CMake resolves `cmcldeps.exe` next to its own executable (cmSystemTools::FindCMakeResources) and clears the path when the file is missing; cmNinjaTargetGenerator then emits the rule with an empty scanner prefix, so cmd runs `RC` from PATH with the scanner's seven positional arguments, and rc.exe rejects them. The Windows seed step copied only cmake.exe and its share/ tree, so the seeded cmake had no scanner. Our own packager selected the same set, so a published Windows SDK could never have bootstrapped an RC build either. - source-sdk: the Windows seed copies cmcldeps.exe beside cmake.exe; the asset usability check requires it (and clang-cl/lld-link, which cmake's MSVC-style build resolves from the bootstrap prefix); the self-check refuses a seeded cmake without it, by name. - build/sdk.w: the Windows package selects bin/cmcldeps.exe and the bootstrap set requires it together with clang-cl.exe and lld-link.exe. The previous commit on this branch (CMAKE_RC_COMPILER) was a misdiagnosis: the pre-fix lanes already used the Kit 26100 rc.exe. Naming the RC compiler explicitly beside CMAKE_MT is kept as toolchain explicitness, not as a fix.
|
Battery on |
…ailed to start on a runner-bootstrapped SDK
With cmcldeps.exe in place, the Windows lanes build cmake through all
1071 targets and then fail at `cmake -P cmake_install.cmake`: the just-built
cmake.exe does not start ("The application has failed to start because its
side-by-side configuration is incorrect"), i.e. its embedded application
manifest is invalid.
With clang-cl (MSVC_VERSION > 1600) CMake's vs_link_exe takes the
LinkEmbedsManifest path and hands the linker
`/MANIFEST:EMBED,ID=1 /MANIFESTINPUT:cmake.version.manifest`; the linker
merges its own default manifest (a trustInfo/requestedExecutionLevel block)
with that file. lld-link emits the block without an xmlns, and a lld-link
built with libxml2 — the official LLVM Windows releases force it on, and
generation zero bootstraps from the runner's LLVM — merges it with LLVM's
internal WindowsManifestMerger, which tags the block's attributes with the
nearest default namespace (`ms_asmv1:level`); Windows rejects that
manifest. Our own lld (no libxml2) shells out to mt.exe and is not affected,
which is why the stage-2 SDK never hit it and the seed's cmake did.
cmake.version.manifest already carries the requestedExecutionLevel, so the
linker's block is redundant: `/MANIFESTUAC:NO` leaves it out and the merge
has nothing to mis-tag. Applied for every Windows cmake build so both
generations link the same way.
|
Fix |
|
Battery on |
|
Fix |
|
Battery on |
|
Re-pushed |
Every Windows
source-sdklane failed building cmake itself at its one.rcfile:fatal error RC1107: invalid usage.Root cause (from the lane log, byte for byte): the failing command is
RC D:\a\...\CMakeVersion.rc <depfile> <res> "Note: including file: " "clang-cl.exe" "rc.exe" -DUNICODE … /fo <res> <src>— a leading space where the Ninja generator's RC dependency scannercmcldeps.exebelongs. CMake resolvescmcldeps.exebeside its own executable (cmSystemTools::FindCMakeResources) and clears the path when it is missing;cmNinjaTargetGeneratorthen emits the rule with an empty prefix, soRCruns from PATH with the scanner's seven positional arguments and rejects them.The Windows seed copied only
cmake.exe+share/, so the seeded cmake had no scanner. Our packager (build/sdk.w) selected the same set, so a published Windows SDK could never have bootstrapped an RC build either.Fix (
779a7102)source-sdk: the Windows seed copiescmcldeps.exebesidecmake.exe; the asset usability check requires it (andclang-cl/lld-link, which cmake's MSVC-style build resolves from the bootstrap prefix); the self-check refuses a seeded cmake without it, by name.build/sdk.w: the Windows package selectsbin/cmcldeps.exe; the bootstrap set requires it withclang-cl.exeandlld-link.exe.Not the fix (
00995d64):CMAKE_RC_COMPILERbesideCMAKE_MTwas a misdiagnosis — the pre-fix lanes already used the Kit 26100rc.exe. Kept as toolchain explicitness only.Battery on
779a7102: running; verdict posted below.