Repository: pytorch
Issue: build failed when strictly following the guidelines
Labels: module: build,triaged

### 🐛 Describe the bug

Fresh install of ubuntu 20.10 and Anaconda3-2022.10
```
git clone --recursive https://github.com/pytorch/pytorch
cd pytorch
pip install -r requirements.txt
conda activate
export USE_CUDA=0
export USE_NNPACK=0
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
python setup.py develop
```
then i get errors

### Error logs

```
[3735/6217] Building CXX object third_party/benchmark/src/CMakeFiles/benchmark.dir/benchmark.cc.o
FAILED: third_party/benchmark/src/CMakeFiles/benchmark.dir/benchmark.cc.o
/usr/bin/c++ -DHAVE_POSIX_REGEX -DHAVE_STD_REGEX -DHAVE_STEADY_CLOCK -I/root/anaconda3/include -I/root/pytorch/third_party/benchmark/include -I/root/pytorch/third_party/benchmark/src -isystem /root/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /root/pytorch/cmake/../third_party/googletest/googletest/include -isystem /root/pytorch/third_party/protobuf/src -isystem /root/pytorch/third_party/gemmlowp -isystem /root/pytorch/third_party/neon2sse -isystem /root/pytorch/third_party/XNNPACK/include -D_GLIBCXX_USE_CXX11_ABI=1 -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL  -std=c++11  -Wall  -Wextra  -Wshadow  -Wsuggest-override  -pedantic  -pedantic-errors  -fstrict-aliasing  -Wno-deprecated-declarations  -Wstrict-aliasing -O3 -DNDEBUG  -Werror  -Wno-deprecated -MD -MT third_party/benchmark/src/CMakeFiles/benchmark.dir/benchmark.cc.o -MF third_party/benchmark/src/CMakeFiles/benchmark.dir/benchmark.cc.o.d -o third_party/benchmark/src/CMakeFiles/benchmark.dir/benchmark.cc.o -c /root/pytorch/third_party/benchmark/src/benchmark.cc
In file included from /root/pytorch/third_party/benchmark/src/benchmark.cc:15:
/root/anaconda3/include/benchmark/benchmark.h:1011:16: error: ‘virtual void benchmark::internal::FunctionBenchmark::Run(benchmark::State&)’ can be marked override [-Werror=suggest-override]
 1011 |   virtual void Run(State& st);
      |                ^~~
/root/anaconda3/include/benchmark/benchmark.h:1073:16: error: ‘virtual void benchmark::Fixture::Run(benchmark::State&)’ can be marked override [-Werror=suggest-override]
 1073 |   virtual void Run(State& st) {
      |                ^~~
/root/anaconda3/include/benchmark/benchmark.h:1514:16: error: ‘virtual bool benchmark::ConsoleReporter::ReportContext(const benchmark::BenchmarkReporter::Context&)’ can be marked override [-Werror=suggest-override]
 1514 |   virtual bool ReportContext(const Context& context);
      |                ^~~~~~~~~~~~~
/root/anaconda3/include/benchmark/benchmark.h:1515:16: error: ‘virtual void benchmark::ConsoleReporter::ReportRuns(const std::vector<benchmark::BenchmarkReporter::Run>&)’ can be marked override [-Werror=suggest-override]
 1515 |   virtual void ReportRuns(const std::vector<Run>& reports);
      |                ^~~~~~~~~~
/root/anaconda3/include/benchmark/benchmark.h:1530:16: error: ‘virtual bool benchmark::JSONReporter::ReportContext(const benchmark::BenchmarkReporter::Context&)’ can be marked override [-Werror=suggest-override]
 1530 |   virtual bool ReportContext(const Context& context);
      |                ^~~~~~~~~~~~~
/root/anaconda3/include/benchmark/benchmark.h:1531:16: error: ‘virtual void benchmark::JSONReporter::ReportRuns(const std::vector<benchmark::BenchmarkReporter::Run>&)’ can be marked override [-Werror=suggest-override]
 1531 |   virtual void ReportRuns(const std::vector<Run>& reports);
      |                ^~~~~~~~~~
/root/anaconda3/include/benchmark/benchmark.h:1532:16: error: ‘virtual void benchmark::JSONReporter::Finalize()’ can be marked override [-Werror=suggest-override]
 1532 |   virtual void Finalize();
      |                ^~~~~~~~
/root/anaconda3/include/benchmark/benchmark.h:1545:16: error: ‘virtual bool benchmark::CSVReporter::ReportContext(const benchmark::BenchmarkReporter::Context&)’ can be marked override [-Werror=suggest-override]
 1545 |   virtual bool ReportContext(const Context& context);
      |                ^~~~~~~~~~~~~
/root/anaconda3/include/benchmark/benchmark.h:1546:16: error: ‘virtual void benchmark::CSVReporter::ReportRuns(const std::vector<benchmark::BenchmarkReporter::Run>&)’ can be marked override [-Werror=suggest-override]
 1546 |   virtual void ReportRuns(const std::vector<Run>& reports);
      |                ^~~~~~~~~~
In file included from /root/pytorch/third_party/benchmark/src/benchmark.cc:17:
/root/pytorch/third_party/benchmark/src/benchmark_api_internal.h:46:23: error: ‘benchmark::internal::PerfCountersMeasurement’ has not been declared
   46 |             internal::PerfCountersMeasurement* perf_counters_measurement) const;
      |                       ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /root/pytorch/third_party/benchmark/src/benchmark.cc:18:
/root/pytorch/third_party/benchmark/src/benchmark_runner.h:49:38: error: ‘benchmark::BenchmarkReporter::PerFamilyRunReports’ has not been declared
   49 |                   BenchmarkReporter::PerFamilyRunReports* reports_for_family);
      |                                      ^~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark_runner.h:61:22: error: ‘PerFamilyRunReports’ in ‘class benchmark::BenchmarkReporter’ does not name a type
   61 |   BenchmarkReporter::PerFamilyRunReports* GetReportsForFamily() const {
      |                      ^~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark_runner.h:69:22: error: ‘PerFamilyRunReports’ in ‘class benchmark::BenchmarkReporter’ does not name a type
   69 |   BenchmarkReporter::PerFamilyRunReports* reports_for_family;
      |                      ^~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc:136:1: error: no declaration matches ‘benchmark::State::State(benchmark::IterationCount, const std::vector<long int>&, int, int, benchmark::internal::ThreadTimer*, benchmark::internal::ThreadManager*, benchmark::internal::PerfCountersMeasurement*)’
  136 | State::State(IterationCount max_iters, const std::vector<int64_t>& ranges,
      | ^~~~~
/root/anaconda3/include/benchmark/benchmark.h:465:7: note: candidates are: ‘benchmark::State::State(benchmark::State&&)’
  465 | class State {
      |       ^~~~~
/root/anaconda3/include/benchmark/benchmark.h:465:7: note:                 ‘benchmark::State::State(const benchmark::State&)’
/root/anaconda3/include/benchmark/benchmark.h:677:3: note:                 ‘benchmark::State::State(benchmark::IterationCount, const std::vector<long int>&, int, int, benchmark::internal::ThreadTimer*, benchmark::internal::ThreadManager*)’
  677 |   State(IterationCount max_iters, const std::vector<int64_t>& ranges,
      |   ^~~~~
/root/anaconda3/include/benchmark/benchmark.h:465:7: note: ‘class benchmark::State’ defined here
  465 | class State {
      |       ^~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc: In member function ‘void benchmark::State::PauseTiming()’:
/root/pytorch/third_party/benchmark/src/benchmark.cc:186:7: error: ‘perf_counters_measurement_’ was not declared in this scope
  186 |   if (perf_counters_measurement_) {
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc: In member function ‘void benchmark::State::ResumeTiming()’:
/root/pytorch/third_party/benchmark/src/benchmark.cc:200:7: error: ‘perf_counters_measurement_’ was not declared in this scope
  200 |   if (perf_counters_measurement_) {
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc: In function ‘void benchmark::internal::{anonymous}::RunBenchmarks(const std::vector<benchmark::internal::BenchmarkInstance>&, benchmark::BenchmarkReporter*, benchmark::BenchmarkReporter*)’:
/root/pytorch/third_party/benchmark/src/benchmark.cc:306:53: error: ‘PerFamilyRunReports’ is not a member of ‘benchmark::BenchmarkReporter’
  306 |   std::map<int /*family_index*/, BenchmarkReporter::PerFamilyRunReports>
      |                                                     ^~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc:306:53: error: ‘PerFamilyRunReports’ is not a member of ‘benchmark::BenchmarkReporter’
/root/pytorch/third_party/benchmark/src/benchmark.cc:306:72: error: template argument 2 is invalid
  306 |   std::map<int /*family_index*/, BenchmarkReporter::PerFamilyRunReports>
      |                                                                        ^
/root/pytorch/third_party/benchmark/src/benchmark.cc:306:72: error: template argument 4 is invalid
/root/pytorch/third_party/benchmark/src/benchmark.cc:319:26: error: ‘PerFamilyRunReports’ is not a member of ‘benchmark::BenchmarkReporter’
  319 |       BenchmarkReporter::PerFamilyRunReports* reports_for_family = nullptr;
      |                          ^~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc:319:47: error: ‘reports_for_family’ was not declared in this scope
  319 |       BenchmarkReporter::PerFamilyRunReports* reports_for_family = nullptr;
      |                                               ^~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc:321:49: error: invalid types ‘int[int]’ for array subscript
  321 |         reports_for_family = &per_family_reports[benchmark.family_index()];
      |                                                 ^
/root/pytorch/third_party/benchmark/src/benchmark.cc:357:51: error: ‘class benchmark::internal::BenchmarkRunner’ has no member named ‘GetReportsForFamily’
  357 |       if (const auto* reports_for_family = runner.GetReportsForFamily()) {
      |                                                   ^~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc:364:30: error: request for member ‘erase’ in ‘per_family_reports’, which is of non-class type ‘int’
  364 |           per_family_reports.erase(
      |                              ^~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc: At global scope:
/root/pytorch/third_party/benchmark/src/benchmark.cc:380:1: error: ‘BENCHMARK_DISABLE_DEPRECATED_WARNING’ does not name a type
  380 | BENCHMARK_DISABLE_DEPRECATED_WARNING
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc:397:1: error: ‘BENCHMARK_RESTORE_DEPRECATED_WARNING’ does not name a type
  397 | BENCHMARK_RESTORE_DEPRECATED_WARNING
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc: In function ‘size_t benchmark::RunSpecifiedBenchmarks()’:
/root/pytorch/third_party/benchmark/src/benchmark.cc:432:32: error: no matching function for call to ‘RunSpecifiedBenchmarks(std::nullptr_t, std::nullptr_t, std::string&)’
  432 |   return RunSpecifiedBenchmarks(nullptr, nullptr, FLAGS_benchmark_filter);
      |          ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc:431:8: note: candidate: ‘size_t benchmark::RunSpecifiedBenchmarks()’
  431 | size_t RunSpecifiedBenchmarks() {
      |        ^~~~~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc:431:8: note:   candidate expects 0 arguments, 3 provided
/root/anaconda3/include/benchmark/benchmark.h:278:8: note: candidate: ‘size_t benchmark::RunSpecifiedBenchmarks(BenchmarkReporter*)’
  278 | size_t RunSpecifiedBenchmarks(BenchmarkReporter* display_reporter);
      |        ^~~~~~~~~~~~~~~~~~~~~~
/root/anaconda3/include/benchmark/benchmark.h:278:8: note:   candidate expects 1 argument, 3 provided
/root/anaconda3/include/benchmark/benchmark.h:279:8: note: candidate: ‘size_t benchmark::RunSpecifiedBenchmarks(BenchmarkReporter*, BenchmarkReporter*)’
  279 | size_t RunSpecifiedBenchmarks(BenchmarkReporter* display_reporter,
      |        ^~~~~~~~~~~~~~~~~~~~~~
/root/anaconda3/include/benchmark/benchmark.h:279:8: note:   candidate expects 2 arguments, 3 provided
/root/pytorch/third_party/benchmark/src/benchmark.cc: In function ‘size_t benchmark::RunSpecifiedBenchmarks(std::string)’:
/root/pytorch/third_party/benchmark/src/benchmark.cc:436:32: error: no matching function for call to ‘RunSpecifiedBenchmarks(std::nullptr_t, std::nullptr_t, std::remove_reference<std::__cxx11::basic_string<char>&>::type)’
  436 |   return RunSpecifiedBenchmarks(nullptr, nullptr, std::move(spec));
      |          ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc:431:8: note: candidate: ‘size_t benchmark::RunSpecifiedBenchmarks()’
  431 | size_t RunSpecifiedBenchmarks() {
      |        ^~~~~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc:431:8: note:   candidate expects 0 arguments, 3 provided
/root/anaconda3/include/benchmark/benchmark.h:278:8: note: candidate: ‘size_t benchmark::RunSpecifiedBenchmarks(BenchmarkReporter*)’
  278 | size_t RunSpecifiedBenchmarks(BenchmarkReporter* display_reporter);
      |        ^~~~~~~~~~~~~~~~~~~~~~
/root/anaconda3/include/benchmark/benchmark.h:278:8: note:   candidate expects 1 argument, 3 provided
/root/anaconda3/include/benchmark/benchmark.h:279:8: note: candidate: ‘size_t benchmark::RunSpecifiedBenchmarks(BenchmarkReporter*, BenchmarkReporter*)’
  279 | size_t RunSpecifiedBenchmarks(BenchmarkReporter* display_reporter,
      |        ^~~~~~~~~~~~~~~~~~~~~~
/root/anaconda3/include/benchmark/benchmark.h:279:8: note:   candidate expects 2 arguments, 3 provided
/root/pytorch/third_party/benchmark/src/benchmark.cc:435:8: note: candidate: ‘size_t benchmark::RunSpecifiedBenchmarks(std::string)’
  435 | size_t RunSpecifiedBenchmarks(std::string spec) {
      |        ^~~~~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc:435:8: note:   candidate expects 1 argument, 3 provided
/root/pytorch/third_party/benchmark/src/benchmark.cc: In function ‘size_t benchmark::RunSpecifiedBenchmarks(BenchmarkReporter*)’:
/root/pytorch/third_party/benchmark/src/benchmark.cc:440:32: error: no matching function for call to ‘RunSpecifiedBenchmarks(benchmark::BenchmarkReporter*&, std::nullptr_t, std::string&)’
  440 |   return RunSpecifiedBenchmarks(display_reporter, nullptr,
      |          ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
  441 |                                 FLAGS_benchmark_filter);
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc:431:8: note: candidate: ‘size_t benchmark::RunSpecifiedBenchmarks()’
  431 | size_t RunSpecifiedBenchmarks() {
      |        ^~~~~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc:431:8: note:   candidate expects 0 arguments, 3 provided
/root/pytorch/third_party/benchmark/src/benchmark.cc:439:8: note: candidate: ‘size_t benchmark::RunSpecifiedBenchmarks(BenchmarkReporter*)’
  439 | size_t RunSpecifiedBenchmarks(BenchmarkReporter* display_reporter) {
      |        ^~~~~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc:439:8: note:   candidate expects 1 argument, 3 provided
/root/anaconda3/include/benchmark/benchmark.h:279:8: note: candidate: ‘size_t benchmark::RunSpecifiedBenchmarks(BenchmarkReporter*, BenchmarkReporter*)’
  279 | size_t RunSpecifiedBenchmarks(BenchmarkReporter* display_reporter,
      |        ^~~~~~~~~~~~~~~~~~~~~~
/root/anaconda3/include/benchmark/benchmark.h:279:8: note:   candidate expects 2 arguments, 3 provided
/root/pytorch/third_party/benchmark/src/benchmark.cc:435:8: note: candidate: ‘size_t benchmark::RunSpecifiedBenchmarks(std::string)’
  435 | size_t RunSpecifiedBenchmarks(std::string spec) {
      |        ^~~~~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc:435:8: note:   candidate expects 1 argument, 3 provided
/root/pytorch/third_party/benchmark/src/benchmark.cc: In function ‘size_t benchmark::RunSpecifiedBenchmarks(BenchmarkReporter*, std::string)’:
/root/pytorch/third_party/benchmark/src/benchmark.cc:446:32: error: no matching function for call to ‘RunSpecifiedBenchmarks(benchmark::BenchmarkReporter*&, std::nullptr_t, std::remove_reference<std::__cxx11::basic_string<char>&>::type)’
  446 |   return RunSpecifiedBenchmarks(display_reporter, nullptr, std::move(spec));
      |          ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc:431:8: note: candidate: ‘size_t benchmark::RunSpecifiedBenchmarks()’
  431 | size_t RunSpecifiedBenchmarks() {
      |        ^~~~~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc:431:8: note:   candidate expects 0 arguments, 3 provided
/root/pytorch/third_party/benchmark/src/benchmark.cc:439:8: note: candidate: ‘size_t benchmark::RunSpecifiedBenchmarks(BenchmarkReporter*)’
  439 | size_t RunSpecifiedBenchmarks(BenchmarkReporter* display_reporter) {
      |        ^~~~~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc:439:8: note:   candidate expects 1 argument, 3 provided
/root/anaconda3/include/benchmark/benchmark.h:279:8: note: candidate: ‘size_t benchmark::RunSpecifiedBenchmarks(BenchmarkReporter*, BenchmarkReporter*)’
  279 | size_t RunSpecifiedBenchmarks(BenchmarkReporter* display_reporter,
      |        ^~~~~~~~~~~~~~~~~~~~~~
/root/anaconda3/include/benchmark/benchmark.h:279:8: note:   candidate expects 2 arguments, 3 provided
/root/pytorch/third_party/benchmark/src/benchmark.cc:435:8: note: candidate: ‘size_t benchmark::RunSpecifiedBenchmarks(std::string)’
  435 | size_t RunSpecifiedBenchmarks(std::string spec) {
      |        ^~~~~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc:435:8: note:   candidate expects 1 argument, 3 provided
/root/pytorch/third_party/benchmark/src/benchmark.cc:444:8: note: candidate: ‘size_t benchmark::RunSpecifiedBenchmarks(BenchmarkReporter*, std::string)’
  444 | size_t RunSpecifiedBenchmarks(BenchmarkReporter* display_reporter,
      |        ^~~~~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc:444:8: note:   candidate expects 2 arguments, 3 provided
/root/pytorch/third_party/benchmark/src/benchmark.cc: In function ‘size_t benchmark::RunSpecifiedBenchmarks(BenchmarkReporter*, BenchmarkReporter*)’:
/root/pytorch/third_party/benchmark/src/benchmark.cc:451:32: error: no matching function for call to ‘RunSpecifiedBenchmarks(benchmark::BenchmarkReporter*&, benchmark::BenchmarkReporter*&, std::string&)’
  451 |   return RunSpecifiedBenchmarks(display_reporter, file_reporter,
      |          ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  452 |                                 FLAGS_benchmark_filter);
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc:431:8: note: candidate: ‘size_t benchmark::RunSpecifiedBenchmarks()’
  431 | size_t RunSpecifiedBenchmarks() {
      |        ^~~~~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc:431:8: note:   candidate expects 0 arguments, 3 provided
/root/pytorch/third_party/benchmark/src/benchmark.cc:439:8: note: candidate: ‘size_t benchmark::RunSpecifiedBenchmarks(BenchmarkReporter*)’
  439 | size_t RunSpecifiedBenchmarks(BenchmarkReporter* display_reporter) {
      |        ^~~~~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc:439:8: note:   candidate expects 1 argument, 3 provided
/root/pytorch/third_party/benchmark/src/benchmark.cc:449:8: note: candidate: ‘size_t benchmark::RunSpecifiedBenchmarks(BenchmarkReporter*, BenchmarkReporter*)’
  449 | size_t RunSpecifiedBenchmarks(BenchmarkReporter* display_reporter,
      |        ^~~~~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc:449:8: note:   candidate expects 2 arguments, 3 provided
/root/pytorch/third_party/benchmark/src/benchmark.cc:435:8: note: candidate: ‘size_t benchmark::RunSpecifiedBenchmarks(std::string)’
  435 | size_t RunSpecifiedBenchmarks(std::string spec) {
      |        ^~~~~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc:435:8: note:   candidate expects 1 argument, 3 provided
/root/pytorch/third_party/benchmark/src/benchmark.cc:444:8: note: candidate: ‘size_t benchmark::RunSpecifiedBenchmarks(BenchmarkReporter*, std::string)’
  444 | size_t RunSpecifiedBenchmarks(BenchmarkReporter* display_reporter,
      |        ^~~~~~~~~~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc:444:8: note:   candidate expects 2 arguments, 3 provided
/root/pytorch/third_party/benchmark/src/benchmark.cc: In function ‘size_t benchmark::RunSpecifiedBenchmarks(BenchmarkReporter*, BenchmarkReporter*, std::string)’:
/root/pytorch/third_party/benchmark/src/benchmark.cc:466:42: error: ‘CreateReporter’ is not a member of ‘benchmark::internal’
  466 |     default_display_reporter = internal::CreateReporter(
      |                                          ^~~~~~~~~~~~~~
/root/pytorch/third_party/benchmark/src/benchmark.cc:487:41: error: ‘CreateReporter’ is not a member of ‘benchmark::internal’
  487 |       default_file_reporter = internal::CreateReporter(
      |                                         ^~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
[3738/6217] Building CXX object third_party/googletest/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
ninja: build stopped: subcommand failed.

```

### Minified repro

_No response_

### Versions

Collecting environment information...
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.10 (x86_64)
GCC version: (Ubuntu 12.2.0-3ubuntu1) 12.2.0
Clang version: Could not collect
CMake version: version 3.22.1
Libc version: glibc-2.36

Python version: 3.9.13 (main, Aug 25 2022, 23:26:10)  [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.19.0-21-generic-x86_64-with-glibc2.36
Is CUDA available: N/A
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A

CPU:
Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Address sizes:                   43 bits physical, 48 bits virtual
Byte Order:                      Little Endian
CPU(s):                          32
On-line CPU(s) list:             0-31
Vendor ID:                       GenuineIntel
BIOS Vendor ID:                  GenuineIntel
Model name:                      Intel(R) Xeon(R) CPU E5-2450L 0 @ 1.80GHz
BIOS Model name:                 Intel(R) Xeon(R) CPU E5-2450L 0 @ 1.80GHz  CPU @ 1.7GHz
BIOS CPU family:                 2
CPU family:                      6
Model:                           45
Thread(s) per core:              1
Core(s) per socket:              2
Socket(s):                       16
Stepping:                        7
BogoMIPS:                        3591.34
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx hypervisor lahf_lm pti ssbd ibrs ibpb stibp tsc_adjust arat md_clear flush_l1d arch_capabilities
Hypervisor vendor:               VMware
Virtualization type:             full
L1d cache:                       512 KiB (16 instances)
L1i cache:                       512 KiB (16 instances)
L2 cache:                        4 MiB (16 instances)
L3 cache:                        320 MiB (16 instances)
NUMA node(s):                    2
NUMA node0 CPU(s):               0-15
NUMA node1 CPU(s):               16-31
Vulnerability Itlb multihit:     KVM: Mitigation: VMX unsupported
Vulnerability L1tf:              Mitigation; PTE Inversion
Vulnerability Mds:               Mitigation; Clear CPU buffers; SMT Host state unknown
Vulnerability Meltdown:          Mitigation; PTI
Vulnerability Mmio stale data:   Unknown: No mitigations
Vulnerability Retbleed:          Mitigation; IBRS
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS Not affected
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected

Versions of relevant libraries:
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.21.5
[pip3] numpydoc==1.4.0
[conda] blas                      1.0                         mkl
[conda] mkl                       2021.4.0           h06a4308_640
[conda] mkl-service               2.4.0            py39h7f8727e_0
[conda] mkl_fft                   1.3.1            py39hd3c417c_0
[conda] mkl_random                1.2.2            py39h51133e4_0
[conda] numpy                     1.21.5           py39h6c91a56_3
[conda] numpy-base                1.21.5           py39ha15fc14_3
[conda] numpydoc                  1.4.0            py39h06a4308_0


cc @malfet @seemethere @ezyang @soumith @msaroufim @wconstab @ngimel @bdhirsh