Repository navigation
Description
Symptom
Running bash test --cpp (non-clean) after adding new test files triggered a Meson reconfigure that aborted during the compiler probe phase with:
WARNING: No include directory found parsing "...\zccache.exe ...\ctc-clang++.exe -xc++ -E -v -" output
ERROR: C++ Compiler does not support -std=c++11
A full log can be found at C:\Users\niteris\dev\fastled\.build\meson-quick\meson-logs\meson-log.txt
bash test --cpp --clean immediately afterwards completed successfully (308/308 tests passing in ~265s).
Repro context
- Platform: Windows 10 Pro 19045, PowerShell
- Branch:
fix/native-input-gamut-default-2710(PR fix(rgbw): default source = native LED gamut + D65; named-gamut opt-in #2711) - Files touched in the session before failure:
src/fl/gfx/rgbw.{h,cpp.hpp},tests/fl/gfx/rgbww.cpp(extended with a new test case) - Meson reported
Detected test file changes: Added: 225 test filesbefore the failure — that's the trigger that kicked off the auto-reconfigure
The trigger pattern appears to be: test-discovery cache invalidation → in-place Meson reconfigure → compiler probe failure.
Hypothesis
The recent fast-native-file optimization (memory note 2026-03-07, ci/meson/build_config.py:_resolve_fast_native_entries) replaced the clang-tool-chain-sccache-cpp.EXE Python wrapper with [sccache, ctc-clang++.exe, --target=..., flags...]. On a fresh --clean setup this probes cleanly, but on an in-place reconfigure the zccache-wrapped probe ... -xc++ -E -v - apparently returns output Meson can't parse for include directories. After the include-dir parse fails, the -std=c++11 capability probe also fails (likely because Meson now has no -isystem paths to use).
Possible interactions to investigate:
- Stale
meson-private/sanitycheck/*or compiler-cache entries left over from the prior session interact badly with the new native-file shape. zccachewraps the-v -Eprobe in a way that suppresses or reorders the include-directory output Meson scans.- The 225-test-file mass reconfigure hits a different probe path than incremental reconfigure does.
Workaround
bash test --cpp --clean works around it but throws away the incremental-build advantage. Adding new tests shouldn't force a full clean rebuild.
Suggested investigation
- Inspect
.build/meson-quick/meson-logs/meson-log.txtimmediately after the failure (the successful clean rebuild overwrote it in my repro — needs to be reproduced and captured before retry). - Compare zccache-wrapped vs. raw-binary output of
clang++ -xc++ -E -v -to see whether the wrapper drops the#include <...> search starts here:block that Meson parses. - Check whether
meson reconfigure(as opposed to first-time setup) calls into_resolve_fast_native_entries()cleanly, or whether it reuses the prior native-file content.
Defaults used while filing this issue
I picked these defaults — edit on GitHub if any are wrong:
- Title focused on the user-visible C++11 symptom rather than the suspected zccache parse failure root cause.
- Labels:
type: bug,area: ci,priority: low(low-frequency dev-loop annoyance, no CI impact since CI uses fresh clones),status: triage. - No reproducer steps beyond what's above — the failure log was overwritten by the successful
--cleanretry.
🤖 Filed via Claude Code during PR #2711 follow-up work.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
zackees commentedon Jun 5, 2026
Investigation report
Reproduced the warning string on this Windows 10 box and traced the full code path. Root cause is zccache wrapping the meson include-dir probe, not a stale-cache issue. The "No include directory found" warning is benign in isolation but cascades when zccache adds enough latency / pipe weirdness that subsequent capability probes time out on the daemon and return non-zero — at which point
-std=c++11: NOand meson aborts.Code path
ci/meson/build_config.py:setup_meson_build->write_meson_native_file->_resolve_fast_native_entries(inci/meson/native_launchers.py:296) emits the cpp entry as[<zccache path>, <ctc-clang++ path>]whenever acache_binaryis resolved. The resultingmeson_native.txtline:Meson reads this in
mesonbuild/envconfig.py:BinaryTable.parse_entry(lines 462-477). It only strips a leading element from the compiler list when that element is the literal string'ccache'or'sccache'. Any other prefix (full path,'zccache', etc.) is treated as the actual compiler, and the rest of the list is passed as arguments. So meson never knows zccache is a wrapper.Meson then runs the include-dir probe via
mesonbuild/compilers/mixins/gnu.py:gnulike_default_include_dirs(line 319):That becomes
zccache.exe ctc-clang++.exe -xc++ -E -v -, reading from stdin.The probe is called from
GnuLikeCompiler.get_default_include_dirs(line 401) withget_exelist(ccache=False)— meson DOES try to exclude ccache from the probe (seecompilers.py:601-602), but only the prefixes meson recognizes get stripped. Since meson didn't recognize zccache, the full wrapped command runs anyway.Live reproduction of the wrapped probe (this Windows 10 + zccache 1.11.14)
Bare compiler (works perfectly, returns in <1s):
Zccache-wrapped probe (hangs indefinitely on this box, killed at 90s):
Existing
.build/meson-quick/meson-logs/meson-log.txtfrom a prior session captures the warning at line 1346 followed by three failed compile probes returning-> 1withzccache[err][R]: broken connection to daemon: recv timed out after 300s. The-std=c++11probe at line 1397 happened to succeed in that pass, but on the reconfigure-during-225-file-discovery pass it didn't, hence the original report.Proposed fix (single-PR-sized)
Move zccache out of the meson native file. Wrap compile/link commands at the ninja level instead. Concretely:
ci/meson/native_launchers.py:_resolve_fast_native_entries— drop thecache_binaryparameter from the cc/cxx entries. Emit:Meson now sees the bare compiler. The
-xc++ -E -v -probe runs natively againstctc-clang++.exeand parses cleanly. C++11 capability probe and every other meson probe also runs against the bare compiler.New helper in
ci/meson/meson_markers.py—inject_zccache_wrapper_patch(build_dir, zccache_path). Sibling to the existinginject_ar_optimization_patches(same file, same read-once/write-once pattern, line 181). After meson generatesbuild.ninja, rewrite the two relevant rules in-place:(Same for
c_COMPILER/c_LINKERif C is enabled.) These are the only two rules that should be cached.STATIC_LINKER(ar) is already wrapped byar_content_preserving.pyand should stay that way.Wire the patch call wherever
inject_ar_optimization_patchesis already called:meson_setup_execute.py:run_meson_setup_command(line 630) andmeson_setup_execute.py:handle_skip_meson_setup(line 319).zccache-version invalidation — the existing
markers.zccache_versioncheck inbuild_config.py:279-299still works. When zccache changes, force_reconfigure fires, build.ninja gets regenerated, and the patch re-wraps with the new path.Why this is the right shape
zccachetoparse_entryis the "correct" long-term fix but requires upstream review.--strict-pathsmode, just applied to the build-only command lines.Risk / test plan if implemented
build.ninjarule lines remain editable across meson versions (already pinned to 1.10.x in pyproject, andinject_ar_optimization_patchesalready depends on this exact line shape).bash test --cpp --cleanthenbash test --cpptwice (warm reconfigure path) and confirm the original symptom doesn't reproduce.zccache statuscache hits before/after — incremental rebuilds should still cache.Why not implemented in this iteration
The fix touches the recently-merged zccache+meson-configure pipeline (#2754, #2758, #2761) and changes the long-standing assumption that the native file is the single source of truth for the compile command line. Worth a dedicated PR with a clean diff and the test plan above, not bundled into other work. Filing this report so the next session has the full trace.
Filed via Claude Code while iterating on #2714.
review(meson/zccache): address CodeRabbit feedback on PR #2811
fix(meson): move zccache wrapping to build.ninja post-patch (FastLED#…