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

Deal with ccache in PATH for bazel builds #4464

Closed
jwnimmer-tri opened this issue Dec 12, 2016 · 6 comments
Closed

Deal with ccache in PATH for bazel builds #4464

jwnimmer-tri opened this issue Dec 12, 2016 · 6 comments

Comments

@jwnimmer-tri
Copy link
Collaborator

When a user has the magic ccache directory in their $PATH, bazel shows weird error messages that don't indicate the root cause of the problem and then fails.

Given that ccache is essentially required to have a good experience when using the CMake backends (ninja, make, etc.), and we can't (or at least shouldn't) have CMake inject ccache onto the path for us, we should do our best to accommodate developers who need to use both build systems from time to time.

If possible, we should either fail-fast in the case of .../lib/ccache on the path, or even better we should automatically remove the entry or otherwise fix the compiler variable(s) so that bazel is happy.

Part of #3129.

@jwnimmer-tri
Copy link
Collaborator Author

FTR idea from another dev: if there's a good ccache env var to turn it off, that would be the easiest solution. That would depend on the failure being at runtime not sandbox time, though.

@jwnimmer-tri
Copy link
Collaborator Author

jwnimmer-tri commented Dec 14, 2016

@jwnimmer-tri
Copy link
Collaborator Author

Okay, while I think there may be cc_toolchain fixes to make this fail-fast or self-repair better, there doesn't seem to be a one-liner fix. I'm going to FAQ it and return later.

@jwnimmer-tri
Copy link
Collaborator Author

For now at least, I'll call the doc fix good enough. I think a toolchain fix is likely to be better done in a PR to upstream code that in our project.

We can revisit if we find lots of Drake Developers complaining.

@david-german-tri
Copy link
Contributor

After a really epic onramp failure today, I'm reopening this.

@david-german-tri
Copy link
Contributor

bazelbuild/bazel#1143 is an obstacle.

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

2 participants