Repository: pytorch
Issue: Compilation failure in caffe2/core/plan_executor_test.cc with GCC 5.4
Labels: module: build,caffe2,triaged

Looks like another C++17 issue:

```text
FAILED: caffe2/CMakeFiles/plan_executor_test.dir/core/plan_executor_test.cc.o
/usr/bin/ccache /usr/bin/c++ -DHAVE_MALLOC_USABLE_SIZE=1 -DHAVE_MMAP=1 -DHAVE_SHM_OPEN=1 -DHAVE_SHM_UNLINK=1 -DIDEEP_USE_MKL -DMINIZ_DISABLE_ZIP_READER_CRC32_CHECKS -DONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DTH_BLAS_MKL -DUSE_EXTERNAL_MZCRC -D_FILE_OFFSET_BITS=64 -Iaten/src -I../aten/src -I. -I../ -I../cmake/../third_party/benchmark/include -Icaffe2/contrib/aten -I../third_party/onnx -Ithird_party/onnx -I../third_party/foxi -Ithird_party/foxi -Iinclude -Icaffe2/aten/src/TH -I../aten/src/TH -Icaffe2/aten/src -I../aten/../third_party/catch/single_include -I../aten/src/ATen/.. -Icaffe2/aten/src/ATen -I../third_party/miniz-2.0.8 -I../caffe2/core/nomnigraph/include -I../torch/csrc/api -I../torch/csrc/api/include -I../c10/.. -Ithird_party/ideep/mkl-dnn/include -I../third_party/ideep/mkl-dnn/src/../include -isystem third_party/gloo -isystem ../cmake/../third_party/gloo -isystem ../cmake/../third_party/googletest/googlemock/include -isystem ../cmake/../third_party/googletest/googletest/include -isystem ../third_party/protobuf/src -isystem /home/chester/miniconda3/envs/pytorch-build-py37/include -isystem ../third_party/gemmlowp -isystem ../third_party/neon2sse -isystem ../third_party/XNNPACK/include -isystem ../third_party -isystem ../cmake/../third_party/eigen -isystem /home/chester/miniconda3/envs/pytorch-build-py37/include/python3.7m -isystem /home/chester/miniconda3/envs/pytorch-build-py37/lib/python3.7/site-packages/numpy/core/include -isystem ../cmake/../third_party/pybind11/include -isystem /usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent -isystem /usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent/include -isystem /usr/lib/openmpi/include -isystem /usr/lib/openmpi/include/openmpi -isystem ../third_party/ideep/mkl-dnn/include -isystem ../third_party/ideep/include -isystem ../third_party/googletest/googletest/include -isystem ../third_party/googletest/googletest -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -DHAVE_AVX_CPU_DEFINITION -DHAVE_AVX2_CPU_DEFINITION -O3 -DN

DEBUG -DNDEBUG -fPIE -DCAFFE2_USE_GLOO -DHAVE_GCC_GET_CPUID -DUSE_AVX -DUSE_AVX2 -DTH_HAVE_THREAD -pthread -std=gnu++14 -MD -MT caffe2/CMakeFiles/plan_executor_test.dir/core/plan_executor_test.cc.o -MF caffe2/CMakeFiles/plan_executor_test.dir/core/plan_executor_test.cc.o.d -o caffe2/CMakeFiles/plan_executor_test.dir/core/plan_executor_test.

cc.o -c ../caffe2/core/plan_executor_test.cc
../caffe2/core/plan_executor_test.cc:291:2: warning: missing terminating " character


   ASSERT_DEATH(
  ^
../caffe2/core/plan_executor_test.cc:291:2: error: missing terminating " character
../caffe2/core/plan_executor_test.cc:293:13: error: stray ‘\’ in program
         HandleExecutorThreadExceptionsGuard guard(/*timeout=*/1);
             ^
../caffe2/core/plan_executor_test.cc:293:20: warning: missing terminating " character
         HandleExecutorThreadExceptionsGuard guard(/*timeout=*/1);
                    ^
../caffe2/core/plan_executor_test.cc:293:13: error: missing terminating " character
         HandleExecutorThreadExceptionsGuard guard(/*timeout=*/1);
             ^
../caffe2/core/plan_executor_test.cc:295:15: error: stray ‘\’ in program
         PlanDef plan_def;
               ^
../caffe2/core/plan_executor_test.cc:295:22: warning: missing terminating " character
         PlanDef plan_def;
                      ^
../caffe2/core/plan_executor_test.cc:295:15: error: missing terminating " character
         PlanDef plan_def;
               ^
../caffe2/core/plan_executor_test.cc:301:15: error: stray ‘\’ in program
               type: "BlockingError"
               ^
../caffe2/core/plan_executor_test.cc:301:25: warning: missing terminating " character
               type: "BlockingError"
                         ^
../caffe2/core/plan_executor_test.cc:301:15: error: missing terminating " character
               type: "BlockingError"
               ^
../caffe2/core/plan_executor_test.cc:304:9: error: stray ‘\’ in program
           execution_step {
         ^
../caffe2/core/plan_executor_test.cc: In member function ‘virtual void caffe2::PlanExecutorTest_BlockingErrorPlan_Test::TestBody()’:
../caffe2/core/plan_executor_test.cc:292:11: error: ‘network’ was not declared in this scope
../caffe2/core/plan_executor_test.cc:304:10: error: expected ‘)’ before ‘DOC’
           execution_step {
          ^
../caffe2/core/plan_executor_test.cc:291:15: error: expected primary-expression before ‘)’ token
   ASSERT_DEATH(
               ^
```

cc @malfet @seemethere @walterddr