Skip to content
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

Tests fail to compile #2246

Closed
yurivict opened this issue Jun 24, 2024 · 1 comment
Closed

Tests fail to compile #2246

yurivict opened this issue Jun 24, 2024 · 1 comment

Comments

@yurivict
Copy link
Contributor

Errors:

/usr/ports/devel/folly/work/folly-2024.06.24.00/folly/concurrency/test/ConcurrentHashMapBench.cpp:25:1: error: a type specifier is required for all declarations
   25 | DEFINE_int32(reps, 10, "number of reps");
      | ^
/usr/ports/devel/folly/work/folly-2024.06.24.00/folly/concurrency/test/ConcurrentHashMapBench.cpp:25:14: error: use of undeclared identifier 'reps'
   25 | DEFINE_int32(reps, 10, "number of reps");
      |              ^
/usr/ports/devel/folly/work/folly-2024.06.24.00/folly/concurrency/test/ConcurrentHashMapBench.cpp:26:1: error: a type specifier is required for all declarations
   26 | DEFINE_int32(ops, 1000 * 1000, "number of operations per rep");
      | ^
/usr/ports/devel/folly/work/folly-2024.06.24.00/folly/concurrency/test/ConcurrentHashMapBench.cpp:26:14: error: use of undeclared identifier 'ops'
   26 | DEFINE_int32(ops, 1000 * 1000, "number of operations per rep");
      |              ^
/usr/ports/devel/folly/work/folly-2024.06.24.00/folly/concurrency/test/ConcurrentHashMapBench.cpp:27:14: error: use of undeclared identifier 'size'; did you mean 'std::size'?
   27 | DEFINE_int64(size, 10 * 1000 * 1000, "size");
      |              ^~~~
      |              std::size
/usr/include/c++/v1/__iterator/size.h:27:38: note: 'std::size' declared here
   27 | _LIBCPP_HIDE_FROM_ABI constexpr auto size(const _Cont& __c) _NOEXCEPT_(noexcept(__c.size())) -> decltype(__c.size()) {
      |                                      ^
/usr/ports/devel/folly/work/folly-2024.06.24.00/folly/concurrency/test/ConcurrentHashMapBench.cpp:27:1: error: a type specifier is required for all declarations
   27 | DEFINE_int64(size, 10 * 1000 * 1000, "size");
      | ^
/usr/ports/devel/folly/work/folly-2024.06.24.00/folly/concurrency/test/ConcurrentHashMapBench.cpp:57:14: error: use of undeclared identifier 'FLAGS_reps'; did you mean 'FLAGS_v'?
   57 |   int reps = FLAGS_reps;
      |              ^~~~~~~~~~
      |              FLAGS_v
/usr/local/include/glog/flags.h:167:1: note: 'FLAGS_v' declared here
  167 | DECLARE_int32(v);  // in vlog_is_on.cc
      | ^
/usr/local/include/glog/flags.h:88:31: note: expanded from macro 'DECLARE_int32'
   88 | #  define DECLARE_int32(name) DECLARE_VARIABLE(google::int32, I, name, int32)
      |                               ^
/usr/local/include/glog/flags.h:82:26: note: expanded from macro 'DECLARE_VARIABLE'
   82 |     using fL##shorttype::FLAGS_##name
      |                          ^
<scratch space>:339:1: note: expanded from here
  339 | FLAGS_v
      | ^
/usr/ports/devel/folly/work/folly-2024.06.24.00/folly/concurrency/test/ConcurrentHashMapBench.cpp:89:13: error: use of undeclared identifier 'FLAGS_ops'; did you mean 'FLAGS_v'?
   89 |   int ops = FLAGS_ops;
      |             ^~~~~~~~~
      |             FLAGS_v
/usr/local/include/glog/flags.h:167:1: note: 'FLAGS_v' declared here
  167 | DECLARE_int32(v);  // in vlog_is_on.cc
      | ^
/usr/local/include/glog/flags.h:88:31: note: expanded from macro 'DECLARE_int32'
   88 | #  define DECLARE_int32(name) DECLARE_VARIABLE(google::int32, I, name, int32)
      |                               ^
/usr/local/include/glog/flags.h:82:26: note: expanded from macro 'DECLARE_VARIABLE'
   82 |     using fL##shorttype::FLAGS_##name
      |                          ^
<scratch space>:339:1: note: expanded from here
  339 | FLAGS_v
      | ^
/usr/ports/devel/folly/work/folly-2024.06.24.00/folly/concurrency/test/ConcurrentHashMapBench.cpp:107:13: error: use of undeclared identifier 'FLAGS_ops'; did you mean 'FLAGS_v'?
  107 |   int ops = FLAGS_ops;
      |             ^~~~~~~~~
      |             FLAGS_v
/usr/local/include/glog/flags.h:167:1: note: 'FLAGS_v' declared here
  167 | DECLARE_int32(v);  // in vlog_is_on.cc
      | ^
/usr/local/include/glog/flags.h:88:31: note: expanded from macro 'DECLARE_int32'
   88 | #  define DECLARE_int32(name) DECLARE_VARIABLE(google::int32, I, name, int32)
      |                               ^
/usr/local/include/glog/flags.h:82:26: note: expanded from macro 'DECLARE_VARIABLE'
   82 |     using fL##shorttype::FLAGS_##name
      |                          ^
<scratch space>:339:1: note: expanded from here
  339 | FLAGS_v
      | ^
/usr/ports/devel/folly/work/folly-2024.06.24.00/folly/concurrency/test/ConcurrentHashMapBench.cpp:109:23: error: use of undeclared identifier 'FLAGS_size'
  109 |   for (int j = 0; j < FLAGS_size; ++j) {
      |                       ^
/usr/ports/devel/folly/work/folly-2024.06.24.00/folly/concurrency/test/ConcurrentHashMapBench.cpp:112:13: error: use of undeclared identifier 'FLAGS_size'; did you mean 'FLAGS_v'?
  112 |   int key = FLAGS_size / 2;
      |             ^~~~~~~~~~
      |             FLAGS_v
/usr/local/include/glog/flags.h:167:1: note: 'FLAGS_v' declared here
  167 | DECLARE_int32(v);  // in vlog_is_on.cc
      | ^
/usr/local/include/glog/flags.h:88:31: note: expanded from macro 'DECLARE_int32'
   88 | #  define DECLARE_int32(name) DECLARE_VARIABLE(google::int32, I, name, int32)
      |                               ^
/usr/local/include/glog/flags.h:82:26: note: expanded from macro 'DECLARE_VARIABLE'
   82 |     using fL##shorttype::FLAGS_##name
      |                          ^
<scratch space>:339:1: note: expanded from here
  339 | FLAGS_v
      | ^
/usr/ports/devel/folly/work/folly-2024.06.24.00/folly/concurrency/test/ConcurrentHashMapBench.cpp:152:13: error: use of undeclared identifier 'FLAGS_ops'; did you mean 'FLAGS_v'?
  152 |   int ops = FLAGS_ops;
      |             ^~~~~~~~~
      |             FLAGS_v
/usr/local/include/glog/flags.h:167:1: note: 'FLAGS_v' declared here
  167 | DECLARE_int32(v);  // in vlog_is_on.cc
      | ^
/usr/local/include/glog/flags.h:88:31: note: expanded from macro 'DECLARE_int32'
   88 | #  define DECLARE_int32(name) DECLARE_VARIABLE(google::int32, I, name, int32)
      |                               ^
/usr/local/include/glog/flags.h:82:26: note: expanded from macro 'DECLARE_VARIABLE'
   82 |     using fL##shorttype::FLAGS_##name
      |                          ^
<scratch space>:339:1: note: expanded from here
  339 | FLAGS_v
      | ^
/usr/ports/devel/folly/work/folly-2024.06.24.00/folly/concurrency/test/ConcurrentHashMapBench.cpp:170:13: error: use of undeclared identifier 'FLAGS_ops'; did you mean 'FLAGS_v'?
  170 |   int ops = FLAGS_ops;
      |             ^~~~~~~~~
      |             FLAGS_v
/usr/local/include/glog/flags.h:167:1: note: 'FLAGS_v' declared here
  167 | DECLARE_int32(v);  // in vlog_is_on.cc
      | ^
/usr/local/include/glog/flags.h:88:31: note: expanded from macro 'DECLARE_int32'
   88 | #  define DECLARE_int32(name) DECLARE_VARIABLE(google::int32, I, name, int32)
      |                               ^
/usr/local/include/glog/flags.h:82:26: note: expanded from macro 'DECLARE_VARIABLE'
   82 |     using fL##shorttype::FLAGS_##name
      |                          ^
<scratch space>:339:1: note: expanded from here
  339 | FLAGS_v
      | ^
/usr/ports/devel/folly/work/folly-2024.06.24.00/folly/concurrency/test/ConcurrentHashMapBench.cpp:188:13: error: use of undeclared identifier 'FLAGS_ops'; did you mean 'FLAGS_v'?
  188 |   int ops = FLAGS_ops;
      |             ^~~~~~~~~
      |             FLAGS_v
/usr/local/include/glog/flags.h:167:1: note: 'FLAGS_v' declared here
  167 | DECLARE_int32(v);  // in vlog_is_on.cc
      | ^
/usr/local/include/glog/flags.h:88:31: note: expanded from macro 'DECLARE_int32'
   88 | #  define DECLARE_int32(name) DECLARE_VARIABLE(google::int32, I, name, int32)
      |                               ^
/usr/local/include/glog/flags.h:82:26: note: expanded from macro 'DECLARE_VARIABLE'
   82 |     using fL##shorttype::FLAGS_##name
      |                          ^
<scratch space>:339:1: note: expanded from here
  339 | FLAGS_v
      | ^
12 warnings and 14 errors generated.

Version: 2024.06.24.00
clang-18
FreeBSD 14.1

@facebook facebook deleted a comment from rostech1793 Jun 27, 2024
@vaavaav
Copy link

vaavaav commented Nov 1, 2024

When comparing folly/concurrency/test/ConcurrentHashMapBench.cpp with other files within the same directory that define flags, I can see one difference: there is no #include <folly/portability/GFlags.h>.
I will check if this is the root of the problem.

facebook-github-bot pushed a commit to facebook/hhvm that referenced this issue Nov 7, 2024
Summary:
Fix facebook/folly#2246.
GFlags headers were missing in `folly/concurrent/test/ConcurrentHashMapBench.cpp`.

X-link: facebook/folly#2334

Reviewed By: Gownta

Differential Revision: D65384875

Pulled By: Orvid

fbshipit-source-id: 32528db3d1f40509e72febc0ccf0d69ea877cb0f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants