facebook / facebook/rocksdb

Compilation failing due to gtest

Open
#7,416 1 comment 0 reactions 0 assignees View on GitHub
Build up-for-grabs
Dominant language
C++
Stars
32.1k
Forks
6.9k
Avg merge
32m
Merged PRs (30d)
1

Description

The gtest present in `third-party/` is failing to compile because it picks headers (`gtest.h` from another version of gtest installed in my system. The latest gtest have deprecated `TearDownTestCaseFunc` method. Now it has new name - `TearDownTestSuiteFunc`.

### Expected behavior
`-Ithird-party/gtest-1.8` should be the first include_dir while compiling `gtest-all.cc` , so that compiler doesn't pick system headers or the headers from other toolchain (for eg: `$Snappy_INCLUDE_DIRS` ).

### Actual behavior

Compilation should not fail. The gtest present in `third-party/` is failing to compile

### Steps to reproduce the behavior

```
cd $SOURCE_DIR
cmake -DWITH_SNAPPY=1 -DSnappy_LIBRARIES=$TOOLCHAIN_LOCAL/lib/libsnappy.a \
-DSnappy_INCLUDE_DIRS=$TOOLCHAIN_LOCAL/include ..

```

### Error :

```
/Users/mohit.saini/projects/toolchain_builder/build/rocksdb-6.11.4-source/third-party/gtest-1.8.1/fused-src/gtest/gtest-all.cc:4215:20: error: no type named
'TearDownTestCaseFunc' in 'testing::Test'; did you mean 'internal::TearDownTestSuiteFunc'?
Test::TearDownTestCaseFunc tear_down_tc)
^~~~~~~~~~~~~~~~~~~~~~~~~~
internal::TearDownTestSuiteFunc
/usr/local/scaligent/toolchain/local/include/gtest/internal/gtest-internal.h:478:7: note: 'internal::TearDownTestSuiteFunc' declared here
using TearDownTestSuiteFunc = void (*)();
^

```

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.