Skip to content

Local host tests fail: zccache PCH alias scan rejects clang-tool-chain's -Wl,-rpath (-Werror) #4973

Closed

Description

@zackees

Problem

Local bash test --cpp fails at compile time before any test runs. The failures are the example DLL wrappers (examples/example-*/.._tests_shared_example_dll_wrapper_template.cpp.o). Other objects, such as tests/fl_stl_asio_error_code.so.p/..., show up red in the same build batch, but every actual error message is this one:

zccache[err][R]: daemon response failure (daemon-error): PCH alias validation failed:
~/.zccache/v1.15.8/tmp/depfiles/<pid>-0/pch-input-view-*/overlay.json: unreadable:
PCH alias scan: compiler failed: [clang-tool-chain] Using bundled LLD linker ...
clang++: error: -Wl,-rpath,~/.clang-tool-chain/clang/linux/x86_64/lib: 'linker' input unused
[-Werror,-Wunused-command-line-argument]

Cause (upstream)

When a PCH input comes in, zccache's PCH alias scan runs the compiler again in compile-only mode with the original -Werror. It does not carry -Wno-unused-command-line-argument. clang-tool-chain's auto-loaded clang++.cfg injects -Wl,-rpath,..., and with no link step that flag counts as unused, so the scan fails. FastLED's own PCH and consumer commands already pass -Wno-unused-command-line-argument (tests/meson.build:44, ci/meson/native/meson.build:584).

Tracked upstream: forge-ci/zccache#1977. Seen on 1.15.6 and 1.15.8.

Tried (no effect)

  • Rerunning, zccache stop (it timed out), and killing the daemon so a fresh one starts.
  • CLANG_TOOL_CHAIN_USE_SYSTEM_LD=1, which only drops the banner.
  • Installing zccache 1.15.6 into .venv, which still routed to the 1.15.8 daemon.

Hosted CI is unaffected. The 124 checks on #4967 are green.

Done when

zccache#1977 ships a fix (or the scan stops forwarding the cfg link flags), the zccache>= floor in pyproject.toml is raised to that release, and bash test --cpp passes locally on a NixOS host with clang-tool-chain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions