fix build with gflags 2.1.x
Open
bug
up-for-grabs
- Dominant language
- C++
- Stars
- 32.1k
- Forks
- 6.9k
- Avg merge
- 32m
- Merged PRs (30d)
- 1
Description
Builds against gflags 2.1.x built with default namespace may encounter errors like:
```
In file included from /home/andrewkr/local/rocksdb/tools/trace_analyzer_tool.cc:49:0:
/home/andrewkr/local/rocksdb/util/gflags_compat.h:11:26: error: ‘google’ has not been declared
#define GFLAGS_NAMESPACE google
```
In gflags 2.1, the namespace changed from google to gflags. Meanwhile, it wasn't until 2.2 that the macro `#define GFLAGS_NAMESPACE ...` was introduced to a header file. So for 2.1 versions, this logic improperly guesses the namespace: https://github.com/facebook/rocksdb/blob/57096ab13e9d373666f099f19d6eb73c6613e797/util/gflags_compat.h#L8-L12.
Contributor guide
Assessment
This issue has not been assessed yet.