-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Problem
C++ components fail to build with clang error:
clang: error: no such file or directory: 'bazel-out/.../calculator_c_component_cppwork/calculator_c.c'
clang: error: no input files
Root Cause
The cpp_component rule uses setup_cpp_workspace_action() which calls the file operations component to copy source files to a _cppwork directory. However, the file operations component is not successfully copying the source files to the expected location.
Build Process Flow
cpp_componentrule processes//examples/cpp_component/calculator:calculator_c_component- Calls
setup_cpp_workspace_action()to prepare workspace - Should copy
src/calculator_c.ctocalculator_c_component_cppwork/calculator_c.c - File copy fails or doesn't happen
- clang tries to compile missing source file and fails
Evidence
- Source file exists:
examples/cpp_component/calculator/src/calculator_c.c✅ - BUILD file correctly references source:
srcs = ["src/calculator_c.c"]✅ - Expected location missing:
calculator_c_component_cppwork/calculator_c.c❌
Impact
- All C++ component builds fail
- Blocks CI with exclusions like
-//examples/cpp_component/... - Affects C++ test targets that depend on C++ components
Files Involved
cpp/defs.bzl-cpp_componentrule implementationtools/bazel_helpers/file_ops_actions.bzl-setup_cpp_workspace_action()tools/file_operations_component/*- File operations WebAssembly component
Investigation Needed
- Check if file_ops_component tool is working correctly
- Verify
setup_cpp_workspace_action()parameter passing - Test file operations component in isolation
- Check if WebAssembly component execution is failing silently
Workaround
Temporarily exclude C++ components from CI with -//examples/cpp_component/... until root cause is fixed.
Metadata
Metadata
Assignees
Labels
No labels