Hi guys , am trying to build pytorch package for riscv , am facing this issue can i get help please? here are the logs

*** Note: Parallel build is only supported with Ninja ***

AT_INSTALL_INCLUDE_DIR include/ATen/core
core header install: /home/root/pytorch/build/aten/src/ATen/core/TensorBody.h
core header install: /home/root/pytorch/build/aten/src/ATen/core/aten_interned_strings.h
core header install: /home/root/pytorch/build/aten/src/ATen/core/enum_tag.h
– Generating sources for unboxing kernels /usr/bin/python3;-m;torchgen.gen_executorch;–source-path=/home/root/pytorch/test/edge/…/…/test/edge;–install_dir=/home/root/pytorch/build/out;–tags-path=/home/root/pytorch/test/edge/…/…/aten/src/ATen/native/tags.yaml;–aten_yaml_path=/home/root/pytorch/test/edge/…/…/aten/src/ATen/native/native_functions.yaml;–use_aten_lib;–op_selection_yaml_path=/home/root/pytorch/test/edge/…/…/test/edge/selected_operators.yaml;–custom_ops_yaml_path=/home/root/pytorch/test/edge/…/…/test/edge/custom_ops.yaml
– /usr/bin/c++ /home/root/pytorch/torch/abi-check.cpp -o /home/root/pytorch/build/abi-check
– Determined _GLIBCXX_USE_CXX11_ABI=1
CMake Warning (dev) at torch/CMakeLists.txt:386:
Syntax Warning in cmake code at column 107

Argument not separated from preceding token by whitespace.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at torch/CMakeLists.txt:386:
Syntax Warning in cmake code at column 115

Argument not separated from preceding token by whitespace.
This warning is for project developers. Use -Wno-dev to suppress it.

– Using lib/python3.8/site-packages as python relative installation path
CMake Warning at CMakeLists.txt:1078 (message):
Generated cmake files are only fully tested if one builds with system glog,
gflags, and protobuf. Other settings may generate files that are not well
tested.


– ******** Summary ********
– General:
– CMake version : 3.18.2
– CMake command : /usr/bin/cmake
– System : Linux
– C++ compiler : /usr/bin/c++
– C++ compiler id : GNU
– C++ compiler version : 10.1.0
– Using ccache if found : ON
– Found ccache : CCACHE_PROGRAM-NOTFOUND
– CXX flags : -Wno-deprecated -fvisibility-inlines-hidden -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DLIBKINETO_NOROCTRACER -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Werror=bool-operation -Wnarrowing -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wunused-local-typedefs -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -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
– Build type : Release
– Compile definitions : ONNX_ML=1;ONNXIFI_ENABLE_EXT=1;ONNX_NAMESPACE=onnx_torch;HAVE_MMAP=1;_FILE_OFFSET_BITS=64;HAVE_SHM_OPEN=1;HAVE_SHM_UNLINK=1;HAVE_MALLOC_USABLE_SIZE=1;USE_EXTERNAL_MZCRC;MINIZ_DISABLE_ZIP_READER_CRC32_CHECKS
– CMAKE_PREFIX_PATH : /usr/lib/python3.8/site-packages
– CMAKE_INSTALL_PREFIX : /home/root/pytorch/torch
– USE_GOLD_LINKER : OFF

– TORCH_VERSION : 2.0.0
– CAFFE2_VERSION : 2.0.0
– BUILD_CAFFE2 : OFF
– BUILD_CAFFE2_OPS : OFF
– BUILD_STATIC_RUNTIME_BENCHMARK: OFF
– BUILD_TENSOREXPR_BENCHMARK: OFF
– BUILD_NVFUSER_BENCHMARK: OFF
– BUILD_BINARY : OFF
– BUILD_CUSTOM_PROTOBUF : ON
– Link local protobuf : ON
– BUILD_DOCS : OFF
– BUILD_PYTHON : True
– Python version : 3.8.2
– Python executable : /usr/bin/python3
– Pythonlibs version : 3.8.2
– Python library : /usr/lib/libpython3.8.so.1.0
– Python includes : /usr/include/python3.8
– Python site-packages: lib/python3.8/site-packages
– BUILD_SHARED_LIBS : ON
– CAFFE2_USE_MSVC_STATIC_RUNTIME : OFF
– BUILD_TEST : True
– BUILD_JNI : OFF
– BUILD_MOBILE_AUTOGRAD : OFF
– BUILD_LITE_INTERPRETER: OFF
– INTERN_BUILD_MOBILE :
– TRACING_BASED : OFF
– USE_BLAS : 1
– BLAS : open
– BLAS_HAS_SBGEMM :
– USE_LAPACK : 0
– USE_ASAN : OFF
– USE_TSAN : OFF
– USE_CPP_CODE_COVERAGE : OFF
– USE_CUDA : OFF
– USE_ROCM : OFF
– BUILD_NVFUSER : OFF
– USE_EIGEN_FOR_BLAS : ON
– USE_FBGEMM : OFF
– USE_FAKELOWP : OFF
– USE_KINETO : ON
– USE_FFMPEG : OFF
– USE_GFLAGS : OFF
– USE_GLOG : OFF
– USE_LEVELDB : OFF
– USE_LITE_PROTO : OFF
– USE_LMDB : OFF
– USE_METAL : OFF
– USE_PYTORCH_METAL : OFF
– USE_PYTORCH_METAL_EXPORT : OFF
– USE_MPS : OFF
– USE_FFTW : OFF
– USE_MKL : OFF
– USE_MKLDNN : OFF
– USE_UCC : OFF
– USE_ITT : OFF
– USE_NCCL : OFF
– USE_NNPACK : OFF
– USE_NUMPY : ON
– USE_OBSERVERS : ON
– USE_OPENCL : OFF
– USE_OPENCV : OFF
– USE_OPENMP : OFF
– USE_TBB : OFF
– USE_VULKAN : OFF
– USE_PROF : OFF
– USE_QNNPACK : OFF
– USE_PYTORCH_QNNPACK : OFF
– USE_XNNPACK : OFF
– USE_REDIS : OFF
– USE_ROCKSDB : OFF
– USE_ZMQ : OFF
– USE_DISTRIBUTED : ON
– USE_MPI : OFF
– USE_GLOO : ON
– USE_GLOO_WITH_OPENSSL : OFF
– USE_TENSORPIPE : ON
– Public Dependencies : caffe2::Threads
– Private Dependencies : cpuinfo;fp16;tensorpipe;gloo;foxi_loader;rt;fmt::fmt-header-only;kineto;gcc_s;gcc;dl
– USE_COREML_DELEGATE : OFF
– BUILD_LAZY_TS_BACKEND : ON
– TORCH_DISABLE_GPU_ASSERTS : OFF
– Configuring done
– Generating done
– Build files have been written to: /home/root/pytorch/build
Scanning dependencies of target libprotobuf-lite
Scanning dependencies of target clog
Scanning dependencies of target gtest
Scanning dependencies of target libprotobuf
make[2]: Warning: File ‘…/third_party/cpuinfo/deps/clog/src/clog.c’ has modification time 3274912 s in the future
[ 0%] Building C object confu-deps/cpuinfo/deps/clog/CMakeFiles/clog.dir/src/clog.c.o
make[2]: Warning: File ‘…/third_party/googletest/googletest/src/gtest-all.cc’ has modification time 3274925 s in the future
[ 0%] Building CXX object third_party/googletest/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
make[2]: Warning: File ‘…/third_party/protobuf/src/google/protobuf/any_lite.cc’ has modification time 3274992 s in the future
[ 0%] Building CXX object third_party/protobuf/cmake/CMakeFiles/libprotobuf-lite.dir//src/google/protobuf/any_lite.cc.o
make[2]: Warning: File ‘…/third_party/protobuf/src/google/protobuf/any_lite.cc’ has modification time 3274991 s in the future
[ 0%] Building CXX object third_party/protobuf/cmake/CMakeFiles/libprotobuf.dir/
/src/google/protobuf/any_lite.cc.o
[ 0%] Linking C static library …/…/…/…/lib/libclog.a
make[2]: warning: Clock skew detected. Your build may be incomplete.
[ 0%] Built target clog
[ 0%] Building CXX object third_party/protobuf/cmake/CMakeFiles/libprotobuf-lite.dir//src/google/protobuf/arena.cc.o
In file included from /usr/include/c++/10.1.0/bits/stl_algobase.h:64,
from /usr/include/c++/10.1.0/bits/char_traits.h:39,
from /usr/include/c++/10.1.0/string:40,
from /home/root/pytorch/third_party/protobuf/src/google/protobuf/any.h:34,
from /home/root/pytorch/third_party/protobuf/src/google/protobuf/any_lite.cc:31:
/usr/include/c++/10.1.0/bits/stl_pair.h: In instantiation of ‘struct std::pair<char*, bool>’:
/home/root/pytorch/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h:395:60: required from here
/usr/include/c++/10.1.0/bits/stl_pair.h:418:2: internal compiler error: Segmentation fault
418 | operator=(const pair<_U1, _U2>& p)
| ^~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See https://gcc.gnu.org/bugs/ for instructions.
make[2]: *** [third_party/protobuf/cmake/CMakeFiles/libprotobuf.dir/build.make:82: third_party/protobuf/cmake/CMakeFiles/libprotobuf.dir/
/src/google/protobuf/any_lite.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1587: third_party/protobuf/cmake/CMakeFiles/libprotobuf.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
[ 0%] Building CXX object third_party/protobuf/cmake/CMakeFiles/libprotobuf-lite.dir/
/src/google/protobuf/extension_set.cc.o
In file included from /usr/include/c++/10.1.0/functional:65,
from /home/root/pytorch/third_party/googletest/googletest/include/gtest/gtest-printers.h:103,
from /home/root/pytorch/third_party/googletest/googletest/include/gtest/gtest-matchers.h:44,
from /home/root/pytorch/third_party/googletest/googletest/include/gtest/internal/gtest-death-test-internal.h:39,
from /home/root/pytorch/third_party/googletest/googletest/include/gtest/gtest-death-test.h:41,
from /home/root/pytorch/third_party/googletest/googletest/include/gtest/gtest.h:64,
from /home/root/pytorch/third_party/googletest/googletest/src/gtest-all.cc:38:
/usr/include/c++/10.1.0/bits/stl_algo.h:5522:5: internal compiler error: in pop_local_binding, at cp/name-lookup.c:2044
5522 | }
| ^
Please submit a full bug report,
with preprocessed source if appropriate.
See https://gcc.gnu.org/bugs/ for instructions.