-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Bazel Build error : pybind11:generate_pybind_coverage #14739
Comments
Please post the entire error message, and also the answers to the helpful information questions (OS, compiler, etc). |
OS : Ubuntu 20.04
|
Hmm, interesting. That's a new one to me. (Aside: the "python2" vs "python3" warning text is a side-effect of error reporting; this is not a python version problem.) The Is there any chance that your machine is running out of RAM? If so, try creating a file named |
Not really I tried with single linke |
To check, you've already run Is either |
I did run
|
Given that Drake has continuous integration builds that test this exact configuration (Ubuntu 20.04, GCC 9.3), there must be something else present in your environment that differs from our default builds. I'm going to need more information to try to reproduce your problem. What revision (git commit hash) of Drake are you using)? What is the exact command line you are running to perform the build? What is the output of What does What does What does |
So below is the feedback that I have : What revision (git commit hash) of Drake are you using)?
What is the exact command line you are running to perform the build? What is the output of env (a dump of all of your environment variables)?
What does which gcc report? What does file /usr/bin/gcc report? |
Hmm, that
|
I did |
Here's a patch to print which library we're trying to use: --- a/tools/workspace/pybind11/pybind_coverage_libclang_parser.py
+++ b/tools/workspace/pybind11/pybind_coverage_libclang_parser.py
@@ -161,6 +161,7 @@ def write_to_file(arr, file_name):
def get_tokens(filename):
+ print(f"Using parsing library {cindex.conf.lib._name}")
tu = cindex.TranslationUnit.from_source(filename, ["-std=c++17"])
FILE = tu.get_file(bytes(filename, 'utf8'))
Can you add that and see what it prints? When operating correctly, I see this output:
After that, here's how to check for any stray library dependencies:
When operating correctly, I see this output:
In both cases, I'm wondering if you might have software installed into Another option would be to try the Drake build in a clean terminal (one that doesn't have any ROS or FOAM variables set). Those settings are all supposed to be nixed and ignored automatically by Bazel during the build, but it's possible something is leaking through. On another note, while I am curious to figure out why the build is broken (and fix it in Drake proper), I'll also note that For example, if you only need pydrake you can |
I recevied the same output for parsing library
this is becoming difficult to resolve |
At this point, I am not yet sure what to try next. Skipping that problematic build target (by not building
|
As a workaround, here's a patch you could apply to disable the problematic target: --- a/bindings/pydrake/BUILD.bazel
+++ b/bindings/pydrake/BUILD.bazel
@@ -580,6 +580,7 @@
class_coverage = ":class_coverage.csv",
file_coverage = ":file_coverage.csv",
pybind_coverage_data = [":pybind_coverage_data"],
+ tags = ["manual"],
xml_docstrings = ":documentation_pybind.xml",
)
Given that, and my inability to reproduce the problem, I'm going to close this out for now. If you find out anything new, please post back here. I do want to fix this if its a problem in Drake, but can't really do anything until I can reproduce the problem. |
We should suppress that at this stage. I will open an issue. I nuked it in Russ's repo's somehow. |
Ive been trying to compile using Bazel build however I keep getting the below error is there anyway around it?
Note: The failure of target //tools/workspace/pybind11:generate_pybind_coverage (with exit code 1) may have been caused by the fact that it is running under Python 3 instead of Python 2. Examine the error to determine if that appears to be the problem. Since this target is built in the host configuration, the only way to change its version is to set --host_force_python=PY2, which affects the entire build.
The text was updated successfully, but these errors were encountered: