facebook / facebook/rocksdb

fix build with gflags 2.1.x

Open
#6,628 2 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.