Trying to build setup.py but getting an error at 53%

username: kwayoteng
cooked: <p>Building wheel torch-1.5.0a0+79d47c1<br>
– Building version 1.5.0a0+79d47c1<br>
cmake --build . --target install --config Release – -j 4<br>
[  0%] Built target clog<br>
[  0%] Built target pthreadpool<br>
[  0%] Built target libprotobuf-lite<br>
[  0%] Built target gtest<br>
[  0%] Built target benchmark<br>
[  3%] Built target libprotobuf<br>
[  5%] Built target c10<br>
[  5%] Built target foxi_loader<br>
[  5%] Built target common<br>
[  5%] Built target ATEN_CPU_FILES_GEN_TARGET<br>
[  5%] Built target mkrename<br>
[  5%] Built target mkalias<br>
[  5%] Built target mkmasked_gnuabi<br>
[  5%] Built target torch_global_deps<br>
[  5%] Built target headers<br>
[  5%] Built target mkdisp<br>
[  5%] Built target mkrename_gnuabi<br>
[ 24%] Built target python_copy_files<br>
[ 24%] Built target arraymap<br>
[ 24%] Built target torch_python_stubs<br>
[ 24%] Built target generate-torch-sources<br>
[ 25%] Built target cpuinfo_internals<br>
[ 25%] Built target nnpack_reference_layers<br>
[ 25%] Built target cpuinfo<br>
[ 25%] Built target gmock<br>
[ 25%] Built target gtest_main<br>
[ 28%] Built target libprotoc<br>
[ 28%] Built target benchmark_main<br>
[ 28%] Built target c10_intrusive_ptr_benchmark<br>
[ 28%] Built target __aten_op_header_gen<br>
[ 28%] Built target renamePURECFMA_SCALAR.h_generated<br>
[ 28%] Built target renamePUREC_SCALAR.h_generated<br>
[ 28%] Built target alias_neon32.h_generated<br>
[ 28%] Linking CXX executable …/…/…/bin/protoc<br>
[ 28%] Built target renameNEON32VFPV4.h_generated<br>
[ 28%] Built target renameNEON32.h_generated<br>
[ 29%] Built target nnpack<br>
[ 31%] Built target qnnpack<br>
[ 32%] Built target pytorch_qnnpack<br>
[ 32%] Built target gmock_main<br>
[ 32%] Built target c10_ordered_preserving_dict_test<br>
[ 32%] Built target c10_intrusive_ptr_test<br>
[ 32%] Built target c10_tempfile_test<br>
[ 32%] Built target c10_flags_test<br>
[ 32%] Built target c10_typeid_test<br>
[ 32%] Built target c10_Half_test<br>
[ 32%] Built target c10_registry_test<br>
[ 51%] Built target XNNPACK<br>
[ 51%] Built target c10_InlineStreamGuard_test<br>
[ 51%] Built target c10_DeviceGuard_test<br>
[ 51%] Built target c10_TypeTraits_test<br>
[ 51%] Built target c10_StreamGuard_test<br>
[ 52%] Built target c10_exception_test<br>
[ 52%] Built target c10_logging_test<br>
[ 52%] Built target c10_InlineDeviceGuard_test<br>
[ 52%] Built target c10_DispatchKeySet_test<br>
[ 52%] Built target c10_string_view_test<br>
[ 52%] Built target c10_C++17_test<br>
[ 52%] Built target c10_TypeList_test<br>
[ 52%] Built target c10_LeftRight_test<br>
[ 52%] Built target c10_either_test<br>
[ 52%] Built target c10_Array_test<br>
/usr/bin/ld: …/…/…/lib/libprotobuf.a(arena.cc.o): in function <code>google::protobuf::internal::ArenaImpl::Init()': arena.cc:(.text+0x24): undefined reference to </code>__atomic_fetch_add_8’<br>
collect2: error: ld returned 1 exit status<br>
make[2]: *** [third_party/protobuf/cmake/CMakeFiles/protoc.dir/build.make:87: bin/protoc] Error 1<br>
make[1]: *** [CMakeFiles/Makefile2:241: third_party/protobuf/cmake/CMakeFiles/protoc.dir/all] Error 2<br>
make[1]: *** Waiting for unfinished jobs…<br>
[ 52%] Built target c10_Metaprogramming_test<br>
[ 52%] Built target c10_ConstexprCrc_test<br>
[ 52%] Built target c10_TypeIndex_test<br>
make: *** [Makefile:141: all] Error 2<br>
Traceback (most recent call last):<br>
File “setup.py”, line 737, in <br>
build_deps()<br>
File “setup.py”, line 316, in build_deps<br>
cmake=cmake)<br>
File “/home/pi/pytorch_install1/pytorch/tools/build_pytorch_libs.py”, line 62, in build_caffe2<br>
cmake.build(my_env)<br>
File “/home/pi/pytorch_install1/pytorch/tools/setup_helpers/cmake.py”, line 339, in build<br>
self.run(build_args, my_env)<br>
File “/home/pi/pytorch_install1/pytorch/tools/setup_helpers/cmake.py”, line 141, in run<br>
check_call(command, cwd=self.build_dir, env=env)<br>
File “/usr/lib/python3.7/subprocess.py”, line 347, in check_call<br>
raise CalledProcessError(retcode, cmd)<br>
subprocess.CalledProcessError: Command ‘[‘cmake’, ‘–build’, ‘.’, ‘–target’, ‘install’, ‘–config’, ‘Release’, ‘–’, ‘-j’, ‘4’]’ returned non-zero exit status 2.</p>