Repository: pytorch
Issue: Failed to build pytorch with NanoPi M4
Labels: module: build,low priority,triaged

## 🐛 Bug

```
Building wheel torch-1.3.0a0+d3f6d58
-- Building version 1.3.0a0+d3f6d58
cmake -GNinja -DBUILD_PYTHON=True -DBUILD_TEST=True -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/media/pi/AA3D-4D92/pytorch/torch -DCMAKE_PREFIX_PATH=/usr/lib/python3/dist-packages -DNUMPY_INCLUDE_DIR=/usr/local/lib/python3.6/dist-packages/numpy/core/include -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.6m -DPYTHON_LIBRARY=/usr/lib/libpython3.6m.so.1.0 -DTORCH_BUILD_VERSION=1.3.0a0+d3f6d58 -DUSE_CUDA=False -DUSE_DISTRIBUTED=True -DUSE_NUMPY=True /media/pi/AA3D-4D92/pytorch
-- The CXX compiler identification is GNU 7.4.0
-- The C compiler identification is GNU 7.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Not forcing any particular BLAS to be found
-- Performing Test COMPILER_WORKS
-- Performing Test COMPILER_WORKS - Failed
CMake Error at cmake/MiscCheck.cmake:52 (message):
  Could not run a simple program built with your compiler.  If you are trying
  to use -fsanitize=address, make sure libasan is properly installed on your
  system (you can confirm if the problem is this by attempting to build and
  run a small program.)
Call Stack (most recent call first):
  CMakeLists.txt:292 (include)


-- Configuring incomplete, errors occurred!
See also "/media/pi/AA3D-4D92/pytorch/build/CMakeFiles/CMakeOutput.log".
See also "/media/pi/AA3D-4D92/pytorch/build/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
  File "setup.py", line 756, in <module>
    build_deps()
  File "setup.py", line 321, in build_deps
    cmake=cmake)
  File "/media/pi/AA3D-4D92/pytorch/tools/build_pytorch_libs.py", line 61, in build_caffe2
    rerun_cmake)
  File "/media/pi/AA3D-4D92/pytorch/tools/setup_helpers/cmake.py", line 314, in generate
    self.run(args, env=my_env)
  File "/media/pi/AA3D-4D92/pytorch/tools/setup_helpers/cmake.py", line 143, in run
    check_call(command, cwd=self.build_dir, env=env)
  File "/usr/lib/python3.6/subprocess.py", line 291, 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=/media/pi/AA3D-4D92/pytorch/torch', '-DCMAKE_PREFIX_PATH=/usr/lib/python3/dist-packages', '-DNUMPY_INCLUDE_DIR=/usr/local/lib/python3.6/dist-packages/numpy/core/include', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DPYTHON_INCLUDE_DIR=/usr/include/python3.6m', '-DPYTHON_LIBRARY=/usr/lib/libpython3.6m.so.1.0', '-DTORCH_BUILD_VERSION=1.3.0a0+d3f6d58', '-DUSE_CUDA=False', '-DUSE_DISTRIBUTED=True', '-DUSE_NUMPY=True', '/media/pi/AA3D-4D92/pytorch']' returned non-zero exit status 1.
```

## To Reproduce

Steps to reproduce the behavior:

```bash
git clone --recursive https://github.com/pytorch/pytorch
cd pytorch
USE_CUDA=0 sudo python3 setup.py install
```

## Expected behavior

build success

## Environment

```
Collecting environment information...
PyTorch version: 1.1.0a0
Is debug build: No
CUDA used to build PyTorch: None

OS: Ubuntu 18.04 LTS
GCC version: (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1) 7.4.0
CMake version: version 3.10.2

Python version: 3.6
Is CUDA available: No
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA

Versions of relevant libraries:
[pip3] numpy==1.16.2
[pip3] torch==1.1.0a0
[pip3] torchvision==0.2.2.post3
[conda] Could not collect
```