Skip to content

RPC builds fail when PW_ENVIRONMENT_ROOT is set out of tree #30475

@andy31415

Description

Default builds using .environment seem to be ok, however trying to build esp32-m5stack-all-clusters-rpc-ipv6only on the chip-build-vscode image fails with:

ninja: error: '../../../../config/esp32/third_party/pwenv/cipd/packages/pigweed/bin/protoc', needed by 'python/gen/third_party/connectedhomeip/third_party/pigweed/repo/third_party/nanopb/generate_nanopb_proto.pw_pystamp', missing and no known rule to make it

The reason seems to be that google/pigweed@ddbc9fc added support to use pw_env_setup_CIPD_PIGWEED to construct protoc paths and our build system seems to not really create these paths correctly for application builds.

The order of operations seems to be:

  • pigweed bootstrap creates build_overrides/pigweed_environment.gni that contains pw_env_setup_CIPD_PIGWEED = "//../home/vscode/pigweed/env/cipd/packages/pigweed" (when running from /workspace with PW_ENVIRONMENT_ROOT set to /home/vscode/pigweed/env)
  • example applications create a third_party/connectedhomeip subdirectory so that they can reference the SDK as //third_party/connectedhomeip
  • https://github.com/project-chip/connectedhomeip/blob/master/examples/build_overrides/pigweed_environment.gni attempts to load the pigweed_environment.gni and adjust paths by prefixing //third_party/pigweed_environment

This may be ok when paths are within the root, as any paths will go through the symlink at thirtd_party/pigweed_environment. However this fails when relative paths are used.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions