You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ports whose Windows build needs a host-only helper (e.g. vcpkg-msbuild, which has "supports": "native & windows") have no correct platform expression for that dependency:
"platform": "windows & !mingw" is evaluated against the target triplet, so cross-compiling e.g. libsodium:x64-windows from a Linux host fails during planning with "vcpkg-msbuild is only supported on 'native & windows', which does not match x64-linux" — even when the port would take a non-msbuild code path for that build.
"platform": "windows & !mingw & native" fixes cross resolution, but native compares triplet names, so any Windows triplet named differently from the host triplet regresses: libsodium:x64-windows-static on an x64-windows host is not native, the dependency is dropped, and the msbuild path fails. See the review discussion in [libsodium] support non-MSVC compilers on Windows via the make-based … vcpkg#52803, where exactly this trade-off came up.
What seems to be missing is a way to express "this dependency is needed when the host can run it / is Windows". Possible directions:
evaluate the platform expression of "host": true dependencies against the host triplet instead of the target triplet (arguably the intuitive semantics, but a behavior change);
or add a host-context predicate to platform expressions (e.g. host_windows, or a general $host(...) context).
The workaround today is --allow-unsupported, which turns a targeted constraint into a blunt instrument for the whole install plan.
Ports whose Windows build needs a host-only helper (e.g.
vcpkg-msbuild, which has"supports": "native & windows") have no correct platform expression for that dependency:"platform": "windows & !mingw"is evaluated against the target triplet, so cross-compiling e.g.libsodium:x64-windowsfrom a Linux host fails during planning with "vcpkg-msbuild is only supported on 'native & windows', which does not match x64-linux" — even when the port would take a non-msbuild code path for that build."platform": "windows & !mingw & native"fixes cross resolution, butnativecompares triplet names, so any Windows triplet named differently from the host triplet regresses:libsodium:x64-windows-staticon anx64-windowshost is notnative, the dependency is dropped, and the msbuild path fails. See the review discussion in [libsodium] support non-MSVC compilers on Windows via the make-based … vcpkg#52803, where exactly this trade-off came up.What seems to be missing is a way to express "this dependency is needed when the host can run it / is Windows". Possible directions:
platformexpression of"host": truedependencies against the host triplet instead of the target triplet (arguably the intuitive semantics, but a behavior change);host_windows, or a general$host(...)context).The workaround today is
--allow-unsupported, which turns a targeted constraint into a blunt instrument for the whole install plan.