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

rust_doc_test requires a local C++ toolchain #845

Open
sayrer opened this issue Jul 20, 2021 · 3 comments
Open

rust_doc_test requires a local C++ toolchain #845

sayrer opened this issue Jul 20, 2021 · 3 comments

Comments

@sayrer
Copy link
Contributor

sayrer commented Jul 20, 2021

I ran into problems with running this locally, on a VM with no C++ toolchain available.

---- path/to/lib.rs - DemoStruct::demo_method (line 131) stdout ----
error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)
@sayrer sayrer changed the title rust_doc_test requires a local C++ compiler rust_doc_test requires a local C++ toolchain Jul 20, 2021
@UebelAndre
Copy link
Collaborator

I think this is expected? rustc requires some information from the toolchain so since we're building a test here, we'd need that toolchain to run the compiler, right?

@sayrer
Copy link
Contributor Author

sayrer commented Jul 20, 2021

I don't think it is expected. The other rules, rust_test, cargo_build_script, etc all work without a local C++ toolchain (and instead use the Bazel-supplied cc_toolchain). Maybe something similar to #664 is needed. Looks like it's only failing to find a linker.

@wt
Copy link
Contributor

wt commented Mar 7, 2022

Can you please try this with Bazel 5.0 and see if this worksw with the C++ autoconfigured toolchain?

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

No branches or pull requests

3 participants