rocksdb icon indicating copy to clipboard operation
rocksdb copied to clipboard

error: 'InstantiateTestCase_P_IsDeprecated' is deprecated: INSTANTIATE_TEST_CASE_P is deprecated, please use INSTANTIATE_TEST_SUITE_P

Open yurivict opened this issue 1 year ago • 1 comments

Build fails:

env/env_basic_test.cc:104:1: error: 'InstantiateTestCase_P_IsDeprecated' is deprecated: INSTANTIATE_TEST_CASE_P is deprecated, please use INSTANTIATE_TEST_SUITE_P [-Werror,-Wdeprecated-declarations]
  104 | INSTANTIATE_TEST_CASE_P(EnvDefault, EnvBasicTestWithParam,
      | ^
/usr/local/include/gtest/gtest-param-test.h:539:38: note: expanded from macro 'INSTANTIATE_TEST_CASE_P'
  539 |   static_assert(::testing::internal::InstantiateTestCase_P_IsDeprecated(), \
      |                                      ^
/usr/local/include/gtest/internal/gtest-internal.h:1244:1: note: 'InstantiateTestCase_P_IsDeprecated' has been explicitly marked deprecated here
 1244 | GTEST_INTERNAL_DEPRECATED(
      | ^
/usr/local/include/gtest/internal/gtest-port.h:2383:59: note: expanded from macro 'GTEST_INTERNAL_DEPRECATED'
 2383 | #define GTEST_INTERNAL_DEPRECATED(message) __attribute__((deprecated(message)))
      |                                                           ^
env/env_basic_test.cc:106:1: error: 'InstantiateTestCase_P_IsDeprecated' is deprecated: INSTANTIATE_TEST_CASE_P is deprecated, please use INSTANTIATE_TEST_SUITE_P [-Werror,-Wdeprecated-declarations]
  106 | INSTANTIATE_TEST_CASE_P(EnvDefault, EnvMoreTestWithParam,
      | ^
/usr/local/include/gtest/gtest-param-test.h:539:38: note: expanded from macro 'INSTANTIATE_TEST_CASE_P'
  539 |   static_assert(::testing::internal::InstantiateTestCase_P_IsDeprecated(), \
      |                                      ^
/usr/local/include/gtest/internal/gtest-internal.h:1244:1: note: 'InstantiateTestCase_P_IsDeprecated' has been explicitly marked deprecated here
 1244 | GTEST_INTERNAL_DEPRECATED(
      | ^
/usr/local/include/gtest/internal/gtest-port.h:2383:59: note: expanded from macro 'GTEST_INTERNAL_DEPRECATED'
 2383 | #define GTEST_INTERNAL_DEPRECATED(message) __attribute__((deprecated(message)))
      |                                                           ^
env/env_basic_test.cc:109:1: error: 'InstantiateTestCase_P_IsDeprecated' is deprecated: INSTANTIATE_TEST_CASE_P is deprecated, please use INSTANTIATE_TEST_SUITE_P [-Werror,-Wdeprecated-declarations]
  109 | INSTANTIATE_TEST_CASE_P(MockEnv, EnvBasicTestWithParam,
      | ^
/usr/local/include/gtest/gtest-param-test.h:539:38: note: expanded from macro 'INSTANTIATE_TEST_CASE_P'
  539 |   static_assert(::testing::internal::InstantiateTestCase_P_IsDeprecated(), \
      |                                      ^
/usr/local/include/gtest/internal/gtest-internal.h:1244:1: note: 'InstantiateTestCase_P_IsDeprecated' has been explicitly marked deprecated here
 1244 | GTEST_INTERNAL_DEPRECATED(
      | ^
/usr/local/include/gtest/internal/gtest-port.h:2383:59: note: expanded from macro 'GTEST_INTERNAL_DEPRECATED'
 2383 | #define GTEST_INTERNAL_DEPRECATED(message) __attribute__((deprecated(message)))
      |                                                           ^
env/env_basic_test.cc:113:1: error: 'InstantiateTestCase_P_IsDeprecated' is deprecated: INSTANTIATE_TEST_CASE_P is deprecated, please use INSTANTIATE_TEST_SUITE_P [-Werror,-Wdeprecated-declarations]
  113 | INSTANTIATE_TEST_CASE_P(EncryptedEnv, EnvBasicTestWithParam,
      | ^
/usr/local/include/gtest/gtest-param-test.h:539:38: note: expanded from macro 'INSTANTIATE_TEST_CASE_P'
  539 |   static_assert(::testing::internal::InstantiateTestCase_P_IsDeprecated(), \
      |                                      ^
/usr/local/include/gtest/internal/gtest-internal.h:1244:1: note: 'InstantiateTestCase_P_IsDeprecated' has been explicitly marked deprecated here
 1244 | GTEST_INTERNAL_DEPRECATED(
      | ^
/usr/local/include/gtest/internal/gtest-port.h:2383:59: note: expanded from macro 'GTEST_INTERNAL_DEPRECATED'
 2383 | #define GTEST_INTERNAL_DEPRECATED(message) __attribute__((deprecated(message)))
      |                                                           ^
env/env_basic_test.cc:115:1: error: 'InstantiateTestCase_P_IsDeprecated' is deprecated: INSTANTIATE_TEST_CASE_P is deprecated, please use INSTANTIATE_TEST_SUITE_P [-Werror,-Wdeprecated-declarations]
  115 | INSTANTIATE_TEST_CASE_P(EncryptedEnv, EnvMoreTestWithParam,
      | ^
/usr/local/include/gtest/gtest-param-test.h:539:38: note: expanded from macro 'INSTANTIATE_TEST_CASE_P'
  539 |   static_assert(::testing::internal::InstantiateTestCase_P_IsDeprecated(), \
      |                                      ^
/usr/local/include/gtest/internal/gtest-internal.h:1244:1: note: 'InstantiateTestCase_P_IsDeprecated' has been explicitly marked deprecated here
 1244 | GTEST_INTERNAL_DEPRECATED(
      | ^
/usr/local/include/gtest/internal/gtest-port.h:2383:59: note: expanded from macro 'GTEST_INTERNAL_DEPRECATED'
 2383 | #define GTEST_INTERNAL_DEPRECATED(message) __attribute__((deprecated(message)))
      |                                                           ^
env/env_basic_test.cc:118:1: error: 'InstantiateTestCase_P_IsDeprecated' is deprecated: INSTANTIATE_TEST_CASE_P is deprecated, please use INSTANTIATE_TEST_SUITE_P [-Werror,-Wdeprecated-declarations]
  118 | INSTANTIATE_TEST_CASE_P(MemEnv, EnvBasicTestWithParam,
      | ^
/usr/local/include/gtest/gtest-param-test.h:539:38: note: expanded from macro 'INSTANTIATE_TEST_CASE_P'
  539 |   static_assert(::testing::internal::InstantiateTestCase_P_IsDeprecated(), \
      |                                      ^
/usr/local/include/gtest/internal/gtest-internal.h:1244:1: note: 'InstantiateTestCase_P_IsDeprecated' has been explicitly marked deprecated here
 1244 | GTEST_INTERNAL_DEPRECATED(
      | ^
/usr/local/include/gtest/internal/gtest-port.h:2383:59: note: expanded from macro 'GTEST_INTERNAL_DEPRECATED'
 2383 | #define GTEST_INTERNAL_DEPRECATED(message) __attribute__((deprecated(message)))
      |                                                           ^
env/env_basic_test.cc:143:1: error: 'InstantiateTestCase_P_IsDeprecated' is deprecated: INSTANTIATE_TEST_CASE_P is deprecated, please use INSTANTIATE_TEST_SUITE_P [-Werror,-Wdeprecated-declarations]
  143 | INSTANTIATE_TEST_CASE_P(CustomEnv, EnvBasicTestWithParam,
      | ^
/usr/local/include/gtest/gtest-param-test.h:539:38: note: expanded from macro 'INSTANTIATE_TEST_CASE_P'
  539 |   static_assert(::testing::internal::InstantiateTestCase_P_IsDeprecated(), \
      |                                      ^
/usr/local/include/gtest/internal/gtest-internal.h:1244:1: note: 'InstantiateTestCase_P_IsDeprecated' has been explicitly marked deprecated here
 1244 | GTEST_INTERNAL_DEPRECATED(
      | ^
/usr/local/include/gtest/internal/gtest-port.h:2383:59: note: expanded from macro 'GTEST_INTERNAL_DEPRECATED'
 2383 | #define GTEST_INTERNAL_DEPRECATED(message) __attribute__((deprecated(message)))
      |                                                           ^
env/env_basic_test.cc:146:1: error: 'InstantiateTestCase_P_IsDeprecated' is deprecated: INSTANTIATE_TEST_CASE_P is deprecated, please use INSTANTIATE_TEST_SUITE_P [-Werror,-Wdeprecated-declarations]
  146 | INSTANTIATE_TEST_CASE_P(CustomEnv, EnvMoreTestWithParam,
      | ^
/usr/local/include/gtest/gtest-param-test.h:539:38: note: expanded from macro 'INSTANTIATE_TEST_CASE_P'
  539 |   static_assert(::testing::internal::InstantiateTestCase_P_IsDeprecated(), \
      |                                      ^
/usr/local/include/gtest/internal/gtest-internal.h:1244:1: note: 'InstantiateTestCase_P_IsDeprecated' has been explicitly marked deprecated here
 1244 | GTEST_INTERNAL_DEPRECATED(
      | ^
/usr/local/include/gtest/internal/gtest-port.h:2383:59: note: expanded from macro 'GTEST_INTERNAL_DEPRECATED'
 2383 | #define GTEST_INTERNAL_DEPRECATED(message) __attribute__((deprecated(message)))
      |                                                           ^
8 errors generated.

Version: 9.7.2 clang-18 FreeBSD 14.1

yurivict avatar Oct 15 '24 17:10 yurivict

i too was snagged just here

seemed to be caused by presence of googletest-1.16.0 (devel/googletest) on the build system

the build was affected by onetbb-2022.1.0_1 (devel/onetbb) also

removed those for successful build of rocksdb-10.1.3 using FreeBSD-13.5-RELEASE-p1/amd64

NatUni avatar May 14 '25 19:05 NatUni