-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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] config.h: No such file or directory #279
Comments
This should be fixed by #277, could you try using the latest glog? |
Closing - please reopen if you're still seeing this with the latest glog. |
It looks like this is still a problem when building without gflags:
|
as reported by @jondo2010: google#279 (comment) Unfortunately, it is not easy to test this in CI with the current structure. The glog_library() macro can only be used once, as it creates various rules with fixed names (eg :gen_sh), and must be used at @com_google_glog//. The only way to use with_gflags=False is to overwrite the root BUILD file.
as reported by @jondo2010: google#279 (comment) This was caused by an operator precendence issue: with_gflags=False would result in copts=[] and the build would not work. This has presumably never been tested. Unfortunately, it is not easy to test this in CI with the current structure. The glog_library() macro can only be used once, as it creates various rules with fixed names (eg :gen_sh), and must be used at @com_google_glog//. The only way to use with_gflags=False is to overwrite the root BUILD file.
@jondo2010 Thanks for the report! Looks like this was never tested, and sadly I can't see an easy way to test this automatically. Let me know if #314 works for you. Also, I could fix this in such a way that it would be tested in CI, but then you'd have to switch from using new_git_repository() to using git_repository() and depending on @com_google_glog//:glog_without_gflags. From a user standpoint, would you prefer that or would it just be a frustrating change? |
When building a Bazel project that imports glog, I get the following error:
ERROR: .../external/com_google_glog/BUILD:5:1: C++ compilation of rule '@com_google_glog//:glog' failed (Exit 1) In file included from external/com_google_glog/src/utilities.h:75:0, from external/com_google_glog/src/demangle.cc:38: external/com_google_glog/src/base/mutex.h:105:64: fatal error: config.h: No such file or directory compilation terminated.
This could be a regression in e6e2e13
bazel/glog.bzl
:Replacing
glog_internal/src/config.h
withconfig.h
fixes the issue.The text was updated successfully, but these errors were encountered: