Repository: pytorch
Issue: Failed to build with master.
Labels: module: build,triaged,module: mkl

## 🐛 Bug

3 types of errors:
- `mkl_cblas.h` not found (missing `-I`). Our MKL are oneAPI version and provided via -DINTEL_MKL_DIR to cmake. We can see that's correct set in CMakeCache but didn't found and reference in `binaries/CMakeLists.txt`.
- `caffe2/proto/caffe2_legacy.pb.h` not found. Probably a missing `-I` as well.
- Some linking errors.

```
# cmake --build . -- -j0
[1/27] ccache /usr/bin/g++-10 -DGFLAGS_IS_A_DLL=0 -DGOOGLE_GLOG_DLL_DECL="" -DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS="" -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 -D
ONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DTH_BLAS_MKL -DUSE_C10D_GLOO -DUSE_C10D_MPI -DUSE_DISTRIBUTED -DUSE_EXTERNAL_MZCRC -DUSE_RPC -DUSE_TENSORPIPE -D_FILE_OFFSET_BITS=64 -I/tmp/scratch/pytorch/build/aten/src -I/tmp/scratch/pytorc
h/aten/src -I/tmp/scratch/pytorch/build -I/tmp/scratch/pytorch -I/tmp/scratch/pytorch/cmake/../third_party/benchmark/include -I/tmp/scratch/pytorch/third_party/onnx -I/tmp/scratch/pytorch/build/third_party/onnx -I/tmp/scratch/pytorch/third_party/foxi -I/
tmp/scratch/pytorch/build/third_party/foxi -I/tmp/scratch/pytorch/torch/csrc/api -I/tmp/scratch/pytorch/torch/csrc/api/include -I/tmp/scratch/pytorch/c10/.. -isystem /tmp/scratch/pytorch/build/third_party/gloo -isystem /tmp/scratch/pytorch/cmake/../third
_party/gloo -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googletest/include -isystem /tmp/scratch/pytorch/third_party/gemmlowp -isystem /tmp/scratch/pytorch
/third_party/neon2sse -isystem /tmp/scratch/pytorch/third_party/XNNPACK/include -isystem /tmp/scratch/pytorch/third_party -isystem /usr/local/include/opencv4 -isystem /usr/local/include/eigen3 -isystem /usr/include/python3.9 -isystem /usr/local/lib/pytho
n3.9/dist-packages/numpy/core/include -isystem /tmp/scratch/pytorch/cmake/../third_party/pybind11/include -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -isystem /usr/lib/x86_64-linux-gnu/openmpi/include -isystem /tmp/scratch/pytorch/third_pa
rty/ideep/include -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_
DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-function -Wno-u
nused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -fa
ligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -fPIE   -march=native -DCAFFE2_USE_GLOO -DHAVE_GCC_GET_CPUID -DUSE_
AVX -DUSE_AVX2 -DTH_HAVE_THREAD -pthread -std=gnu++14 -MD -MT binaries/CMakeFiles/caffe2_benchmark.dir/caffe2_benchmark.cc.o -MF binaries/CMakeFiles/caffe2_benchmark.dir/caffe2_benchmark.cc.o.d -o binaries/CMakeFiles/caffe2_benchmark.dir/caffe2_benchmark
.cc.o -c /tmp/scratch/pytorch/binaries/caffe2_benchmark.cc
FAILED: binaries/CMakeFiles/caffe2_benchmark.dir/caffe2_benchmark.cc.o 
ccache /usr/bin/g++-10 -DGFLAGS_IS_A_DLL=0 -DGOOGLE_GLOG_DLL_DECL="" -DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS="" -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_C10D_GLOO -DUSE_C10D_MPI -DUSE_DISTRIBUTED -DUSE_EXTERNAL_MZCRC -DUSE_RPC -DUSE_TENSORPIPE -D_FILE_OFFSET_BITS=64 -I/tmp/scratch/pytorch/build/aten/src -I/tmp/scratch/pytorch/aten/
src -I/tmp/scratch/pytorch/build -I/tmp/scratch/pytorch -I/tmp/scratch/pytorch/cmake/../third_party/benchmark/include -I/tmp/scratch/pytorch/third_party/onnx -I/tmp/scratch/pytorch/build/third_party/onnx -I/tmp/scratch/pytorch/third_party/foxi -I/tmp/scr
atch/pytorch/build/third_party/foxi -I/tmp/scratch/pytorch/torch/csrc/api -I/tmp/scratch/pytorch/torch/csrc/api/include -I/tmp/scratch/pytorch/c10/.. -isystem /tmp/scratch/pytorch/build/third_party/gloo -isystem /tmp/scratch/pytorch/cmake/../third_party/
gloo -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googletest/include -isystem /tmp/scratch/pytorch/third_party/gemmlowp -isystem /tmp/scratch/pytorch/third_
party/neon2sse -isystem /tmp/scratch/pytorch/third_party/XNNPACK/include -isystem /tmp/scratch/pytorch/third_party -isystem /usr/local/include/opencv4 -isystem /usr/local/include/eigen3 -isystem /usr/include/python3.9 -isystem /usr/local/lib/python3.9/di
st-packages/numpy/core/include -isystem /tmp/scratch/pytorch/cmake/../third_party/pybind11/include -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -isystem /usr/lib/x86_64-linux-gnu/openmpi/include -isystem /tmp/scratch/pytorch/third_party/ide
ep/include -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_H
ANDLE -DEDGE_PROFILER_USE_KINETO -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-function -Wno-unused-r
esult -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-
new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -fPIE   -march=native -DCAFFE2_USE_GLOO -DHAVE_GCC_GET_CPUID -DUSE_AVX -DU
SE_AVX2 -DTH_HAVE_THREAD -pthread -std=gnu++14 -MD -MT binaries/CMakeFiles/caffe2_benchmark.dir/caffe2_benchmark.cc.o -MF binaries/CMakeFiles/caffe2_benchmark.dir/caffe2_benchmark.cc.o.d -o binaries/CMakeFiles/caffe2_benchmark.dir/caffe2_benchmark.cc.o -
c /tmp/scratch/pytorch/binaries/caffe2_benchmark.cc
In file included from /tmp/scratch/pytorch/caffe2/utils/math.h:9,
                 from /tmp/scratch/pytorch/caffe2/utils/filler.h:8,
                 from /tmp/scratch/pytorch/caffe2/core/operator_schema.h:17,
                 from /tmp/scratch/pytorch/caffe2/core/net.h:18,
                 from /tmp/scratch/pytorch/binaries/benchmark_helper.h:23,
                 from /tmp/scratch/pytorch/binaries/caffe2_benchmark.cc:6:
/tmp/scratch/pytorch/caffe2/utils/cblas.h:8:10: fatal error: mkl_cblas.h: No such file or directory
    8 | #include <mkl_cblas.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
[2/27] ccache /usr/bin/g++-10 -DGFLAGS_IS_A_DLL=0 -DGOOGLE_GLOG_DLL_DECL="" -DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS="" -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 -D
ONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DTH_BLAS_MKL -DUSE_C10D_GLOO -DUSE_C10D_MPI -DUSE_DISTRIBUTED -DUSE_EXTERNAL_MZCRC -DUSE_RPC -DUSE_TENSORPIPE -D_FILE_OFFSET_BITS=64 -I/tmp/scratch/pytorch/build/aten/src -I/tmp/scratch/pytorc
h/aten/src -I/tmp/scratch/pytorch/build -I/tmp/scratch/pytorch -I/tmp/scratch/pytorch/cmake/../third_party/benchmark/include -I/tmp/scratch/pytorch/third_party/onnx -I/tmp/scratch/pytorch/build/third_party/onnx -I/tmp/scratch/pytorch/third_party/foxi -I/
tmp/scratch/pytorch/build/third_party/foxi -I/tmp/scratch/pytorch/torch/csrc/api -I/tmp/scratch/pytorch/torch/csrc/api/include -I/tmp/scratch/pytorch/c10/.. -isystem /tmp/scratch/pytorch/build/third_party/gloo -isystem /tmp/scratch/pytorch/cmake/../third
_party/gloo -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googletest/include -isystem /tmp/scratch/pytorch/third_party/gemmlowp -isystem /tmp/scratch/pytorch
/third_party/neon2sse -isystem /tmp/scratch/pytorch/third_party/XNNPACK/include -isystem /tmp/scratch/pytorch/third_party -isystem /usr/local/include/opencv4 -isystem /usr/local/include/eigen3 -isystem /usr/include/python3.9 -isystem /usr/local/lib/pytho
n3.9/dist-packages/numpy/core/include -isystem /tmp/scratch/pytorch/cmake/../third_party/pybind11/include -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -isystem /usr/lib/x86_64-linux-gnu/openmpi/include -isystem /tmp/scratch/pytorch/third_pa
rty/ideep/include -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_
DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-function -Wno-u
nused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -fa
ligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -fPIE   -march=native -DCAFFE2_USE_GLOO -DHAVE_GCC_GET_CPUID -DUSE_
AVX -DUSE_AVX2 -DTH_HAVE_THREAD -pthread -std=gnu++14 -MD -MT binaries/CMakeFiles/caffe2_benchmark.dir/benchmark_helper.cc.o -MF binaries/CMakeFiles/caffe2_benchmark.dir/benchmark_helper.cc.o.d -o binaries/CMakeFiles/caffe2_benchmark.dir/benchmark_helper.cc.o -c /tmp/scratch/pytorch/binaries/benchmark_helper.cc
FAILED: binaries/CMakeFiles/caffe2_benchmark.dir/benchmark_helper.cc.o 
ccache /usr/bin/g++-10 -DGFLAGS_IS_A_DLL=0 -DGOOGLE_GLOG_DLL_DECL="" -DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS="" -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_C10D_GLOO -DUSE_C10D_MPI -DUSE_DISTRIBUTED -DUSE_EXTERNAL_MZCRC -DUSE_RPC -DUSE_TENSORPIPE -D_FILE_OFFSET_BITS=64 -I/tmp/scratch/pytorch/build/aten/src -I/tmp/scratch/pytorch/aten/
src -I/tmp/scratch/pytorch/build -I/tmp/scratch/pytorch -I/tmp/scratch/pytorch/cmake/../third_party/benchmark/include -I/tmp/scratch/pytorch/third_party/onnx -I/tmp/scratch/pytorch/build/third_party/onnx -I/tmp/scratch/pytorch/third_party/foxi -I/tmp/scr
atch/pytorch/build/third_party/foxi -I/tmp/scratch/pytorch/torch/csrc/api -I/tmp/scratch/pytorch/torch/csrc/api/include -I/tmp/scratch/pytorch/c10/.. -isystem /tmp/scratch/pytorch/build/third_party/gloo -isystem /tmp/scratch/pytorch/cmake/../third_party/
gloo -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googletest/include -isystem /tmp/scratch/pytorch/third_party/gemmlowp -isystem /tmp/scratch/pytorch/third_
party/neon2sse -isystem /tmp/scratch/pytorch/third_party/XNNPACK/include -isystem /tmp/scratch/pytorch/third_party -isystem /usr/local/include/opencv4 -isystem /usr/local/include/eigen3 -isystem /usr/include/python3.9 -isystem /usr/local/lib/python3.9/di
st-packages/numpy/core/include -isystem /tmp/scratch/pytorch/cmake/../third_party/pybind11/include -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -isystem /usr/lib/x86_64-linux-gnu/openmpi/include -isystem /tmp/scratch/pytorch/third_party/ide
ep/include -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_H
ANDLE -DEDGE_PROFILER_USE_KINETO -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-function -Wno-unused-r
esult -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-
new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -fPIE   -march=native -DCAFFE2_USE_GLOO -DHAVE_GCC_GET_CPUID -DUSE_AVX -DU
SE_AVX2 -DTH_HAVE_THREAD -pthread -std=gnu++14 -MD -MT binaries/CMakeFiles/caffe2_benchmark.dir/benchmark_helper.cc.o -MF binaries/CMakeFiles/caffe2_benchmark.dir/benchmark_helper.cc.o.d -o binaries/CMakeFiles/caffe2_benchmark.dir/benchmark_helper.cc.o -
c /tmp/scratch/pytorch/binaries/benchmark_helper.cc
In file included from /tmp/scratch/pytorch/caffe2/utils/math.h:9,
                 from /tmp/scratch/pytorch/caffe2/utils/filler.h:8,
                 from /tmp/scratch/pytorch/caffe2/core/operator_schema.h:17,
                 from /tmp/scratch/pytorch/caffe2/core/net.h:18,
                 from /tmp/scratch/pytorch/binaries/benchmark_helper.h:23,
                 from /tmp/scratch/pytorch/binaries/benchmark_helper.cc:30:
/tmp/scratch/pytorch/caffe2/utils/cblas.h:8:10: fatal error: mkl_cblas.h: No such file or directory
    8 | #include <mkl_cblas.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
[3/27] ccache /usr/bin/g++-10 -DGFLAGS_IS_A_DLL=0 -DGOOGLE_GLOG_DLL_DECL="" -DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS="" -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 -D
ONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DTH_BLAS_MKL -DUSE_C10D_GLOO -DUSE_C10D_MPI -DUSE_DISTRIBUTED -DUSE_EXTERNAL_MZCRC -DUSE_RPC -DUSE_TENSORPIPE -D_FILE_OFFSET_BITS=64 -I/tmp/scratch/pytorch/build/aten/src -I/tmp/scratch/pytorc
h/aten/src -I/tmp/scratch/pytorch/build -I/tmp/scratch/pytorch -I/tmp/scratch/pytorch/cmake/../third_party/benchmark/include -I/tmp/scratch/pytorch/third_party/onnx -I/tmp/scratch/pytorch/build/third_party/onnx -I/tmp/scratch/pytorch/third_party/foxi -I/
tmp/scratch/pytorch/build/third_party/foxi -I/tmp/scratch/pytorch/torch/csrc/api -I/tmp/scratch/pytorch/torch/csrc/api/include -I/tmp/scratch/pytorch/c10/.. -isystem /tmp/scratch/pytorch/build/third_party/gloo -isystem /tmp/scratch/pytorch/cmake/../third
_party/gloo -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googletest/include -isystem /tmp/scratch/pytorch/third_party/gemmlowp -isystem /tmp/scratch/pytorch
/third_party/neon2sse -isystem /tmp/scratch/pytorch/third_party/XNNPACK/include -isystem /tmp/scratch/pytorch/third_party -isystem /usr/local/include/opencv4 -isystem /usr/local/include/eigen3 -isystem /usr/include/python3.9 -isystem /usr/local/lib/pytho
n3.9/dist-packages/numpy/core/include -isystem /tmp/scratch/pytorch/cmake/../third_party/pybind11/include -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -isystem /usr/lib/x86_64-linux-gnu/openmpi/include -isystem /tmp/scratch/pytorch/third_pa
rty/ideep/include -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_
DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-function -Wno-u
nused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -fa
ligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -fPIE   -march=native -DCAFFE2_USE_GLOO -DHAVE_GCC_GET_CPUID -DUSE_
AVX -DUSE_AVX2 -DTH_HAVE_THREAD -pthread -std=gnu++14 -MD -MT binaries/CMakeFiles/convert_caffe_image_db.dir/convert_caffe_image_db.cc.o -MF binaries/CMakeFiles/convert_caffe_image_db.dir/convert_caffe_image_db.cc.o.d -o binaries/CMakeFiles/convert_caffe
_image_db.dir/convert_caffe_image_db.cc.o -c /tmp/scratch/pytorch/binaries/convert_caffe_image_db.cc
FAILED: binaries/CMakeFiles/convert_caffe_image_db.dir/convert_caffe_image_db.cc.o 
ccache /usr/bin/g++-10 -DGFLAGS_IS_A_DLL=0 -DGOOGLE_GLOG_DLL_DECL="" -DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS="" -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_C10D_GLOO -DUSE_C10D_MPI -DUSE_DISTRIBUTED -DUSE_EXTERNAL_MZCRC -DUSE_RPC -DUSE_TENSORPIPE -D_FILE_OFFSET_BITS=64 -I/tmp/scratch/pytorch/build/aten/src -I/tmp/scratch/pytorch/aten/
src -I/tmp/scratch/pytorch/build -I/tmp/scratch/pytorch -I/tmp/scratch/pytorch/cmake/../third_party/benchmark/include -I/tmp/scratch/pytorch/third_party/onnx -I/tmp/scratch/pytorch/build/third_party/onnx -I/tmp/scratch/pytorch/third_party/foxi -I/tmp/scr
atch/pytorch/build/third_party/foxi -I/tmp/scratch/pytorch/torch/csrc/api -I/tmp/scratch/pytorch/torch/csrc/api/include -I/tmp/scratch/pytorch/c10/.. -isystem /tmp/scratch/pytorch/build/third_party/gloo -isystem /tmp/scratch/pytorch/cmake/../third_party/
gloo -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googletest/include -isystem /tmp/scratch/pytorch/third_party/gemmlowp -isystem /tmp/scratch/pytorch/third_
party/neon2sse -isystem /tmp/scratch/pytorch/third_party/XNNPACK/include -isystem /tmp/scratch/pytorch/third_party -isystem /usr/local/include/opencv4 -isystem /usr/local/include/eigen3 -isystem /usr/include/python3.9 -isystem /usr/local/lib/python3.9/di
st-packages/numpy/core/include -isystem /tmp/scratch/pytorch/cmake/../third_party/pybind11/include -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -isystem /usr/lib/x86_64-linux-gnu/openmpi/include -isystem /tmp/scratch/pytorch/third_party/ide
ep/include -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_H
ANDLE -DEDGE_PROFILER_USE_KINETO -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-function -Wno-unused-r
esult -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-
new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -fPIE   -march=native -DCAFFE2_USE_GLOO -DHAVE_GCC_GET_CPUID -DUSE_AVX -DU
SE_AVX2 -DTH_HAVE_THREAD -pthread -std=gnu++14 -MD -MT binaries/CMakeFiles/convert_caffe_image_db.dir/convert_caffe_image_db.cc.o -MF binaries/CMakeFiles/convert_caffe_image_db.dir/convert_caffe_image_db.cc.o.d -o binaries/CMakeFiles/convert_caffe_image_
db.dir/convert_caffe_image_db.cc.o -c /tmp/scratch/pytorch/binaries/convert_caffe_image_db.cc
/tmp/scratch/pytorch/binaries/convert_caffe_image_db.cc:20:10: fatal error: caffe2/proto/caffe2_legacy.pb.h: No such file or directory
   20 | #include "caffe2/proto/caffe2_legacy.pb.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[4/27] ccache /usr/bin/g++-10 -DGFLAGS_IS_A_DLL=0 -DGOOGLE_GLOG_DLL_DECL="" -DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS="" -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 -D
ONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DTH_BLAS_MKL -DUSE_C10D_GLOO -DUSE_C10D_MPI -DUSE_DISTRIBUTED -DUSE_EXTERNAL_MZCRC -DUSE_RPC -DUSE_TENSORPIPE -D_FILE_OFFSET_BITS=64 -I/tmp/scratch/pytorch/build/aten/src -I/tmp/scratch/pytorc
h/aten/src -I/tmp/scratch/pytorch/build -I/tmp/scratch/pytorch -I/tmp/scratch/pytorch/cmake/../third_party/benchmark/include -I/tmp/scratch/pytorch/third_party/onnx -I/tmp/scratch/pytorch/build/third_party/onnx -I/tmp/scratch/pytorch/third_party/foxi -I/
tmp/scratch/pytorch/build/third_party/foxi -I/tmp/scratch/pytorch/torch/csrc/api -I/tmp/scratch/pytorch/torch/csrc/api/include -I/tmp/scratch/pytorch/c10/.. -isystem /tmp/scratch/pytorch/build/third_party/gloo -isystem /tmp/scratch/pytorch/cmake/../third
_party/gloo -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googletest/include -isystem /tmp/scratch/pytorch/third_party/gemmlowp -isystem /tmp/scratch/pytorch
/third_party/neon2sse -isystem /tmp/scratch/pytorch/third_party/XNNPACK/include -isystem /tmp/scratch/pytorch/third_party -isystem /usr/local/include/opencv4 -isystem /usr/local/include/eigen3 -isystem /usr/include/python3.9 -isystem /usr/local/lib/pytho
n3.9/dist-packages/numpy/core/include -isystem /tmp/scratch/pytorch/cmake/../third_party/pybind11/include -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -isystem /usr/lib/x86_64-linux-gnu/openmpi/include -isystem /tmp/scratch/pytorch/third_pa
rty/ideep/include -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_
DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-function -Wno-u
nused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -fa
ligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -fPIE   -march=native -DCAFFE2_USE_GLOO -DHAVE_GCC_GET_CPUID -DUSE_
AVX -DUSE_AVX2 -DTH_HAVE_THREAD -pthread -std=gnu++14 -MD -MT binaries/CMakeFiles/predictor_verifier.dir/predictor_verifier.cc.o -MF binaries/CMakeFiles/predictor_verifier.dir/predictor_verifier.cc.o.d -o binaries/CMakeFiles/predictor_verifier.dir/predic
tor_verifier.cc.o -c /tmp/scratch/pytorch/binaries/predictor_verifier.cc
FAILED: binaries/CMakeFiles/predictor_verifier.dir/predictor_verifier.cc.o 
ccache /usr/bin/g++-10 -DGFLAGS_IS_A_DLL=0 -DGOOGLE_GLOG_DLL_DECL="" -DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS="" -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_C10D_GLOO -DUSE_C10D_MPI -DUSE_DISTRIBUTED -DUSE_EXTERNAL_MZCRC -DUSE_RPC -DUSE_TENSORPIPE -D_FILE_OFFSET_BITS=64 -I/tmp/scratch/pytorch/build/aten/src -I/tmp/scratch/pytorch/aten/
src -I/tmp/scratch/pytorch/build -I/tmp/scratch/pytorch -I/tmp/scratch/pytorch/cmake/../third_party/benchmark/include -I/tmp/scratch/pytorch/third_party/onnx -I/tmp/scratch/pytorch/build/third_party/onnx -I/tmp/scratch/pytorch/third_party/foxi -I/tmp/scr
atch/pytorch/build/third_party/foxi -I/tmp/scratch/pytorch/torch/csrc/api -I/tmp/scratch/pytorch/torch/csrc/api/include -I/tmp/scratch/pytorch/c10/.. -isystem /tmp/scratch/pytorch/build/third_party/gloo -isystem /tmp/scratch/pytorch/cmake/../third_party/
gloo -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googletest/include -isystem /tmp/scratch/pytorch/third_party/gemmlowp -isystem /tmp/scratch/pytorch/third_
party/neon2sse -isystem /tmp/scratch/pytorch/third_party/XNNPACK/include -isystem /tmp/scratch/pytorch/third_party -isystem /usr/local/include/opencv4 -isystem /usr/local/include/eigen3 -isystem /usr/include/python3.9 -isystem /usr/local/lib/python3.9/di
st-packages/numpy/core/include -isystem /tmp/scratch/pytorch/cmake/../third_party/pybind11/include -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -isystem /usr/lib/x86_64-linux-gnu/openmpi/include -isystem /tmp/scratch/pytorch/third_party/ide
ep/include -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_H
ANDLE -DEDGE_PROFILER_USE_KINETO -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-function -Wno-unused-r
esult -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-
new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -fPIE   -march=native -DCAFFE2_USE_GLOO -DHAVE_GCC_GET_CPUID -DUSE_AVX -DU
SE_AVX2 -DTH_HAVE_THREAD -pthread -std=gnu++14 -MD -MT binaries/CMakeFiles/predictor_verifier.dir/predictor_verifier.cc.o -MF binaries/CMakeFiles/predictor_verifier.dir/predictor_verifier.cc.o.d -o binaries/CMakeFiles/predictor_verifier.dir/predictor_ver
ifier.cc.o -c /tmp/scratch/pytorch/binaries/predictor_verifier.cc
In file included from /tmp/scratch/pytorch/caffe2/utils/math.h:9,
                 from /tmp/scratch/pytorch/caffe2/utils/filler.h:8,
                 from /tmp/scratch/pytorch/caffe2/core/operator_schema.h:17,
                 from /tmp/scratch/pytorch/caffe2/core/net.h:18,
                 from /tmp/scratch/pytorch/caffe2/predictor/predictor.h:4,
                 from /tmp/scratch/pytorch/binaries/predictor_verifier.cc:19:
/tmp/scratch/pytorch/caffe2/utils/cblas.h:8:10: fatal error: mkl_cblas.h: No such file or directory
    8 | #include <mkl_cblas.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
[5/27] ccache /usr/bin/g++-10 -DGFLAGS_IS_A_DLL=0 -DGOOGLE_GLOG_DLL_DECL="" -DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS="" -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 -D
ONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DTH_BLAS_MKL -DUSE_C10D_GLOO -DUSE_C10D_MPI -DUSE_DISTRIBUTED -DUSE_EXTERNAL_MZCRC -DUSE_RPC -DUSE_TENSORPIPE -D_FILE_OFFSET_BITS=64 -I/tmp/scratch/pytorch/build/aten/src -I/tmp/scratch/pytorc
h/aten/src -I/tmp/scratch/pytorch/build -I/tmp/scratch/pytorch -I/tmp/scratch/pytorch/cmake/../third_party/benchmark/include -I/tmp/scratch/pytorch/third_party/onnx -I/tmp/scratch/pytorch/build/third_party/onnx -I/tmp/scratch/pytorch/third_party/foxi -I/
tmp/scratch/pytorch/build/third_party/foxi -I/tmp/scratch/pytorch/torch/csrc/api -I/tmp/scratch/pytorch/torch/csrc/api/include -I/tmp/scratch/pytorch/c10/.. -isystem /tmp/scratch/pytorch/build/third_party/gloo -isystem /tmp/scratch/pytorch/cmake/../third
_party/gloo -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googletest/include -isystem /tmp/scratch/pytorch/third_party/gemmlowp -isystem /tmp/scratch/pytorch
/third_party/neon2sse -isystem /tmp/scratch/pytorch/third_party/XNNPACK/include -isystem /tmp/scratch/pytorch/third_party -isystem /usr/local/include/opencv4 -isystem /usr/local/include/eigen3 -isystem /usr/include/python3.9 -isystem /usr/local/lib/pytho
n3.9/dist-packages/numpy/core/include -isystem /tmp/scratch/pytorch/cmake/../third_party/pybind11/include -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -isystem /usr/lib/x86_64-linux-gnu/openmpi/include -isystem /tmp/scratch/pytorch/third_pa
rty/ideep/include -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_
DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-function -Wno-u
nused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -fa
ligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -fPIE   -march=native -DCAFFE2_USE_GLOO -DHAVE_GCC_GET_CPUID -DUSE_
AVX -DUSE_AVX2 -DTH_HAVE_THREAD -pthread -std=gnu++14 -MD -MT binaries/CMakeFiles/speed_benchmark.dir/speed_benchmark.cc.o -MF binaries/CMakeFiles/speed_benchmark.dir/speed_benchmark.cc.o.d -o binaries/CMakeFiles/speed_benchmark.dir/speed_benchmark.cc.o 
-c /tmp/scratch/pytorch/binaries/speed_benchmark.cc
FAILED: binaries/CMakeFiles/speed_benchmark.dir/speed_benchmark.cc.o 
ccache /usr/bin/g++-10 -DGFLAGS_IS_A_DLL=0 -DGOOGLE_GLOG_DLL_DECL="" -DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS="" -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_C10D_GLOO -DUSE_C10D_MPI -DUSE_DISTRIBUTED -DUSE_EXTERNAL_MZCRC -DUSE_RPC -DUSE_TENSORPIPE -D_FILE_OFFSET_BITS=64 -I/tmp/scratch/pytorch/build/aten/src -I/tmp/scratch/pytorch/aten/
src -I/tmp/scratch/pytorch/build -I/tmp/scratch/pytorch -I/tmp/scratch/pytorch/cmake/../third_party/benchmark/include -I/tmp/scratch/pytorch/third_party/onnx -I/tmp/scratch/pytorch/build/third_party/onnx -I/tmp/scratch/pytorch/third_party/foxi -I/tmp/scr
atch/pytorch/build/third_party/foxi -I/tmp/scratch/pytorch/torch/csrc/api -I/tmp/scratch/pytorch/torch/csrc/api/include -I/tmp/scratch/pytorch/c10/.. -isystem /tmp/scratch/pytorch/build/third_party/gloo -isystem /tmp/scratch/pytorch/cmake/../third_party/
gloo -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googletest/include -isystem /tmp/scratch/pytorch/third_party/gemmlowp -isystem /tmp/scratch/pytorch/third_
party/neon2sse -isystem /tmp/scratch/pytorch/third_party/XNNPACK/include -isystem /tmp/scratch/pytorch/third_party -isystem /usr/local/include/opencv4 -isystem /usr/local/include/eigen3 -isystem /usr/include/python3.9 -isystem /usr/local/lib/python3.9/di
st-packages/numpy/core/include -isystem /tmp/scratch/pytorch/cmake/../third_party/pybind11/include -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -isystem /usr/lib/x86_64-linux-gnu/openmpi/include -isystem /tmp/scratch/pytorch/third_party/ide
ep/include -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_H
ANDLE -DEDGE_PROFILER_USE_KINETO -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-function -Wno-unused-r
esult -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-
new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -fPIE   -march=native -DCAFFE2_USE_GLOO -DHAVE_GCC_GET_CPUID -DUSE_AVX -DU
SE_AVX2 -DTH_HAVE_THREAD -pthread -std=gnu++14 -MD -MT binaries/CMakeFiles/speed_benchmark.dir/speed_benchmark.cc.o -MF binaries/CMakeFiles/speed_benchmark.dir/speed_benchmark.cc.o.d -o binaries/CMakeFiles/speed_benchmark.dir/speed_benchmark.cc.o -c /tmp
/scratch/pytorch/binaries/speed_benchmark.cc
In file included from /tmp/scratch/pytorch/caffe2/utils/math.h:9,
                 from /tmp/scratch/pytorch/caffe2/utils/filler.h:8,
                 from /tmp/scratch/pytorch/caffe2/core/operator_schema.h:17,
                 from /tmp/scratch/pytorch/caffe2/core/net.h:18,
                 from /tmp/scratch/pytorch/caffe2/core/operator.h:23,
                 from /tmp/scratch/pytorch/binaries/speed_benchmark.cc:22:
/tmp/scratch/pytorch/caffe2/utils/cblas.h:8:10: fatal error: mkl_cblas.h: No such file or directory
    8 | #include <mkl_cblas.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
[6/27] : && /usr/bin/g++-10 -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICA
TE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-funct
ion -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=
always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -rdynamic -pthread binaries/CMakeFiles/run_plan.dir/run_p
lan.cc.o -o bin/run_plan  -Wl,-rpath,/usr/local/lib:/tmp/scratch/pytorch/build/lib:  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch.so" -Wl,--as-needed  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch_cpu.so" -Wl,--as-needed  /us
r/local/lib/libprotobuf.so.3.19.0.0  /usr/lib/x86_64-linux-gnu/libz.so  lib/libc10.so  -pthread  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_lp64.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_gnu_thread.so  /opt/intel/oneapi/mkl/latest/li
b/intel64/libmkl_core.so  -fopenmp  /usr/lib/x86_64-linux-gnu/libpthread.so  -lm  /usr/lib/x86_64-linux-gnu/libdl.so  /usr/local/lib/libglog.so.0.4.0  /usr/local/lib/libgflags.so.2.2.2  /usr/local/lib/libunwind.so  -lpthread && :
FAILED: bin/run_plan 
: && /usr/bin/g++-10 -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBI
LE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-function -Wn
o-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always 
-faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -rdynamic -pthread binaries/CMakeFiles/run_plan.dir/run_plan.cc.
o -o bin/run_plan  -Wl,-rpath,/usr/local/lib:/tmp/scratch/pytorch/build/lib:  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch.so" -Wl,--as-needed  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch_cpu.so" -Wl,--as-needed  /usr/local
/lib/libprotobuf.so.3.19.0.0  /usr/lib/x86_64-linux-gnu/libz.so  lib/libc10.so  -pthread  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_lp64.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_gnu_thread.so  /opt/intel/oneapi/mkl/latest/lib/intel
64/libmkl_core.so  -fopenmp  /usr/lib/x86_64-linux-gnu/libpthread.so  -lm  /usr/lib/x86_64-linux-gnu/libdl.so  /usr/local/lib/libglog.so.0.4.0  /usr/local/lib/libgflags.so.2.2.2  /usr/local/lib/libunwind.so  -lpthread && :
/usr/bin/ld: binaries/CMakeFiles/run_plan.dir/run_plan.cc.o: warning: relocation against `_ZN3fLB37FLAGS_caffe2_print_blob_sizes_at_exitE' in read-only section `.text._ZNSt10unique_ptrIN6caffe29WorkspaceESt14default_deleteIS1_EED2Ev[_ZNSt10unique_ptrIN6c
affe29WorkspaceESt14default_deleteIS1_EED5Ev]'
/usr/bin/ld: binaries/CMakeFiles/run_plan.dir/run_plan.cc.o: in function `caffe2::Workspace::~Workspace()':
/usr/local/src/pytorch/build/../caffe2/core/workspace.h:107: undefined reference to `fLB::FLAGS_caffe2_print_blob_sizes_at_exit'
/usr/bin/ld: /usr/local/src/pytorch/build/../caffe2/core/workspace.h:108: undefined reference to `caffe2::Workspace::PrintBlobSizes()'
/usr/bin/ld: binaries/CMakeFiles/run_plan.dir/run_plan.cc.o: in function `caffe2::Workspace::Workspace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, caffe2::Workspace const*)':
/usr/local/src/pytorch/build/../caffe2/core/workspace.h:101: undefined reference to `caffe2::Workspace::bookkeeper()'
/usr/bin/ld: binaries/CMakeFiles/run_plan.dir/run_plan.cc.o: in function `main':
/usr/local/src/pytorch/build/../binaries/run_plan.cc:26: undefined reference to `caffe2::GlobalInit(int*, char***)'
/usr/bin/ld: binaries/CMakeFiles/run_plan.dir/run_plan.cc.o: in function `caffe2::ReadProtoFromFile(char const*, google::protobuf::Message*)':
/usr/local/src/pytorch/build/../caffe2/utils/proto_utils.h:136: undefined reference to `caffe2::ReadProtoFromBinaryFile(char const*, google::protobuf::MessageLite*)'
/usr/bin/ld: binaries/CMakeFiles/run_plan.dir/run_plan.cc.o: in function `main':
/usr/local/src/pytorch/build/../binaries/run_plan.cc:35: undefined reference to `caffe2::Workspace::RunPlan(caffe2::PlanDef const&, std::function<bool (int)>)'
/usr/bin/ld: binaries/CMakeFiles/run_plan.dir/run_plan.cc.o: in function `caffe2::ReadProtoFromFile(char const*, google::protobuf::Message*)':
/usr/local/src/pytorch/build/../caffe2/utils/proto_utils.h:137: undefined reference to `caffe2::ReadProtoFromTextFile(char const*, google::protobuf::Message*)'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
collect2: error: ld returned 1 exit status
[7/27] ccache /usr/bin/g++-10 -DGFLAGS_IS_A_DLL=0 -DGOOGLE_GLOG_DLL_DECL="" -DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS="" -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 -D
ONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DTH_BLAS_MKL -DUSE_C10D_GLOO -DUSE_C10D_MPI -DUSE_DISTRIBUTED -DUSE_EXTERNAL_MZCRC -DUSE_RPC -DUSE_TENSORPIPE -D_FILE_OFFSET_BITS=64 -I/tmp/scratch/pytorch/build/aten/src -I/tmp/scratch/pytorc
h/aten/src -I/tmp/scratch/pytorch/build -I/tmp/scratch/pytorch -I/tmp/scratch/pytorch/cmake/../third_party/benchmark/include -I/tmp/scratch/pytorch/third_party/onnx -I/tmp/scratch/pytorch/build/third_party/onnx -I/tmp/scratch/pytorch/third_party/foxi -I/
tmp/scratch/pytorch/build/third_party/foxi -I/tmp/scratch/pytorch/torch/csrc/api -I/tmp/scratch/pytorch/torch/csrc/api/include -I/tmp/scratch/pytorch/c10/.. -isystem /tmp/scratch/pytorch/build/third_party/gloo -isystem /tmp/scratch/pytorch/cmake/../third
_party/gloo -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googletest/include -isystem /tmp/scratch/pytorch/third_party/gemmlowp -isystem /tmp/scratch/pytorch
/third_party/neon2sse -isystem /tmp/scratch/pytorch/third_party/XNNPACK/include -isystem /tmp/scratch/pytorch/third_party -isystem /usr/local/include/opencv4 -isystem /usr/local/include/eigen3 -isystem /usr/include/python3.9 -isystem /usr/local/lib/pytho
n3.9/dist-packages/numpy/core/include -isystem /tmp/scratch/pytorch/cmake/../third_party/pybind11/include -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -isystem /usr/lib/x86_64-linux-gnu/openmpi/include -isystem /tmp/scratch/pytorch/third_pa
rty/ideep/include -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_
DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-function -Wno-u
nused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -fa
ligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -fPIE   -march=native -DCAFFE2_USE_GLOO -DHAVE_GCC_GET_CPUID -DUSE_
AVX -DUSE_AVX2 -DTH_HAVE_THREAD -pthread -std=gnu++14 -MD -MT binaries/CMakeFiles/run_plan_mpi.dir/run_plan_mpi.cc.o -MF binaries/CMakeFiles/run_plan_mpi.dir/run_plan_mpi.cc.o.d -o binaries/CMakeFiles/run_plan_mpi.dir/run_plan_mpi.cc.o -c /tmp/scratch/py
torch/binaries/run_plan_mpi.cc
FAILED: binaries/CMakeFiles/run_plan_mpi.dir/run_plan_mpi.cc.o 
ccache /usr/bin/g++-10 -DGFLAGS_IS_A_DLL=0 -DGOOGLE_GLOG_DLL_DECL="" -DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS="" -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_C10D_GLOO -DUSE_C10D_MPI -DUSE_DISTRIBUTED -DUSE_EXTERNAL_MZCRC -DUSE_RPC -DUSE_TENSORPIPE -D_FILE_OFFSET_BITS=64 -I/tmp/scratch/pytorch/build/aten/src -I/tmp/scratch/pytorch/aten/
src -I/tmp/scratch/pytorch/build -I/tmp/scratch/pytorch -I/tmp/scratch/pytorch/cmake/../third_party/benchmark/include -I/tmp/scratch/pytorch/third_party/onnx -I/tmp/scratch/pytorch/build/third_party/onnx -I/tmp/scratch/pytorch/third_party/foxi -I/tmp/scr
atch/pytorch/build/third_party/foxi -I/tmp/scratch/pytorch/torch/csrc/api -I/tmp/scratch/pytorch/torch/csrc/api/include -I/tmp/scratch/pytorch/c10/.. -isystem /tmp/scratch/pytorch/build/third_party/gloo -isystem /tmp/scratch/pytorch/cmake/../third_party/
gloo -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googletest/include -isystem /tmp/scratch/pytorch/third_party/gemmlowp -isystem /tmp/scratch/pytorch/third_
party/neon2sse -isystem /tmp/scratch/pytorch/third_party/XNNPACK/include -isystem /tmp/scratch/pytorch/third_party -isystem /usr/local/include/opencv4 -isystem /usr/local/include/eigen3 -isystem /usr/include/python3.9 -isystem /usr/local/lib/python3.9/di
st-packages/numpy/core/include -isystem /tmp/scratch/pytorch/cmake/../third_party/pybind11/include -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -isystem /usr/lib/x86_64-linux-gnu/openmpi/include -isystem /tmp/scratch/pytorch/third_party/ide
ep/include -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_H
ANDLE -DEDGE_PROFILER_USE_KINETO -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-function -Wno-unused-r
esult -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-
new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -fPIE   -march=native -DCAFFE2_USE_GLOO -DHAVE_GCC_GET_CPUID -DUSE_AVX -DU
SE_AVX2 -DTH_HAVE_THREAD -pthread -std=gnu++14 -MD -MT binaries/CMakeFiles/run_plan_mpi.dir/run_plan_mpi.cc.o -MF binaries/CMakeFiles/run_plan_mpi.dir/run_plan_mpi.cc.o.d -o binaries/CMakeFiles/run_plan_mpi.dir/run_plan_mpi.cc.o -c /tmp/scratch/pytorch/b
inaries/run_plan_mpi.cc
In file included from /tmp/scratch/pytorch/caffe2/utils/math.h:9,
                 from /tmp/scratch/pytorch/caffe2/utils/filler.h:8,
                 from /tmp/scratch/pytorch/caffe2/core/operator_schema.h:17,
                 from /tmp/scratch/pytorch/caffe2/core/net.h:18,
                 from /tmp/scratch/pytorch/caffe2/core/operator.h:23,
                 from /tmp/scratch/pytorch/binaries/run_plan_mpi.cc:22:
/tmp/scratch/pytorch/caffe2/utils/cblas.h:8:10: fatal error: mkl_cblas.h: No such file or directory
    8 | #include <mkl_cblas.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
[8/27] ccache /usr/bin/g++-10 -DGFLAGS_IS_A_DLL=0 -DGOOGLE_GLOG_DLL_DECL="" -DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS="" -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 -D
ONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DTH_BLAS_MKL -DUSE_C10D_GLOO -DUSE_C10D_MPI -DUSE_DISTRIBUTED -DUSE_EXTERNAL_MZCRC -DUSE_RPC -DUSE_TENSORPIPE -D_FILE_OFFSET_BITS=64 -I/tmp/scratch/pytorch/build/aten/src -I/tmp/scratch/pytorc
h/aten/src -I/tmp/scratch/pytorch/build -I/tmp/scratch/pytorch -I/tmp/scratch/pytorch/cmake/../third_party/benchmark/include -I/tmp/scratch/pytorch/third_party/onnx -I/tmp/scratch/pytorch/build/third_party/onnx -I/tmp/scratch/pytorch/third_party/foxi -I/
tmp/scratch/pytorch/build/third_party/foxi -I/tmp/scratch/pytorch/torch/csrc/api -I/tmp/scratch/pytorch/torch/csrc/api/include -I/tmp/scratch/pytorch/c10/.. -isystem /tmp/scratch/pytorch/build/third_party/gloo -isystem /tmp/scratch/pytorch/cmake/../third
_party/gloo -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googletest/include -isystem /tmp/scratch/pytorch/third_party/gemmlowp -isystem /tmp/scratch/pytorch
/third_party/neon2sse -isystem /tmp/scratch/pytorch/third_party/XNNPACK/include -isystem /tmp/scratch/pytorch/third_party -isystem /usr/local/include/opencv4 -isystem /usr/local/include/eigen3 -isystem /usr/include/python3.9 -isystem /usr/local/lib/pytho
n3.9/dist-packages/numpy/core/include -isystem /tmp/scratch/pytorch/cmake/../third_party/pybind11/include -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -isystem /usr/lib/x86_64-linux-gnu/openmpi/include -isystem /tmp/scratch/pytorch/third_pa
rty/ideep/include -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_
DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-function -Wno-u
nused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -fa
ligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -fPIE   -march=native -DCAFFE2_USE_GLOO -DHAVE_GCC_GET_CPUID -DUSE_
AVX -DUSE_AVX2 -DTH_HAVE_THREAD -pthread -std=gnu++14 -MD -MT binaries/CMakeFiles/print_registered_core_operators.dir/print_registered_core_operators.cc.o -MF binaries/CMakeFiles/print_registered_core_operators.dir/print_registered_core_operators.cc.o.d 
-o binaries/CMakeFiles/print_registered_core_operators.dir/print_registered_core_operators.cc.o -c /tmp/scratch/pytorch/binaries/print_registered_core_operators.cc
FAILED: binaries/CMakeFiles/print_registered_core_operators.dir/print_registered_core_operators.cc.o 
ccache /usr/bin/g++-10 -DGFLAGS_IS_A_DLL=0 -DGOOGLE_GLOG_DLL_DECL="" -DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS="" -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_C10D_GLOO -DUSE_C10D_MPI -DUSE_DISTRIBUTED -DUSE_EXTERNAL_MZCRC -DUSE_RPC -DUSE_TENSORPIPE -D_FILE_OFFSET_BITS=64 -I/tmp/scratch/pytorch/build/aten/src -I/tmp/scratch/pytorch/aten/
src -I/tmp/scratch/pytorch/build -I/tmp/scratch/pytorch -I/tmp/scratch/pytorch/cmake/../third_party/benchmark/include -I/tmp/scratch/pytorch/third_party/onnx -I/tmp/scratch/pytorch/build/third_party/onnx -I/tmp/scratch/pytorch/third_party/foxi -I/tmp/scr
atch/pytorch/build/third_party/foxi -I/tmp/scratch/pytorch/torch/csrc/api -I/tmp/scratch/pytorch/torch/csrc/api/include -I/tmp/scratch/pytorch/c10/.. -isystem /tmp/scratch/pytorch/build/third_party/gloo -isystem /tmp/scratch/pytorch/cmake/../third_party/
gloo -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googletest/include -isystem /tmp/scratch/pytorch/third_party/gemmlowp -isystem /tmp/scratch/pytorch/third_
party/neon2sse -isystem /tmp/scratch/pytorch/third_party/XNNPACK/include -isystem /tmp/scratch/pytorch/third_party -isystem /usr/local/include/opencv4 -isystem /usr/local/include/eigen3 -isystem /usr/include/python3.9 -isystem /usr/local/lib/python3.9/di
st-packages/numpy/core/include -isystem /tmp/scratch/pytorch/cmake/../third_party/pybind11/include -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -isystem /usr/lib/x86_64-linux-gnu/openmpi/include -isystem /tmp/scratch/pytorch/third_party/ide
ep/include -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_H
ANDLE -DEDGE_PROFILER_USE_KINETO -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-function -Wno-unused-r
esult -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-
new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -fPIE   -march=native -DCAFFE2_USE_GLOO -DHAVE_GCC_GET_CPUID -DUSE_AVX -DU
SE_AVX2 -DTH_HAVE_THREAD -pthread -std=gnu++14 -MD -MT binaries/CMakeFiles/print_registered_core_operators.dir/print_registered_core_operators.cc.o -MF binaries/CMakeFiles/print_registered_core_operators.dir/print_registered_core_operators.cc.o.d -o bina
ries/CMakeFiles/print_registered_core_operators.dir/print_registered_core_operators.cc.o -c /tmp/scratch/pytorch/binaries/print_registered_core_operators.cc
In file included from /tmp/scratch/pytorch/caffe2/utils/math.h:9,
                 from /tmp/scratch/pytorch/caffe2/utils/filler.h:8,
                 from /tmp/scratch/pytorch/caffe2/core/operator_schema.h:17,
                 from /tmp/scratch/pytorch/caffe2/core/net.h:18,
                 from /tmp/scratch/pytorch/caffe2/core/operator.h:23,
                 from /tmp/scratch/pytorch/binaries/print_registered_core_operators.cc:21:
/tmp/scratch/pytorch/caffe2/utils/cblas.h:8:10: fatal error: mkl_cblas.h: No such file or directory
    8 | #include <mkl_cblas.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
[9/27] : && /usr/bin/g++-10 -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICA
TE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-funct
ion -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=
always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -rdynamic -pthread binaries/CMakeFiles/db_throughput.dir/
db_throughput.cc.o -o bin/db_throughput  -Wl,-rpath,/usr/local/lib:/tmp/scratch/pytorch/build/lib:  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch.so" -Wl,--as-needed  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch_cpu.so" -Wl,-
-as-needed  /usr/local/lib/libprotobuf.so.3.19.0.0  /usr/lib/x86_64-linux-gnu/libz.so  lib/libc10.so  -pthread  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_lp64.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_gnu_thread.so  /opt/intel/oneap
i/mkl/latest/lib/intel64/libmkl_core.so  -fopenmp  /usr/lib/x86_64-linux-gnu/libpthread.so  -lm  /usr/lib/x86_64-linux-gnu/libdl.so  /usr/local/lib/libglog.so.0.4.0  /usr/local/lib/libgflags.so.2.2.2  /usr/local/lib/libunwind.so  -lpthread && :
FAILED: bin/db_throughput 
: && /usr/bin/g++-10 -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBI
LE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-function -Wn
o-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always 
-faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -rdynamic -pthread binaries/CMakeFiles/db_throughput.dir/db_thro
ughput.cc.o -o bin/db_throughput  -Wl,-rpath,/usr/local/lib:/tmp/scratch/pytorch/build/lib:  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch.so" -Wl,--as-needed  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch_cpu.so" -Wl,--as-nee
ded  /usr/local/lib/libprotobuf.so.3.19.0.0  /usr/lib/x86_64-linux-gnu/libz.so  lib/libc10.so  -pthread  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_lp64.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_gnu_thread.so  /opt/intel/oneapi/mkl/l
atest/lib/intel64/libmkl_core.so  -fopenmp  /usr/lib/x86_64-linux-gnu/libpthread.so  -lm  /usr/lib/x86_64-linux-gnu/libdl.so  /usr/local/lib/libglog.so.0.4.0  /usr/local/lib/libgflags.so.2.2.2  /usr/local/lib/libunwind.so  -lpthread && :
/usr/bin/ld: binaries/CMakeFiles/db_throughput.dir/db_throughput.cc.o: in function `caffe2::db::CreateDB(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std:
:allocator<char> > const&, caffe2::db::Mode)':
/usr/local/src/pytorch/caffe2/core/db.h:135: undefined reference to `caffe2::db::Caffe2DBRegistry[abi:cxx11]()'
/usr/bin/ld: /usr/local/src/pytorch/caffe2/core/db.h:135: undefined reference to `caffe2::db::Caffe2DBRegistry[abi:cxx11]()'
/usr/bin/ld: binaries/CMakeFiles/db_throughput.dir/db_throughput.cc.o: in function `main':
/usr/local/src/pytorch/binaries/db_throughput.cc:97: undefined reference to `caffe2::GlobalInit(int*, char***)'
collect2: error: ld returned 1 exit status
[10/27] : && /usr/bin/g++-10 -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLIC
ATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-func
tion -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color
=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -rdynamic -pthread binaries/CMakeFiles/at_launch_benchma
rk.dir/at_launch_benchmark.cc.o -o bin/at_launch_benchmark  -Wl,-rpath,/usr/local/lib:/tmp/scratch/pytorch/build/lib:  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch.so" -Wl,--as-needed  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/lib
torch_cpu.so" -Wl,--as-needed  /usr/local/lib/libprotobuf.so.3.19.0.0  /usr/lib/x86_64-linux-gnu/libz.so  lib/libc10.so  -pthread  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_lp64.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_gnu_thread.s
o  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_core.so  -fopenmp  /usr/lib/x86_64-linux-gnu/libpthread.so  -lm  /usr/lib/x86_64-linux-gnu/libdl.so  /usr/local/lib/libglog.so.0.4.0  /usr/local/lib/libgflags.so.2.2.2  /usr/local/lib/libunwind.so  -lpth
read && :
FAILED: bin/at_launch_benchmark 
: && /usr/bin/g++-10 -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBI
LE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-function -Wn
o-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always 
-faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -rdynamic -pthread binaries/CMakeFiles/at_launch_benchmark.dir/a
t_launch_benchmark.cc.o -o bin/at_launch_benchmark  -Wl,-rpath,/usr/local/lib:/tmp/scratch/pytorch/build/lib:  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch.so" -Wl,--as-needed  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch_cp
u.so" -Wl,--as-needed  /usr/local/lib/libprotobuf.so.3.19.0.0  /usr/lib/x86_64-linux-gnu/libz.so  lib/libc10.so  -pthread  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_lp64.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_gnu_thread.so  /opt/
intel/oneapi/mkl/latest/lib/intel64/libmkl_core.so  -fopenmp  /usr/lib/x86_64-linux-gnu/libpthread.so  -lm  /usr/lib/x86_64-linux-gnu/libdl.so  /usr/local/lib/libglog.so.0.4.0  /usr/local/lib/libgflags.so.2.2.2  /usr/local/lib/libunwind.so  -lpthread && 
:
/usr/bin/ld: binaries/CMakeFiles/at_launch_benchmark.dir/at_launch_benchmark.cc.o: in function `main':
/usr/local/src/pytorch/binaries/at_launch_benchmark.cc:58: undefined reference to `caffe2::unsafeRunCaffe2InitFunction(char const*, int*, char***)'
collect2: error: ld returned 1 exit status
[11/27] : && /usr/bin/g++-10 -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLIC
ATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-func
tion -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color
=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -rdynamic -pthread binaries/CMakeFiles/tutorial_blob.dir
/tutorial_blob.cc.o -o bin/tutorial_blob  -Wl,-rpath,/usr/local/lib:/tmp/scratch/pytorch/build/lib:  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch.so" -Wl,--as-needed  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch_cpu.so" -Wl,
--as-needed  /usr/local/lib/libprotobuf.so.3.19.0.0  /usr/lib/x86_64-linux-gnu/libz.so  lib/libc10.so  -pthread  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_lp64.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_gnu_thread.so  /opt/intel/onea
pi/mkl/latest/lib/intel64/libmkl_core.so  -fopenmp  /usr/lib/x86_64-linux-gnu/libpthread.so  -lm  /usr/lib/x86_64-linux-gnu/libdl.so  /usr/local/lib/libglog.so.0.4.0  /usr/local/lib/libgflags.so.2.2.2  /usr/local/lib/libunwind.so  -lpthread && :
FAILED: bin/tutorial_blob 
: && /usr/bin/g++-10 -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBI
LE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-function -Wn
o-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always 
-faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -rdynamic -pthread binaries/CMakeFiles/tutorial_blob.dir/tutoria
l_blob.cc.o -o bin/tutorial_blob  -Wl,-rpath,/usr/local/lib:/tmp/scratch/pytorch/build/lib:  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch.so" -Wl,--as-needed  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch_cpu.so" -Wl,--as-nee
ded  /usr/local/lib/libprotobuf.so.3.19.0.0  /usr/lib/x86_64-linux-gnu/libz.so  lib/libc10.so  -pthread  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_lp64.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_gnu_thread.so  /opt/intel/oneapi/mkl/l
atest/lib/intel64/libmkl_core.so  -fopenmp  /usr/lib/x86_64-linux-gnu/libpthread.so  -lm  /usr/lib/x86_64-linux-gnu/libdl.so  /usr/local/lib/libglog.so.0.4.0  /usr/local/lib/libgflags.so.2.2.2  /usr/local/lib/libunwind.so  -lpthread && :
/usr/bin/ld: binaries/CMakeFiles/tutorial_blob.dir/tutorial_blob.cc.o: in function `main':
/usr/local/src/pytorch/binaries/tutorial_blob.cc:27: undefined reference to `caffe2::GlobalInit(int*, char***)'
collect2: error: ld returned 1 exit status
[12/27] : && /usr/bin/g++-10 -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLIC
ATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-func
tion -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color
=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -rdynamic -pthread binaries/CMakeFiles/make_cifar_db.dir
/make_cifar_db.cc.o -o bin/make_cifar_db  -Wl,-rpath,/usr/local/lib:/tmp/scratch/pytorch/build/lib:  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch.so" -Wl,--as-needed  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch_cpu.so" -Wl,
--as-needed  /usr/local/lib/libprotobuf.so.3.19.0.0  /usr/lib/x86_64-linux-gnu/libz.so  lib/libc10.so  -pthread  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_lp64.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_gnu_thread.so  /opt/intel/onea
pi/mkl/latest/lib/intel64/libmkl_core.so  -fopenmp  /usr/lib/x86_64-linux-gnu/libpthread.so  -lm  /usr/lib/x86_64-linux-gnu/libdl.so  /usr/local/lib/libglog.so.0.4.0  /usr/local/lib/libgflags.so.2.2.2  /usr/local/lib/libunwind.so  -lpthread && :
FAILED: bin/make_cifar_db 
: && /usr/bin/g++-10 -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBI
LE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-function -Wn
o-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always 
-faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -rdynamic -pthread binaries/CMakeFiles/make_cifar_db.dir/make_ci
far_db.cc.o -o bin/make_cifar_db  -Wl,-rpath,/usr/local/lib:/tmp/scratch/pytorch/build/lib:  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch.so" -Wl,--as-needed  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch_cpu.so" -Wl,--as-nee
ded  /usr/local/lib/libprotobuf.so.3.19.0.0  /usr/lib/x86_64-linux-gnu/libz.so  lib/libc10.so  -pthread  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_lp64.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_gnu_thread.so  /opt/intel/oneapi/mkl/l
atest/lib/intel64/libmkl_core.so  -fopenmp  /usr/lib/x86_64-linux-gnu/libpthread.so  -lm  /usr/lib/x86_64-linux-gnu/libdl.so  /usr/local/lib/libglog.so.0.4.0  /usr/local/lib/libgflags.so.2.2.2  /usr/local/lib/libunwind.so  -lpthread && :
/usr/bin/ld: binaries/CMakeFiles/make_cifar_db.dir/make_cifar_db.cc.o: in function `caffe2::db::CreateDB(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std:
:allocator<char> > const&, caffe2::db::Mode)':
/usr/local/src/pytorch/caffe2/core/db.h:135: undefined reference to `caffe2::db::Caffe2DBRegistry[abi:cxx11]()'
/usr/bin/ld: /usr/local/src/pytorch/caffe2/core/db.h:135: undefined reference to `caffe2::db::Caffe2DBRegistry[abi:cxx11]()'
/usr/bin/ld: binaries/CMakeFiles/make_cifar_db.dir/make_cifar_db.cc.o: in function `main':
/usr/local/src/pytorch/binaries/make_cifar_db.cc:141: undefined reference to `caffe2::GlobalInit(int*, char***)'
collect2: error: ld returned 1 exit status
[13/27] : && /usr/bin/g++-10 -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLIC
ATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-func
tion -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color
=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -rdynamic -pthread binaries/CMakeFiles/intra_inter_bench
mark.dir/intra_inter_benchmark.cc.o -o bin/intra_inter_benchmark  -Wl,-rpath,/usr/local/lib:/tmp/scratch/pytorch/build/lib:  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch.so" -Wl,--as-needed  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/l
ib/libtorch_cpu.so" -Wl,--as-needed  /usr/local/lib/libprotobuf.so.3.19.0.0  /usr/lib/x86_64-linux-gnu/libz.so  lib/libc10.so  -pthread  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_lp64.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_gnu_th
read.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_core.so  -fopenmp  /usr/lib/x86_64-linux-gnu/libpthread.so  -lm  /usr/lib/x86_64-linux-gnu/libdl.so  /usr/local/lib/libglog.so.0.4.0  /usr/local/lib/libgflags.so.2.2.2  /usr/local/lib/libunwind.so 
 -lpthread && :
FAILED: bin/intra_inter_benchmark 
: && /usr/bin/g++-10 -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBI
LE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-function -Wn
o-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always 
-faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -rdynamic -pthread binaries/CMakeFiles/intra_inter_benchmark.dir
/intra_inter_benchmark.cc.o -o bin/intra_inter_benchmark  -Wl,-rpath,/usr/local/lib:/tmp/scratch/pytorch/build/lib:  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch.so" -Wl,--as-needed  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libto
rch_cpu.so" -Wl,--as-needed  /usr/local/lib/libprotobuf.so.3.19.0.0  /usr/lib/x86_64-linux-gnu/libz.so  lib/libc10.so  -pthread  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_lp64.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_gnu_thread.so 
 /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_core.so  -fopenmp  /usr/lib/x86_64-linux-gnu/libpthread.so  -lm  /usr/lib/x86_64-linux-gnu/libdl.so  /usr/local/lib/libglog.so.0.4.0  /usr/local/lib/libgflags.so.2.2.2  /usr/local/lib/libunwind.so  -lpthre
ad && :
/usr/bin/ld: binaries/CMakeFiles/intra_inter_benchmark.dir/intra_inter_benchmark.cc.o: in function `main':
/usr/local/src/pytorch/build/../binaries/intra_inter_benchmark.cc:111: undefined reference to `caffe2::unsafeRunCaffe2InitFunction(char const*, int*, char***)'
collect2: error: ld returned 1 exit status
[14/27] : && /usr/bin/g++-10 -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLIC
ATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-func
tion -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color
=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -rdynamic -pthread binaries/CMakeFiles/make_image_db.dir
/make_image_db.cc.o -o bin/make_image_db  -Wl,-rpath,/usr/local/lib:/tmp/scratch/pytorch/build/lib:  /usr/local/lib/libopencv_highgui.so.4.5.4  /usr/local/lib/libopencv_optflow.so.4.5.4  /usr/local/lib/libopencv_videoio.so.4.5.4  -Wl,--no-as-needed,"/tmp
/scratch/pytorch/build/lib/libtorch.so" -Wl,--as-needed  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch_cpu.so" -Wl,--as-needed  /usr/local/lib/libprotobuf.so.3.19.0.0  /usr/lib/x86_64-linux-gnu/libz.so  lib/libc10.so  -pthread  /opt/intel/o
neapi/mkl/latest/lib/intel64/libmkl_intel_lp64.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_gnu_thread.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_core.so  -fopenmp  /usr/lib/x86_64-linux-gnu/libpthread.so  -lm  /usr/lib/x86_64-linux-gnu/l
ibdl.so  /usr/local/lib/libglog.so.0.4.0  /usr/local/lib/libgflags.so.2.2.2  /usr/local/lib/libunwind.so  -lpthread  /usr/local/lib/libopencv_ximgproc.so.4.5.4  /usr/local/lib/libopencv_imgcodecs.so.4.5.4  /usr/local/lib/libopencv_video.so.4.5.4  /usr/lo
cal/lib/libopencv_calib3d.so.4.5.4  /usr/local/lib/libopencv_features2d.so.4.5.4  /usr/local/lib/libopencv_imgproc.so.4.5.4  /usr/local/lib/libopencv_flann.so.4.5.4  /usr/local/lib/libopencv_core.so.4.5.4 && :
FAILED: bin/make_image_db 
: && /usr/bin/g++-10 -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBI
LE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-function -Wn
o-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always 
-faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -rdynamic -pthread binaries/CMakeFiles/make_image_db.dir/make_im
age_db.cc.o -o bin/make_image_db  -Wl,-rpath,/usr/local/lib:/tmp/scratch/pytorch/build/lib:  /usr/local/lib/libopencv_highgui.so.4.5.4  /usr/local/lib/libopencv_optflow.so.4.5.4  /usr/local/lib/libopencv_videoio.so.4.5.4  -Wl,--no-as-needed,"/tmp/scratch
/pytorch/build/lib/libtorch.so" -Wl,--as-needed  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch_cpu.so" -Wl,--as-needed  /usr/local/lib/libprotobuf.so.3.19.0.0  /usr/lib/x86_64-linux-gnu/libz.so  lib/libc10.so  -pthread  /opt/intel/oneapi/mk
l/latest/lib/intel64/libmkl_intel_lp64.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_gnu_thread.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_core.so  -fopenmp  /usr/lib/x86_64-linux-gnu/libpthread.so  -lm  /usr/lib/x86_64-linux-gnu/libdl.so 
 /usr/local/lib/libglog.so.0.4.0  /usr/local/lib/libgflags.so.2.2.2  /usr/local/lib/libunwind.so  -lpthread  /usr/local/lib/libopencv_ximgproc.so.4.5.4  /usr/local/lib/libopencv_imgcodecs.so.4.5.4  /usr/local/lib/libopencv_video.so.4.5.4  /usr/local/lib/
libopencv_calib3d.so.4.5.4  /usr/local/lib/libopencv_features2d.so.4.5.4  /usr/local/lib/libopencv_imgproc.so.4.5.4  /usr/local/lib/libopencv_flann.so.4.5.4  /usr/local/lib/libopencv_core.so.4.5.4 && :
/usr/bin/ld: binaries/CMakeFiles/make_image_db.dir/make_image_db.cc.o: in function `caffe2::db::CreateDB(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std:
:allocator<char> > const&, caffe2::db::Mode)':
/usr/local/src/pytorch/caffe2/core/db.h:135: undefined reference to `caffe2::db::Caffe2DBRegistry[abi:cxx11]()'
/usr/bin/ld: binaries/CMakeFiles/make_image_db.dir/make_image_db.cc.o: in function `main':
/usr/local/src/pytorch/binaries/make_image_db.cc:275: undefined reference to `caffe2::GlobalInit(int*, char***)'
collect2: error: ld returned 1 exit status
[15/27] : && /usr/bin/g++-10 -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLIC
ATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-func
tion -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color
=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -rdynamic -pthread binaries/CMakeFiles/make_mnist_db.dir
/make_mnist_db.cc.o -o bin/make_mnist_db  -Wl,-rpath,/usr/local/lib:/tmp/scratch/pytorch/build/lib:  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch.so" -Wl,--as-needed  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch_cpu.so" -Wl,
--as-needed  /usr/local/lib/libprotobuf.so.3.19.0.0  /usr/lib/x86_64-linux-gnu/libz.so  lib/libc10.so  -pthread  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_lp64.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_gnu_thread.so  /opt/intel/onea
pi/mkl/latest/lib/intel64/libmkl_core.so  -fopenmp  /usr/lib/x86_64-linux-gnu/libpthread.so  -lm  /usr/lib/x86_64-linux-gnu/libdl.so  /usr/local/lib/libglog.so.0.4.0  /usr/local/lib/libgflags.so.2.2.2  /usr/local/lib/libunwind.so  -lpthread && :
FAILED: bin/make_mnist_db 
: && /usr/bin/g++-10 -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBI
LE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-function -Wn
o-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always 
-faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -rdynamic -pthread binaries/CMakeFiles/make_mnist_db.dir/make_mn
ist_db.cc.o -o bin/make_mnist_db  -Wl,-rpath,/usr/local/lib:/tmp/scratch/pytorch/build/lib:  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch.so" -Wl,--as-needed  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch_cpu.so" -Wl,--as-nee
ded  /usr/local/lib/libprotobuf.so.3.19.0.0  /usr/lib/x86_64-linux-gnu/libz.so  lib/libc10.so  -pthread  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_lp64.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_gnu_thread.so  /opt/intel/oneapi/mkl/l
atest/lib/intel64/libmkl_core.so  -fopenmp  /usr/lib/x86_64-linux-gnu/libpthread.so  -lm  /usr/lib/x86_64-linux-gnu/libdl.so  /usr/local/lib/libglog.so.0.4.0  /usr/local/lib/libgflags.so.2.2.2  /usr/local/lib/libunwind.so  -lpthread && :
/usr/bin/ld: binaries/CMakeFiles/make_mnist_db.dir/make_mnist_db.cc.o: in function `caffe2::db::CreateDB(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std:
:allocator<char> > const&, caffe2::db::Mode)':
/usr/local/src/pytorch/build/../caffe2/core/db.h:135: undefined reference to `caffe2::db::Caffe2DBRegistry[abi:cxx11]()'
/usr/bin/ld: binaries/CMakeFiles/make_mnist_db.dir/make_mnist_db.cc.o: in function `main':
/usr/local/src/pytorch/build/../binaries/make_mnist_db.cc:137: undefined reference to `caffe2::GlobalInit(int*, char***)'
collect2: error: ld returned 1 exit status
[16/27] : && /usr/bin/g++-10 -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLIC
ATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-func
tion -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color
=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -rdynamic -pthread binaries/CMakeFiles/convert_image_to_
tensor.dir/convert_image_to_tensor.cc.o -o bin/convert_image_to_tensor  -Wl,-rpath,/usr/local/lib:/tmp/scratch/pytorch/build/lib:  /usr/local/lib/libopencv_highgui.so.4.5.4  /usr/local/lib/libopencv_optflow.so.4.5.4  /usr/local/lib/libopencv_videoio.so.4
.5.4  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch.so" -Wl,--as-needed  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch_cpu.so" -Wl,--as-needed  /usr/local/lib/libprotobuf.so.3.19.0.0  /usr/lib/x86_64-linux-gnu/libz.so  lib/lib
c10.so  -pthread  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_lp64.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_gnu_thread.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_core.so  -fopenmp  /usr/lib/x86_64-linux-gnu/libpthread.so  -l
m  /usr/lib/x86_64-linux-gnu/libdl.so  /usr/local/lib/libglog.so.0.4.0  /usr/local/lib/libgflags.so.2.2.2  /usr/local/lib/libunwind.so  -lpthread  /usr/local/lib/libopencv_ximgproc.so.4.5.4  /usr/local/lib/libopencv_imgcodecs.so.4.5.4  /usr/local/lib/lib
opencv_video.so.4.5.4  /usr/local/lib/libopencv_calib3d.so.4.5.4  /usr/local/lib/libopencv_features2d.so.4.5.4  /usr/local/lib/libopencv_imgproc.so.4.5.4  /usr/local/lib/libopencv_flann.so.4.5.4  /usr/local/lib/libopencv_core.so.4.5.4 && :
FAILED: bin/convert_image_to_tensor 
: && /usr/bin/g++-10 -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBI
LE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-function -Wn
o-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always 
-faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -rdynamic -pthread binaries/CMakeFiles/convert_image_to_tensor.d
ir/convert_image_to_tensor.cc.o -o bin/convert_image_to_tensor  -Wl,-rpath,/usr/local/lib:/tmp/scratch/pytorch/build/lib:  /usr/local/lib/libopencv_highgui.so.4.5.4  /usr/local/lib/libopencv_optflow.so.4.5.4  /usr/local/lib/libopencv_videoio.so.4.5.4  -W
l,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch.so" -Wl,--as-needed  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch_cpu.so" -Wl,--as-needed  /usr/local/lib/libprotobuf.so.3.19.0.0  /usr/lib/x86_64-linux-gnu/libz.so  lib/libc10.so  
-pthread  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_lp64.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_gnu_thread.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_core.so  -fopenmp  /usr/lib/x86_64-linux-gnu/libpthread.so  -lm  /usr/
lib/x86_64-linux-gnu/libdl.so  /usr/local/lib/libglog.so.0.4.0  /usr/local/lib/libgflags.so.2.2.2  /usr/local/lib/libunwind.so  -lpthread  /usr/local/lib/libopencv_ximgproc.so.4.5.4  /usr/local/lib/libopencv_imgcodecs.so.4.5.4  /usr/local/lib/libopencv_v
ideo.so.4.5.4  /usr/local/lib/libopencv_calib3d.so.4.5.4  /usr/local/lib/libopencv_features2d.so.4.5.4  /usr/local/lib/libopencv_imgproc.so.4.5.4  /usr/local/lib/libopencv_flann.so.4.5.4  /usr/local/lib/libopencv_core.so.4.5.4 && :
/usr/bin/ld: binaries/CMakeFiles/convert_image_to_tensor.dir/convert_image_to_tensor.cc.o: in function `caffe2::WriteProtoToBinaryFile(google::protobuf::MessageLite const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > c
onst&)':
/usr/local/src/pytorch/caffe2/utils/proto_utils.h:58: undefined reference to `caffe2::WriteProtoToBinaryFile(google::protobuf::MessageLite const&, char const*)'
/usr/bin/ld: binaries/CMakeFiles/convert_image_to_tensor.dir/convert_image_to_tensor.cc.o: in function `caffe2::WriteProtoToTextFile(google::protobuf::Message const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&,
 bool)':
/usr/local/src/pytorch/caffe2/utils/proto_utils.h:131: undefined reference to `caffe2::WriteProtoToTextFile(google::protobuf::Message const&, char const*, bool)'
/usr/bin/ld: binaries/CMakeFiles/convert_image_to_tensor.dir/convert_image_to_tensor.cc.o: in function `main':
/usr/local/src/pytorch/binaries/convert_image_to_tensor.cc:446: undefined reference to `caffe2::GlobalInit(int*, char***)'
collect2: error: ld returned 1 exit status
[17/27] : && /usr/bin/g++-10 -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLIC
ATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-func
tion -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color
=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -rdynamic -pthread binaries/CMakeFiles/convert_db.dir/co
nvert_db.cc.o -o bin/convert_db  -Wl,-rpath,/usr/local/lib:/tmp/scratch/pytorch/build/lib:  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch.so" -Wl,--as-needed  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch_cpu.so" -Wl,--as-need
ed  /usr/local/lib/libprotobuf.so.3.19.0.0  /usr/lib/x86_64-linux-gnu/libz.so  lib/libc10.so  -pthread  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_lp64.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_gnu_thread.so  /opt/intel/oneapi/mkl/la
test/lib/intel64/libmkl_core.so  -fopenmp  /usr/lib/x86_64-linux-gnu/libpthread.so  -lm  /usr/lib/x86_64-linux-gnu/libdl.so  /usr/local/lib/libglog.so.0.4.0  /usr/local/lib/libgflags.so.2.2.2  /usr/local/lib/libunwind.so  -lpthread && :
FAILED: bin/convert_db 
: && /usr/bin/g++-10 -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBI
LE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-function -Wn
o-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always 
-faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -rdynamic -pthread binaries/CMakeFiles/convert_db.dir/convert_db
.cc.o -o bin/convert_db  -Wl,-rpath,/usr/local/lib:/tmp/scratch/pytorch/build/lib:  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch.so" -Wl,--as-needed  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch_cpu.so" -Wl,--as-needed  /usr
/local/lib/libprotobuf.so.3.19.0.0  /usr/lib/x86_64-linux-gnu/libz.so  lib/libc10.so  -pthread  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_lp64.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_gnu_thread.so  /opt/intel/oneapi/mkl/latest/lib
/intel64/libmkl_core.so  -fopenmp  /usr/lib/x86_64-linux-gnu/libpthread.so  -lm  /usr/lib/x86_64-linux-gnu/libdl.so  /usr/local/lib/libglog.so.0.4.0  /usr/local/lib/libgflags.so.2.2.2  /usr/local/lib/libunwind.so  -lpthread && :
/usr/bin/ld: binaries/CMakeFiles/convert_db.dir/convert_db.cc.o: in function `main':
/usr/local/src/pytorch/binaries/convert_db.cc:33: undefined reference to `caffe2::GlobalInit(int*, char***)'
/usr/bin/ld: binaries/CMakeFiles/convert_db.dir/convert_db.cc.o: in function `caffe2::db::CreateDB(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::alloc
ator<char> > const&, caffe2::db::Mode)':
/usr/local/src/pytorch/caffe2/core/db.h:135: undefined reference to `caffe2::db::Caffe2DBRegistry[abi:cxx11]()'
collect2: error: ld returned 1 exit status
[18/27] : && /usr/bin/g++-10 -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLIC
ATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-func
tion -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color
=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -rdynamic -pthread binaries/CMakeFiles/split_db.dir/spli
t_db.cc.o -o bin/split_db  -Wl,-rpath,/usr/local/lib:/tmp/scratch/pytorch/build/lib:  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch.so" -Wl,--as-needed  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch_cpu.so" -Wl,--as-needed  /u
sr/local/lib/libprotobuf.so.3.19.0.0  /usr/lib/x86_64-linux-gnu/libz.so  lib/libc10.so  -pthread  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_lp64.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_gnu_thread.so  /opt/intel/oneapi/mkl/latest/l
ib/intel64/libmkl_core.so  -fopenmp  /usr/lib/x86_64-linux-gnu/libpthread.so  -lm  /usr/lib/x86_64-linux-gnu/libdl.so  /usr/local/lib/libglog.so.0.4.0  /usr/local/lib/libgflags.so.2.2.2  /usr/local/lib/libunwind.so  -lpthread && :
FAILED: bin/split_db 
: && /usr/bin/g++-10 -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBI
LE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-function -Wn
o-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always 
-faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -rdynamic -pthread binaries/CMakeFiles/split_db.dir/split_db.cc.
o -o bin/split_db  -Wl,-rpath,/usr/local/lib:/tmp/scratch/pytorch/build/lib:  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch.so" -Wl,--as-needed  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch_cpu.so" -Wl,--as-needed  /usr/local
/lib/libprotobuf.so.3.19.0.0  /usr/lib/x86_64-linux-gnu/libz.so  lib/libc10.so  -pthread  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_lp64.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_gnu_thread.so  /opt/intel/oneapi/mkl/latest/lib/intel
64/libmkl_core.so  -fopenmp  /usr/lib/x86_64-linux-gnu/libpthread.so  -lm  /usr/lib/x86_64-linux-gnu/libdl.so  /usr/local/lib/libglog.so.0.4.0  /usr/local/lib/libgflags.so.2.2.2  /usr/local/lib/libunwind.so  -lpthread && :
/usr/bin/ld: binaries/CMakeFiles/split_db.dir/split_db.cc.o: in function `caffe2::Split(int, char**)':
/usr/local/src/pytorch/binaries/split_db.cc:33: undefined reference to `caffe2::GlobalInit(int*, char***)'
/usr/bin/ld: binaries/CMakeFiles/split_db.dir/split_db.cc.o: in function `caffe2::db::CreateDB(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator
<char> > const&, caffe2::db::Mode)':
/usr/local/src/pytorch/caffe2/core/db.h:135: undefined reference to `caffe2::db::Caffe2DBRegistry[abi:cxx11]()'
/usr/bin/ld: /usr/local/src/pytorch/caffe2/core/db.h:135: undefined reference to `caffe2::db::Caffe2DBRegistry[abi:cxx11]()'
collect2: error: ld returned 1 exit status
[19/27] : && /usr/bin/g++-10 -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLIC
ATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-func
tion -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color
=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -rdynamic -pthread binaries/CMakeFiles/convert_encoded_t
o_raw_leveldb.dir/convert_encoded_to_raw_leveldb.cc.o -o bin/convert_encoded_to_raw_leveldb  -Wl,-rpath,/usr/local/lib:/tmp/scratch/pytorch/build/lib:  /usr/local/lib/libopencv_highgui.so.4.5.4  /usr/local/lib/libopencv_optflow.so.4.5.4  /usr/local/lib/l
ibopencv_videoio.so.4.5.4  /usr/local/lib/libleveldb.a  /usr/local/lib/libsnappy.so  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch.so" -Wl,--as-needed  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch_cpu.so" -Wl,--as-needed  /us
r/local/lib/libprotobuf.so.3.19.0.0  /usr/lib/x86_64-linux-gnu/libz.so  lib/libc10.so  -pthread  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_lp64.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_gnu_thread.so  /opt/intel/oneapi/mkl/latest/li
b/intel64/libmkl_core.so  -fopenmp  /usr/lib/x86_64-linux-gnu/libpthread.so  -lm  /usr/lib/x86_64-linux-gnu/libdl.so  /usr/local/lib/libglog.so.0.4.0  /usr/local/lib/libgflags.so.2.2.2  /usr/local/lib/libunwind.so  -lpthread  /usr/local/lib/libopencv_xim
gproc.so.4.5.4  /usr/local/lib/libopencv_imgcodecs.so.4.5.4  /usr/local/lib/libopencv_video.so.4.5.4  /usr/local/lib/libopencv_calib3d.so.4.5.4  /usr/local/lib/libopencv_features2d.so.4.5.4  /usr/local/lib/libopencv_imgproc.so.4.5.4  /usr/local/lib/libop
encv_flann.so.4.5.4  /usr/local/lib/libopencv_core.so.4.5.4 && :
FAILED: bin/convert_encoded_to_raw_leveldb 
: && /usr/bin/g++-10 -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBI
LE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-function -Wn
o-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always 
-faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -rdynamic -pthread binaries/CMakeFiles/convert_encoded_to_raw_le
veldb.dir/convert_encoded_to_raw_leveldb.cc.o -o bin/convert_encoded_to_raw_leveldb  -Wl,-rpath,/usr/local/lib:/tmp/scratch/pytorch/build/lib:  /usr/local/lib/libopencv_highgui.so.4.5.4  /usr/local/lib/libopencv_optflow.so.4.5.4  /usr/local/lib/libopencv
_videoio.so.4.5.4  /usr/local/lib/libleveldb.a  /usr/local/lib/libsnappy.so  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch.so" -Wl,--as-needed  -Wl,--no-as-needed,"/tmp/scratch/pytorch/build/lib/libtorch_cpu.so" -Wl,--as-needed  /usr/local/
lib/libprotobuf.so.3.19.0.0  /usr/lib/x86_64-linux-gnu/libz.so  lib/libc10.so  -pthread  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_lp64.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_gnu_thread.so  /opt/intel/oneapi/mkl/latest/lib/intel6
4/libmkl_core.so  -fopenmp  /usr/lib/x86_64-linux-gnu/libpthread.so  -lm  /usr/lib/x86_64-linux-gnu/libdl.so  /usr/local/lib/libglog.so.0.4.0  /usr/local/lib/libgflags.so.2.2.2  /usr/local/lib/libunwind.so  -lpthread  /usr/local/lib/libopencv_ximgproc.so
.4.5.4  /usr/local/lib/libopencv_imgcodecs.so.4.5.4  /usr/local/lib/libopencv_video.so.4.5.4  /usr/local/lib/libopencv_calib3d.so.4.5.4  /usr/local/lib/libopencv_features2d.so.4.5.4  /usr/local/lib/libopencv_imgproc.so.4.5.4  /usr/local/lib/libopencv_fla
nn.so.4.5.4  /usr/local/lib/libopencv_core.so.4.5.4 && :
/usr/bin/ld: binaries/CMakeFiles/convert_encoded_to_raw_leveldb.dir/convert_encoded_to_raw_leveldb.cc.o: in function `main':
/usr/local/src/pytorch/binaries/convert_encoded_to_raw_leveldb.cc:152: undefined reference to `caffe2::GlobalInit(int*, char***)'
collect2: error: ld returned 1 exit status
[20/27] ccache /usr/bin/g++-10 -DGFLAGS_IS_A_DLL=0 -DGOOGLE_GLOG_DLL_DECL="" -DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS="" -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_C10D_GLOO -DUSE_C10D_MPI -DUSE_DISTRIBUTED -DUSE_EXTERNAL_MZCRC -DUSE_RPC -DUSE_TENSORPIPE -D_FILE_OFFSET_BITS=64 -I/tmp/scratch/pytorch/build/aten/src -I/tmp/scratch/pytor
ch/aten/src -I/tmp/scratch/pytorch/build -I/tmp/scratch/pytorch -I/tmp/scratch/pytorch/cmake/../third_party/benchmark/include -I/tmp/scratch/pytorch/third_party/onnx -I/tmp/scratch/pytorch/build/third_party/onnx -I/tmp/scratch/pytorch/third_party/foxi -I
/tmp/scratch/pytorch/build/third_party/foxi -I/tmp/scratch/pytorch/torch/csrc/api -I/tmp/scratch/pytorch/torch/csrc/api/include -I/tmp/scratch/pytorch/c10/.. -isystem /tmp/scratch/pytorch/build/third_party/gloo -isystem /tmp/scratch/pytorch/cmake/../thir
d_party/gloo -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googletest/include -isystem /tmp/scratch/pytorch/third_party/gemmlowp -isystem /tmp/scratch/pytorc
h/third_party/neon2sse -isystem /tmp/scratch/pytorch/third_party/XNNPACK/include -isystem /tmp/scratch/pytorch/third_party -isystem /usr/local/include/opencv4 -isystem /usr/local/include/eigen3 -isystem /usr/include/python3.9 -isystem /usr/local/lib/pyth
on3.9/dist-packages/numpy/core/include -isystem /tmp/scratch/pytorch/cmake/../third_party/pybind11/include -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -isystem /usr/lib/x86_64-linux-gnu/openmpi/include -isystem /tmp/scratch/pytorch/third_p
arty/ideep/include -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE
_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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-function -Wno-
unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -f
aligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -fPIE   -march=native -DCAFFE2_USE_GLOO -DHAVE_GCC_GET_CPUID -DUSE
_AVX -DUSE_AVX2 -DTH_HAVE_THREAD -pthread -std=gnu++14 -MD -MT binaries/CMakeFiles/convert_and_benchmark.dir/convert_and_benchmark.cc.o -MF binaries/CMakeFiles/convert_and_benchmark.dir/convert_and_benchmark.cc.o.d -o binaries/CMakeFiles/convert_and_benc
hmark.dir/convert_and_benchmark.cc.o -c /tmp/scratch/pytorch/binaries/convert_and_benchmark.cc
FAILED: binaries/CMakeFiles/convert_and_benchmark.dir/convert_and_benchmark.cc.o 
ccache /usr/bin/g++-10 -DGFLAGS_IS_A_DLL=0 -DGOOGLE_GLOG_DLL_DECL="" -DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS="" -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_C10D_GLOO -DUSE_C10D_MPI -DUSE_DISTRIBUTED -DUSE_EXTERNAL_MZCRC -DUSE_RPC -DUSE_TENSORPIPE -D_FILE_OFFSET_BITS=64 -I/tmp/scratch/pytorch/build/aten/src -I/tmp/scratch/pytorch/aten/
src -I/tmp/scratch/pytorch/build -I/tmp/scratch/pytorch -I/tmp/scratch/pytorch/cmake/../third_party/benchmark/include -I/tmp/scratch/pytorch/third_party/onnx -I/tmp/scratch/pytorch/build/third_party/onnx -I/tmp/scratch/pytorch/third_party/foxi -I/tmp/scr
atch/pytorch/build/third_party/foxi -I/tmp/scratch/pytorch/torch/csrc/api -I/tmp/scratch/pytorch/torch/csrc/api/include -I/tmp/scratch/pytorch/c10/.. -isystem /tmp/scratch/pytorch/build/third_party/gloo -isystem /tmp/scratch/pytorch/cmake/../third_party/
gloo -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /tmp/scratch/pytorch/cmake/../third_party/googletest/googletest/include -isystem /tmp/scratch/pytorch/third_party/gemmlowp -isystem /tmp/scratch/pytorch/third_
party/neon2sse -isystem /tmp/scratch/pytorch/third_party/XNNPACK/include -isystem /tmp/scratch/pytorch/third_party -isystem /usr/local/include/opencv4 -isystem /usr/local/include/eigen3 -isystem /usr/include/python3.9 -isystem /usr/local/lib/python3.9/di
st-packages/numpy/core/include -isystem /tmp/scratch/pytorch/cmake/../third_party/pybind11/include -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -isystem /usr/lib/x86_64-linux-gnu/openmpi/include -isystem /tmp/scratch/pytorch/third_party/ide
ep/include -fdebug-prefix-map='/tmp/scratch'='/usr/local/src' -g1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_H
ANDLE -DEDGE_PROFILER_USE_KINETO -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-function -Wno-unused-r
esult -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-
new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -O3 -DNDEBUG -DNDEBUG -fPIE   -march=native -DCAFFE2_USE_GLOO -DHAVE_GCC_GET_CPUID -DUSE_AVX -DU
SE_AVX2 -DTH_HAVE_THREAD -pthread -std=gnu++14 -MD -MT binaries/CMakeFiles/convert_and_benchmark.dir/convert_and_benchmark.cc.o -MF binaries/CMakeFiles/convert_and_benchmark.dir/convert_and_benchmark.cc.o.d -o binaries/CMakeFiles/convert_and_benchmark.di
r/convert_and_benchmark.cc.o -c /tmp/scratch/pytorch/binaries/convert_and_benchmark.cc
In file included from /tmp/scratch/pytorch/caffe2/utils/math.h:9,
                 from /tmp/scratch/pytorch/caffe2/utils/filler.h:8,
                 from /tmp/scratch/pytorch/caffe2/core/operator_schema.h:17,
                 from /tmp/scratch/pytorch/caffe2/core/net.h:18,
                 from /tmp/scratch/pytorch/binaries/benchmark_helper.h:23,
                 from /tmp/scratch/pytorch/binaries/convert_and_benchmark.cc:32:
/tmp/scratch/pytorch/caffe2/utils/cblas.h:8:10: fatal error: mkl_cblas.h: No such file or directory
    8 | #include <mkl_cblas.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.
```

## To Reproduce

https://github.com/xkszltl/Roaster/blob/f51fdd32f543bc5bc4212686b7cba92527a226f7/pkgs/pytorch.sh#L87-L133

## Environment

 - PyTorch Version (e.g., 1.0): master
 - OS (e.g., Linux): Debian 11
 - How you installed PyTorch (`conda`, `pip`, source): source
 - Build command you used (if compiling from source):  cmake+ninja+gcc-10
 - Python version: 3.9.2

cc @malfet @seemethere