bazelbuild / bazelbuild/rules_rust
rust_bindgen rule cannot find stdarg.h during remote execution
- Dominant language
- Starlark
- Stars
- 843
- Forks
- 651
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 15
Description
When I try to use `rust_bindgen` for the following files, it fails.
foo.h:
```
#include
int call(int foo);
```
foo.cc:
```
#include "foo.h"
int call(int foo) {}
```
BUILD
```
cc_library(
name = "foo",
srcs = ["foo.cc"],
hdrs = ["foo.h"],
)
rust_bindgen(
name = "foo_bindgen",
cc_lib = ":foo",
header = "foo.h",
)
```
Error:
```
ERROR: /home/david/test/BUILD:67:13: Generating bindings for foo.h.. failed: (Exit 1): cargo_bin_bindgen failed: error executing command bazel-out/k8-opt-exec-2B5CBBC6/bin/external/rules_rust_bindgen__bindgen__0_58_1/cargo_bin_bindgen --no-rustfmt-bindings foo.h --output ... (remaining 6 arguments skipped)
foo.h:1:10: fatal error: 'stdarg.h' file not found
foo.h:1:10: fatal error: 'stdarg.h' file not found, err: true
thread 'main' panicked at 'Unable to generate bindings: ()', external/rules_rust_bindgen__bindgen__0_58_1/src/main.rs:54:36
```
Contributor guide
Assessment
This issue has not been assessed yet.