While building library with CUDA using PyTorch from scratch I get the following error

ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File “/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/utils/cpp_extension.py”, line 1740, in _run_ninja_build
subprocess.run(
File “/home/malt-lab-pc4/anaconda3/lib/python3.10/subprocess.py”, line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command ‘[‘ninja’, ‘-v’]’ returned non-zero exit status 1.

Your stacktrace doesn’t show an error message and most likely the error is displayed above the posted stack.

Please see the following stacktrace:

Emitting ninja build file /tmp/pip-req-build-bg01oqs7/build/temp.linux-x86_64-cpython-310/build.ninja…
Compiling objects…
Allowing ninja to set a default number of workers… (overridable by setting the environment variable MAX_JOBS=N)
[1/33] /usr/local/cuda-11.3/bin/nvcc -DTORCH_VERSION_MAJOR=1 -DTORCH_VERSION_MINOR=11 -DTORCH_VERSION_PATCH=0 -DWITH_CUDA -I./falkon/c_ext -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/TH -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/THC -I/usr/local/cuda-11.3/include -I/home/malt-lab-pc4/anaconda3/include/python3.10 -c -c /tmp/pip-req-build-bg01oqs7/falkon/c_ext/ops/cuda/cuda_csr2dense.cu -o /tmp/pip-req-build-bg01oqs7/build/temp.linux-x86_64-cpython-310/falkon/c_ext/ops/cuda/cuda_csr2dense.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’“'”‘-fPIC’“'”‘’ -O3 --expt-relaxed-constexpr --extended-lambda -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“gcc"’ '-DPYBIND11_STDLIB="libstdcpp"’ '-DPYBIND11_BUILD_ABI="cxxabi1011"’ -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -ccbin /home/malt-lab-pc4/anaconda3/bin/x86_64-conda-linux-gnu-cc -std=c++14
FAILED: /tmp/pip-req-build-bg01oqs7/build/temp.linux-x86_64-cpython-310/falkon/c_ext/ops/cuda/cuda_csr2dense.o
/usr/local/cuda-11.3/bin/nvcc -DTORCH_VERSION_MAJOR=1 -DTORCH_VERSION_MINOR=11 -DTORCH_VERSION_PATCH=0 -DWITH_CUDA -I./falkon/c_ext -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/TH -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/THC -I/usr/local/cuda-11.3/include -I/home/malt-lab-pc4/anaconda3/include/python3.10 -c -c /tmp/pip-req-build-bg01oqs7/falkon/c_ext/ops/cuda/cuda_csr2dense.cu -o /tmp/pip-req-build-bg01oqs7/build/temp.linux-x86_64-cpython-310/falkon/c_ext/ops/cuda/cuda_csr2dense.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’”’“‘-fPIC’”‘"’’ -O3 --expt-relaxed-constexpr --extended-lambda -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“gcc"’ '-DPYBIND11_STDLIB="libstdcpp"’ '-DPYBIND11_BUILD_ABI="cxxabi1011"’ -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -ccbin /home/malt-lab-pc4/anaconda3/bin/x86_64-conda-linux-gnu-cc -std=c++14
In file included from /usr/local/cuda-11.3/include/cuda_runtime.h:83,
from :
/usr/local/cuda-11.3/include/crt/host_config.h:139:2: error: #error – unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag ‘-allow-unsupported-compiler’ can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
139 | #error – unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag ‘-allow-unsupported-compiler’ can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
| ^~~~~
[2/33] /usr/local/cuda-11.3/bin/nvcc -DTORCH_VERSION_MAJOR=1 -DTORCH_VERSION_MINOR=11 -DTORCH_VERSION_PATCH=0 -DWITH_CUDA -I./falkon/c_ext -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/TH -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/THC -I/usr/local/cuda-11.3/include -I/home/malt-lab-pc4/anaconda3/include/python3.10 -c -c /tmp/pip-req-build-bg01oqs7/falkon/c_ext/ops/cuda/cuda_spspmm.cu -o /tmp/pip-req-build-bg01oqs7/build/temp.linux-x86_64-cpython-310/falkon/c_ext/ops/cuda/cuda_spspmm.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’”’“‘-fPIC’”‘"’’ -O3 --expt-relaxed-constexpr --extended-lambda -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“gcc"’ '-DPYBIND11_STDLIB="libstdcpp"’ '-DPYBIND11_BUILD_ABI="cxxabi1011"’ -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -ccbin /home/malt-lab-pc4/anaconda3/bin/x86_64-conda-linux-gnu-cc -std=c++14
FAILED: /tmp/pip-req-build-bg01oqs7/build/temp.linux-x86_64-cpython-310/falkon/c_ext/ops/cuda/cuda_spspmm.o
/usr/local/cuda-11.3/bin/nvcc -DTORCH_VERSION_MAJOR=1 -DTORCH_VERSION_MINOR=11 -DTORCH_VERSION_PATCH=0 -DWITH_CUDA -I./falkon/c_ext -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/TH -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/THC -I/usr/local/cuda-11.3/include -I/home/malt-lab-pc4/anaconda3/include/python3.10 -c -c /tmp/pip-req-build-bg01oqs7/falkon/c_ext/ops/cuda/cuda_spspmm.cu -o /tmp/pip-req-build-bg01oqs7/build/temp.linux-x86_64-cpython-310/falkon/c_ext/ops/cuda/cuda_spspmm.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’”’“‘-fPIC’”‘"’’ -O3 --expt-relaxed-constexpr --extended-lambda -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“gcc"’ '-DPYBIND11_STDLIB="libstdcpp"’ '-DPYBIND11_BUILD_ABI="cxxabi1011"’ -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -ccbin /home/malt-lab-pc4/anaconda3/bin/x86_64-conda-linux-gnu-cc -std=c++14
In file included from /usr/local/cuda-11.3/include/cuda_runtime.h:83,
from :
/usr/local/cuda-11.3/include/crt/host_config.h:139:2: error: #error – unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag ‘-allow-unsupported-compiler’ can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
139 | #error – unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag ‘-allow-unsupported-compiler’ can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
| ^~~~~
[3/33] /usr/local/cuda-11.3/bin/nvcc -DTORCH_VERSION_MAJOR=1 -DTORCH_VERSION_MINOR=11 -DTORCH_VERSION_PATCH=0 -DWITH_CUDA -I./falkon/c_ext -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/TH -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/THC -I/usr/local/cuda-11.3/include -I/home/malt-lab-pc4/anaconda3/include/python3.10 -c -c /tmp/pip-req-build-bg01oqs7/falkon/c_ext/ops/cuda/cublas_bindings.cu -o /tmp/pip-req-build-bg01oqs7/build/temp.linux-x86_64-cpython-310/falkon/c_ext/ops/cuda/cublas_bindings.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’”’“‘-fPIC’”‘"’’ -O3 --expt-relaxed-constexpr --extended-lambda -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“gcc"’ '-DPYBIND11_STDLIB="libstdcpp"’ '-DPYBIND11_BUILD_ABI="cxxabi1011"’ -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -ccbin /home/malt-lab-pc4/anaconda3/bin/x86_64-conda-linux-gnu-cc -std=c++14
FAILED: /tmp/pip-req-build-bg01oqs7/build/temp.linux-x86_64-cpython-310/falkon/c_ext/ops/cuda/cublas_bindings.o
/usr/local/cuda-11.3/bin/nvcc -DTORCH_VERSION_MAJOR=1 -DTORCH_VERSION_MINOR=11 -DTORCH_VERSION_PATCH=0 -DWITH_CUDA -I./falkon/c_ext -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/TH -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/THC -I/usr/local/cuda-11.3/include -I/home/malt-lab-pc4/anaconda3/include/python3.10 -c -c /tmp/pip-req-build-bg01oqs7/falkon/c_ext/ops/cuda/cublas_bindings.cu -o /tmp/pip-req-build-bg01oqs7/build/temp.linux-x86_64-cpython-310/falkon/c_ext/ops/cuda/cublas_bindings.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’”’“‘-fPIC’”‘"’’ -O3 --expt-relaxed-constexpr --extended-lambda -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“gcc"’ '-DPYBIND11_STDLIB="libstdcpp"’ '-DPYBIND11_BUILD_ABI="cxxabi1011"’ -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -ccbin /home/malt-lab-pc4/anaconda3/bin/x86_64-conda-linux-gnu-cc -std=c++14
In file included from /usr/local/cuda-11.3/include/cuda_runtime.h:83,
from :
/usr/local/cuda-11.3/include/crt/host_config.h:139:2: error: #error – unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag ‘-allow-unsupported-compiler’ can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
139 | #error – unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag ‘-allow-unsupported-compiler’ can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
| ^~~~~
[4/33] /usr/local/cuda-11.3/bin/nvcc -DTORCH_VERSION_MAJOR=1 -DTORCH_VERSION_MINOR=11 -DTORCH_VERSION_PATCH=0 -DWITH_CUDA -I./falkon/c_ext -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/TH -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/THC -I/usr/local/cuda-11.3/include -I/home/malt-lab-pc4/anaconda3/include/python3.10 -c -c /tmp/pip-req-build-bg01oqs7/falkon/c_ext/ops/cuda/cuda_copy_triang.cu -o /tmp/pip-req-build-bg01oqs7/build/temp.linux-x86_64-cpython-310/falkon/c_ext/ops/cuda/cuda_copy_triang.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’”’“‘-fPIC’”‘"’’ -O3 --expt-relaxed-constexpr --extended-lambda -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“gcc"’ '-DPYBIND11_STDLIB="libstdcpp"’ '-DPYBIND11_BUILD_ABI="cxxabi1011"’ -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -ccbin /home/malt-lab-pc4/anaconda3/bin/x86_64-conda-linux-gnu-cc -std=c++14
FAILED: /tmp/pip-req-build-bg01oqs7/build/temp.linux-x86_64-cpython-310/falkon/c_ext/ops/cuda/cuda_copy_triang.o
/usr/local/cuda-11.3/bin/nvcc -DTORCH_VERSION_MAJOR=1 -DTORCH_VERSION_MINOR=11 -DTORCH_VERSION_PATCH=0 -DWITH_CUDA -I./falkon/c_ext -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/TH -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/THC -I/usr/local/cuda-11.3/include -I/home/malt-lab-pc4/anaconda3/include/python3.10 -c -c /tmp/pip-req-build-bg01oqs7/falkon/c_ext/ops/cuda/cuda_copy_triang.cu -o /tmp/pip-req-build-bg01oqs7/build/temp.linux-x86_64-cpython-310/falkon/c_ext/ops/cuda/cuda_copy_triang.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’”’“‘-fPIC’”‘"’’ -O3 --expt-relaxed-constexpr --extended-lambda -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“gcc"’ '-DPYBIND11_STDLIB="libstdcpp"’ '-DPYBIND11_BUILD_ABI="cxxabi1011"’ -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -ccbin /home/malt-lab-pc4/anaconda3/bin/x86_64-conda-linux-gnu-cc -std=c++14
In file included from /usr/local/cuda-11.3/include/cuda_runtime.h:83,
from :
/usr/local/cuda-11.3/include/crt/host_config.h:139:2: error: #error – unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag ‘-allow-unsupported-compiler’ can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
139 | #error – unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag ‘-allow-unsupported-compiler’ can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
| ^~~~~
[5/33] /usr/local/cuda-11.3/bin/nvcc -DTORCH_VERSION_MAJOR=1 -DTORCH_VERSION_MINOR=11 -DTORCH_VERSION_PATCH=0 -DWITH_CUDA -I./falkon/c_ext -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/TH -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/THC -I/usr/local/cuda-11.3/include -I/home/malt-lab-pc4/anaconda3/include/python3.10 -c -c /tmp/pip-req-build-bg01oqs7/falkon/c_ext/ops/cuda/cuda_bindings.cu -o /tmp/pip-req-build-bg01oqs7/build/temp.linux-x86_64-cpython-310/falkon/c_ext/ops/cuda/cuda_bindings.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’”’“‘-fPIC’”‘"’’ -O3 --expt-relaxed-constexpr --extended-lambda -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“gcc"’ '-DPYBIND11_STDLIB="libstdcpp"’ '-DPYBIND11_BUILD_ABI="cxxabi1011"’ -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -ccbin /home/malt-lab-pc4/anaconda3/bin/x86_64-conda-linux-gnu-cc -std=c++14
FAILED: /tmp/pip-req-build-bg01oqs7/build/temp.linux-x86_64-cpython-310/falkon/c_ext/ops/cuda/cuda_bindings.o
/usr/local/cuda-11.3/bin/nvcc -DTORCH_VERSION_MAJOR=1 -DTORCH_VERSION_MINOR=11 -DTORCH_VERSION_PATCH=0 -DWITH_CUDA -I./falkon/c_ext -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/TH -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/THC -I/usr/local/cuda-11.3/include -I/home/malt-lab-pc4/anaconda3/include/python3.10 -c -c /tmp/pip-req-build-bg01oqs7/falkon/c_ext/ops/cuda/cuda_bindings.cu -o /tmp/pip-req-build-bg01oqs7/build/temp.linux-x86_64-cpython-310/falkon/c_ext/ops/cuda/cuda_bindings.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’”’“‘-fPIC’”‘"’’ -O3 --expt-relaxed-constexpr --extended-lambda -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“gcc"’ '-DPYBIND11_STDLIB="libstdcpp"’ '-DPYBIND11_BUILD_ABI="cxxabi1011"’ -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -ccbin /home/malt-lab-pc4/anaconda3/bin/x86_64-conda-linux-gnu-cc -std=c++14
In file included from /usr/local/cuda-11.3/include/cuda_runtime.h:83,
from :
/usr/local/cuda-11.3/include/crt/host_config.h:139:2: error: #error – unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag ‘-allow-unsupported-compiler’ can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
139 | #error – unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag ‘-allow-unsupported-compiler’ can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
| ^~~~~
[6/33] /usr/local/cuda-11.3/bin/nvcc -DTORCH_VERSION_MAJOR=1 -DTORCH_VERSION_MINOR=11 -DTORCH_VERSION_PATCH=0 -DWITH_CUDA -I./falkon/c_ext -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/TH -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/THC -I/usr/local/cuda-11.3/include -I/home/malt-lab-pc4/anaconda3/include/python3.10 -c -c /tmp/pip-req-build-bg01oqs7/falkon/c_ext/ops/cuda/cuda_lauum.cu -o /tmp/pip-req-build-bg01oqs7/build/temp.linux-x86_64-cpython-310/falkon/c_ext/ops/cuda/cuda_lauum.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’”’“‘-fPIC’”‘"’’ -O3 --expt-relaxed-constexpr --extended-lambda -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“gcc"’ '-DPYBIND11_STDLIB="libstdcpp"’ '-DPYBIND11_BUILD_ABI="cxxabi1011"’ -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -ccbin /home/malt-lab-pc4/anaconda3/bin/x86_64-conda-linux-gnu-cc -std=c++14
FAILED: /tmp/pip-req-build-bg01oqs7/build/temp.linux-x86_64-cpython-310/falkon/c_ext/ops/cuda/cuda_lauum.o
/usr/local/cuda-11.3/bin/nvcc -DTORCH_VERSION_MAJOR=1 -DTORCH_VERSION_MINOR=11 -DTORCH_VERSION_PATCH=0 -DWITH_CUDA -I./falkon/c_ext -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/TH -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/THC -I/usr/local/cuda-11.3/include -I/home/malt-lab-pc4/anaconda3/include/python3.10 -c -c /tmp/pip-req-build-bg01oqs7/falkon/c_ext/ops/cuda/cuda_lauum.cu -o /tmp/pip-req-build-bg01oqs7/build/temp.linux-x86_64-cpython-310/falkon/c_ext/ops/cuda/cuda_lauum.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’”’“‘-fPIC’”‘"’’ -O3 --expt-relaxed-constexpr --extended-lambda -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“gcc"’ '-DPYBIND11_STDLIB="libstdcpp"’ '-DPYBIND11_BUILD_ABI="cxxabi1011"’ -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -ccbin /home/malt-lab-pc4/anaconda3/bin/x86_64-conda-linux-gnu-cc -std=c++14
In file included from /usr/local/cuda-11.3/include/cuda_runtime.h:83,
from :
/usr/local/cuda-11.3/include/crt/host_config.h:139:2: error: #error – unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag ‘-allow-unsupported-compiler’ can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
139 | #error – unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag ‘-allow-unsupported-compiler’ can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
| ^~~~~
[7/33] /usr/local/cuda-11.3/bin/nvcc -DTORCH_VERSION_MAJOR=1 -DTORCH_VERSION_MINOR=11 -DTORCH_VERSION_PATCH=0 -DWITH_CUDA -I./falkon/c_ext -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/TH -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/THC -I/usr/local/cuda-11.3/include -I/home/malt-lab-pc4/anaconda3/include/python3.10 -c -c /tmp/pip-req-build-bg01oqs7/falkon/c_ext/ops/cuda/cuda_mul_triang.cu -o /tmp/pip-req-build-bg01oqs7/build/temp.linux-x86_64-cpython-310/falkon/c_ext/ops/cuda/cuda_mul_triang.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’”’“‘-fPIC’”‘"’’ -O3 --expt-relaxed-constexpr --extended-lambda -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“gcc"’ '-DPYBIND11_STDLIB="libstdcpp"’ '-DPYBIND11_BUILD_ABI="cxxabi1011"’ -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -ccbin /home/malt-lab-pc4/anaconda3/bin/x86_64-conda-linux-gnu-cc -std=c++14
FAILED: /tmp/pip-req-build-bg01oqs7/build/temp.linux-x86_64-cpython-310/falkon/c_ext/ops/cuda/cuda_mul_triang.o
/usr/local/cuda-11.3/bin/nvcc -DTORCH_VERSION_MAJOR=1 -DTORCH_VERSION_MINOR=11 -DTORCH_VERSION_PATCH=0 -DWITH_CUDA -I./falkon/c_ext -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/TH -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/THC -I/usr/local/cuda-11.3/include -I/home/malt-lab-pc4/anaconda3/include/python3.10 -c -c /tmp/pip-req-build-bg01oqs7/falkon/c_ext/ops/cuda/cuda_mul_triang.cu -o /tmp/pip-req-build-bg01oqs7/build/temp.linux-x86_64-cpython-310/falkon/c_ext/ops/cuda/cuda_mul_triang.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’”’“‘-fPIC’”‘"’’ -O3 --expt-relaxed-constexpr --extended-lambda -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“gcc"’ '-DPYBIND11_STDLIB="libstdcpp"’ '-DPYBIND11_BUILD_ABI="cxxabi1011"’ -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -ccbin /home/malt-lab-pc4/anaconda3/bin/x86_64-conda-linux-gnu-cc -std=c++14
In file included from /usr/local/cuda-11.3/include/cuda_runtime.h:83,
from :
/usr/local/cuda-11.3/include/crt/host_config.h:139:2: error: #error – unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag ‘-allow-unsupported-compiler’ can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
139 | #error – unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag ‘-allow-unsupported-compiler’ can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
| ^~~~~
[8/33] /usr/local/cuda-11.3/bin/nvcc -DTORCH_VERSION_MAJOR=1 -DTORCH_VERSION_MINOR=11 -DTORCH_VERSION_PATCH=0 -DWITH_CUDA -I./falkon/c_ext -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/TH -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/THC -I/usr/local/cuda-11.3/include -I/home/malt-lab-pc4/anaconda3/include/python3.10 -c -c /tmp/pip-req-build-bg01oqs7/falkon/c_ext/ops/cuda/cuda_copy_transpose.cu -o /tmp/pip-req-build-bg01oqs7/build/temp.linux-x86_64-cpython-310/falkon/c_ext/ops/cuda/cuda_copy_transpose.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’”’“‘-fPIC’”‘"’’ -O3 --expt-relaxed-constexpr --extended-lambda -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“gcc"’ '-DPYBIND11_STDLIB="libstdcpp"’ '-DPYBIND11_BUILD_ABI="cxxabi1011"’ -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -ccbin /home/malt-lab-pc4/anaconda3/bin/x86_64-conda-linux-gnu-cc -std=c++14
FAILED: /tmp/pip-req-build-bg01oqs7/build/temp.linux-x86_64-cpython-310/falkon/c_ext/ops/cuda/cuda_copy_transpose.o
/usr/local/cuda-11.3/bin/nvcc -DTORCH_VERSION_MAJOR=1 -DTORCH_VERSION_MINOR=11 -DTORCH_VERSION_PATCH=0 -DWITH_CUDA -I./falkon/c_ext -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/TH -I/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/include/THC -I/usr/local/cuda-11.3/include -I/home/malt-lab-pc4/anaconda3/include/python3.10 -c -c /tmp/pip-req-build-bg01oqs7/falkon/c_ext/ops/cuda/cuda_copy_transpose.cu -o /tmp/pip-req-build-bg01oqs7/build/temp.linux-x86_64-cpython-310/falkon/c_ext/ops/cuda/cuda_copy_transpose.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’”’“‘-fPIC’”‘"’’ -O3 --expt-relaxed-constexpr --extended-lambda -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“_gcc”’ ‘-DPYBIND11_STDLIB=“_libstdcpp”’ ‘-DPYBIND11_BUILD_ABI=“_cxxabi1011”’ -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -ccbin /home/malt-lab-pc4/anaconda3/bin/x86_64-conda-linux-gnu-cc -std=c++14
In file included from /usr/local/cuda-11.3/include/cuda_runtime.h:83,
from :
/usr/local/cuda-11.3/include/crt/host_config.h:139:2: error: #error – unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag ‘-allow-unsupported-compiler’ can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
139 | #error – unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag ‘-allow-unsupported-compiler’ can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.

  ninja: build stopped: subcommand failed.
  Traceback (most recent call last):
    File "/home/malt-lab-pc4/anaconda3/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1740, in _run_ninja_build
      subprocess.run(
    File "/home/malt-lab-pc4/anaconda3/lib/python3.10/subprocess.py", line 524, in run
      raise CalledProcessError(retcode, process.args,
  subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

I am unable to solve the issue. Please reply.

Your host compiler is too new for CUDA 11.3:

/usr/local/cuda-11.3/include/crt/host_config.h:139:2: error: #error – unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag ‘-allow-unsupported-compiler’ can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.

You can either pass the mentioned variable to the PyTorch build at your own risk, downgrade gcc, or update CUDA.

Thanks!! It got resolved now.

@Elisha
Hi, I am facing the same issue.
Could you please help? How did you resolve it?
Thanks