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
The Windows build (vcbuild.bat → Conan → yajl) fails deterministically on GitHub-hosted Windows runners that have picked up a newer Visual Studio/CMake toolchain. yajl/2.1.0's Conan Center recipe's CMakeLists.txt still does cmake_policy(SET CMP0026 OLD), and current CMake has dropped support for CMP0026's OLD behavior entirely, so cmake_policy() itself errors out before configuration can proceed.
Where this was found
Building ModSecurity-nginx's Windows CI job (.github/workflows/test_new.yml, build-windows), which invokes this repo's own Windows build via vcbuild.bat. Not caused by anything in ModSecurity-nginx — it fails inside owasp-modsecurity/ModSecurity's own dependency build step, so any downstream consumer building on an affected Windows toolchain would hit the same thing.
Evidence (from CI log)
yajl/2.1.0: Calling build()
yajl/2.1.0: Apply patch (conan): CMake: fix mingw, disable build of doc/test/perf/example, relocatable shared lib for macos, install DLL into bin folder
yajl/2.1.0: Running CMake.configure()
yajl/2.1.0: RUN: cmake -G "Visual Studio 18 2026" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="C:/Users/runneradmin/.conan2/p/b/yajla281b513a4897/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" "C:/Users/runneradmin/.conan2/p/b/yajla281b513a4897/b/src"
CMake Error at CMakeLists.txt:17 (cmake_policy):
Policy CMP0026 may not be set to OLD behavior because this version of CMake
no longer supports it. The policy was introduced in CMake version 3.0.0,
and use of NEW behavior is now required.
Please either update your CMakeLists.txt files to conform to the new
behavior or use an older version of CMake that still supports the old
behavior. Run cmake --help-policy CMP0026 for more information.
Two further, likely-related errors appear later in the same yajl configure step once the policy issue is worked around/ignored:
CMake Error at reformatter/CMakeLists.txt:38 (GET_TARGET_PROPERTY):
The LOCATION property may not be read from target "json_reformat". Use the
target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.
CMake Error at verify/CMakeLists.txt:32 (GET_TARGET_PROPERTY):
The LOCATION property may not be read from target "json_verify". Use the
target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.
(GET_TARGET_PROPERTY ... LOCATION on a target is also removed/hard-errors under CMake's CMP0026 NEW behavior — consistent with the same root cause: yajl's bundled CMakeLists.txt predates CMake policies this old CMake no longer tolerates.)
The runner's cmake -G "Visual Studio 18 2026" generator string indicates the GitHub-hosted Windows image has moved to a VS2026-preview-class toolchain with a correspondingly newer bundled CMake.
Impact
Deterministic, not flaky: every Windows build that reaches the yajl step on an affected toolchain fails the same way. Retrying does not help.
Blocks Windows CI for any downstream project (e.g. ModSecurity-nginx) that builds libmodsecurity for Windows via this path.
Suggested fixes (any of)
Pin/patch the yajl Conan recipe/version used by vcbuild.bat to one whose CMakeLists.txt doesn't rely on CMP0026 OLD (or pass a policy override / patch it out during the build).
Pin an explicit, known-compatible CMake version for the Windows build instead of relying on whatever the toolchain/runner provides.
Consider the existing Drop YAJL dependency #3308 ("Drop YAJL dependency") as a longer-term fix that would sidestep this class of issue entirely.
Environment
GitHub-hosted Windows runner (windows-2025 image at the time of writing)
Conan 2.x, yajl/2.1.0 from conancenter
Observed via owasp-modsecurity/ModSecurity-nginx's test_new.ymlbuild-windows job
Summary
The Windows build (
vcbuild.bat→ Conan → yajl) fails deterministically on GitHub-hosted Windows runners that have picked up a newer Visual Studio/CMake toolchain.yajl/2.1.0's Conan Center recipe'sCMakeLists.txtstill doescmake_policy(SET CMP0026 OLD), and current CMake has dropped support forCMP0026'sOLDbehavior entirely, socmake_policy()itself errors out before configuration can proceed.Where this was found
Building
ModSecurity-nginx's Windows CI job (.github/workflows/test_new.yml,build-windows), which invokes this repo's own Windows build viavcbuild.bat. Not caused by anything in ModSecurity-nginx — it fails insideowasp-modsecurity/ModSecurity's own dependency build step, so any downstream consumer building on an affected Windows toolchain would hit the same thing.Evidence (from CI log)
Two further, likely-related errors appear later in the same
yajlconfigure step once the policy issue is worked around/ignored:(
GET_TARGET_PROPERTY ... LOCATIONon a target is also removed/hard-errors under CMake'sCMP0026 NEWbehavior — consistent with the same root cause: yajl's bundledCMakeLists.txtpredates CMake policies this old CMake no longer tolerates.)The runner's
cmake -G "Visual Studio 18 2026"generator string indicates the GitHub-hosted Windows image has moved to a VS2026-preview-class toolchain with a correspondingly newer bundled CMake.Impact
Suggested fixes (any of)
vcbuild.batto one whoseCMakeLists.txtdoesn't rely onCMP0026 OLD(or pass a policy override / patch it out during the build).Environment
yajl/2.1.0from conancenterowasp-modsecurity/ModSecurity-nginx'stest_new.ymlbuild-windowsjob