Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
andy31415 opened this issue Nov 14, 2023 · 1 comment · Fixed by #30473 or #30493
Closed

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

andy31415 opened this issue Nov 14, 2023 · 1 comment · Fixed by #30473 or #30493

Comments

@andy31415
Copy link
Contributor

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.

@andy31415
Copy link
Contributor Author

Re-open: the fix we have for m5stack does not work for other examples, where path is likely different. In particular efr32-brd4161a-lock-rpc-openthread_mtd compilation fails

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant