Source build bug from pytorch 1.4.0

-- 
-- ******** Summary ********
-- General:
--   CMake version         : 3.14.0
--   CMake command         : /home/xxx/anaconda3/envs/pyg/bin/cmake
--   System                : Linux
--   C++ compiler          : /home/xxx/anaconda3/envs/pyg/bin/x86_64-conda_cos6-linux-gnu-c++
--   C++ compiler id       : GNU
--   C++ compiler version  : 7.3.0
--   BLAS                  : MKL
--   CXX flags             : -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/wanglei/anaconda3/envs/pyg/include -Wno-deprecated -fvisibility-inlines-hidden -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -O2 -fPIC -Wno-narrowing -Wall -Wextra -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -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 -Wno-stringop-overflow
--   Build type            : Release
--   Compile definitions   : TH_BLAS_MKL;ONNX_ML=1;ONNX_NAMESPACE=onnx_torch;MAGMA_V2;IDEEP_USE_MKL;HAVE_MMAP=1;_FILE_OFFSET_BITS=64;HAVE_SHM_OPEN=1;HAVE_SHM_UNLINK=1;HAVE_MALLOC_USABLE_SIZE=1
--   CMAKE_PREFIX_PATH     : /home/xxx/anaconda3/envs/pyg:/home/xxx/anaconda3/envs/pyg/x86_64-conda_cos6-linux-gnu/sysroot/usr;/usr/local/cuda-9.2
--   CMAKE_INSTALL_PREFIX  : /home/xxx/pytorch/torch
-- 
--   TORCH_VERSION         : 1.4.0
--   CAFFE2_VERSION        : 1.4.0
--   BUILD_CAFFE2_MOBILE   : ON
--   USE_STATIC_DISPATCH   : OFF
--   BUILD_BINARY          : OFF
--   BUILD_CUSTOM_PROTOBUF : ON
--     Link local protobuf : ON
--   BUILD_DOCS            : OFF
--   BUILD_PYTHON          : True
--     Python version      : 3.7.7
--     Python executable   : /home/xxx/anaconda3/envs/pyg/bin/python
--     Pythonlibs version  : 3.7.7
--     Python library      : /home/xxx/anaconda3/envs/pyg/lib/libpython3.7m.a
--     Python includes     : /home/xxx/anaconda3/envs/pyg/include/python3.7m
--     Python site-packages: lib/python3.7/site-packages
--   BUILD_CAFFE2_OPS      : ON
--   BUILD_SHARED_LIBS     : ON
--   BUILD_TEST            : True
--   BUILD_JNI             : OFF
--   INTERN_BUILD_MOBILE   : 
--   USE_ASAN              : OFF
--   USE_CUDA              : ON
--     CUDA static link    : OFF
--     USE_CUDNN           : ON
--     CUDA version        : 9.2
--     cuDNN version       : 7.1.4
--     CUDA root directory : /usr/local/cuda-9.2
--     CUDA library        : /usr/local/cuda-9.2/lib64/stubs/libcuda.so
--     cudart library      : /usr/local/cuda-9.2/lib64/libcudart.so
--     cublas library      : /usr/local/cuda-9.2/lib64/libcublas.so
--     cufft library       : /usr/local/cuda-9.2/lib64/libcufft.so
--     curand library      : /usr/local/cuda-9.2/lib64/libcurand.so
--     cuDNN library       : /usr/local/cuda-9.2/lib64/libcudnn.so
--     nvrtc               : /usr/local/cuda-9.2/lib64/libnvrtc.so
--     CUDA include path   : /usr/local/cuda-9.2/include
--     NVCC executable     : /usr/local/cuda-9.2/bin/nvcc
--     CUDA host compiler  : /home/xxx/anaconda3/envs/pyg/bin/x86_64-conda_cos6-linux-gnu-cc
--     USE_TENSORRT        : OFF
--   USE_ROCM              : OFF
--   USE_EIGEN_FOR_BLAS    : 
--   USE_FBGEMM            : ON
--   USE_FFMPEG            : OFF
--   USE_GFLAGS            : OFF
--   USE_GLOG              : OFF
--   USE_LEVELDB           : OFF
--   USE_LITE_PROTO        : OFF
--   USE_LMDB              : OFF
--   USE_METAL             : OFF
--   USE_MKL               : ON
--   USE_MKLDNN            : OFF
--   USE_NCCL              : ON
--     USE_SYSTEM_NCCL     : OFF
--   USE_NNPACK            : ON
--   USE_NUMPY             : ON
--   USE_OBSERVERS         : ON
--   USE_OPENCL            : OFF
--   USE_OPENCV            : OFF
--   USE_OPENMP            : OFF
--   USE_TBB               : OFF
--   USE_PROF              : OFF
--   USE_QNNPACK           : ON
--   USE_REDIS             : OFF
--   USE_ROCKSDB           : OFF
--   USE_ZMQ               : OFF
--   USE_DISTRIBUTED       : ON
--     USE_MPI             : OFF
--     USE_GLOO            : ON
--   BUILD_NAMEDTENSOR   : OFF
--   Public Dependencies  : Threads::Threads;caffe2::mkl
--   Private Dependencies : qnnpack;pytorch_qnnpack;nnpack;cpuinfo;fbgemm;fp16;gloo;aten_op_header_gen;foxi_loader;rt;gcc_s;gcc;dl
-- Configuring incomplete, errors occurred!
See also "/home/xxx/pytorch/build/CMakeFiles/CMakeOutput.log".
See also "/home/xxx/pytorch/build/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
  File "setup.py", line 755, in <module>
    build_deps()
  File "setup.py", line 316, in build_deps
    cmake=cmake)
  File "/home/xxx/pytorch/tools/build_pytorch_libs.py", line 59, in build_caffe2
    rerun_cmake)
  File "/home/xxx/pytorch/tools/setup_helpers/cmake.py", line 319, in generate
    self.run(args, env=my_env)
  File "/home/xxx/pytorch/tools/setup_helpers/cmake.py", line 141, in run
    check_call(command, cwd=self.build_dir, env=env)
  File "/home/xxx/anaconda3/envs/pyg/lib/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '-GNinja', '-DBUILD_PYTHON=True', '-DBUILD_TEST=True', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_INSTALL_PREFIX=/home/xxx/pytorch/torch', '-DCMAKE_PREFIX_PATH=/home/xxx/anaconda3/envs/pyg:/home/xxx/anaconda3/envs/pyg/x86_64-conda_cos6-linux-gnu/sysroot/usr', '-DJAVA_HOME=/usr/local/jdk1.8.0_121', '-DNUMPY_INCLUDE_DIR=/home/xxx/anaconda3/envs/pyg/lib/python3.7/site-packages/numpy/core/include', '-DPYTHON_EXECUTABLE=/home/xxx/anaconda3/envs/pyg/bin/python', '-DPYTHON_INCLUDE_DIR=/home/xxx/anaconda3/envs/pyg/include/python3.7m', '-DPYTHON_LIBRARY=/home/xxx/anaconda3/envs/pyg/lib/libpython3.7m.a', '-DTORCH_BUILD_VERSION=1.4.0a0+7f73f1d', '-DUSE_NUMPY=True', '/home/xxx/pytorch']' returned non-zero exit status 1.

It looks like you have some cmake errors. You can check the CMakeError log file.
Also make sure that you properly cloned all the submodules.

CMakeError log

src.cxx:1:10: 
 #include <numa.h>
          ^~~~~~~~
compilation terminated.

ninja: build stopped: subcommand failed.
src.cxx:1:10: fatal error: glog/stl_logging.h: No such file or directory

collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

after install glog and numactl by conda, but useless

hi,
did you solve the problem?
I have the same problem…
help…!!!

Sorry,i have no idea about solution; To install the binary version is the best way!