Error while installing from source

Hello,
I am trying to build from source and I followed all the instructions mentioned in the GitHub

I am getting this error while building

FAILED: caffe2/CMakeFiles/torch_cuda_cu.dir/__/aten/src/ATen/native/cuda/GcdLcmKernel.cu.o

./aten/src/ATen/native/cuda/GcdLcmKernel.cu:20:721: error: the value of ‘at::native::gcd_name’ is not usable in a constant e
xpression
../aten/src/ATen/native/cuda/GcdLcmKernel.cu:17:12: note: ‘at::native::gcd_name’ was not declared ‘constexpr’
 const char gcd_name[] = "gcd";
            ^
../aten/src/ATen/native/cuda/GcdLcmKernel.cu: In lambda function:
../aten/src/ATen/native/cuda/GcdLcmKernel.cu:20:1388: error: the value of ‘at::native::gcd_name’ is not usable in a constant expression
../aten/src/ATen/native/cuda/GcdLcmKernel.cu:17:12: note: ‘at::native::gcd_name’ was not declared ‘constexpr’
 const char gcd_name[] = "gcd";
            ^
../aten/src/ATen/native/cuda/GcdLcmKernel.cu: In lambda function:
../aten/src/ATen/native/cuda/GcdLcmKernel.cu:20:2050: error: the value of ‘at::native::gcd_name’ is not usable in a constant expression
../aten/src/ATen/native/cuda/GcdLcmKernel.cu:17:12: note: ‘at::native::gcd_name’ was not declared ‘constexpr’
 const char gcd_name[] = "gcd";
            ^
../aten/src/ATen/native/cuda/GcdLcmKernel.cu: In lambda function:
../aten/src/ATen/native/cuda/GcdLcmKernel.cu:20:2698: error: the value of ‘at::native::gcd_name’ is not usable in a constan

CUDA: 11.3
CUDNN: 8.2.0
CMAKE version: 3.22.0

Any suggestions on how to deal this issue ?

Could you provide instructions how to reproduce this issue?
In particular, which GCC version are you using, which PyTorch commit etc.?

Meet the same problem.
Here is my environment:
gcc 5.5.0
CUDA 10.2
pytorch source tag: 793621984bc192f2e290dfcaa4f9e035f8b81cb8
cmake 3.22.1

I solve this problem by upgrading gcc from 5.5 to 7.5

This same errors occurs for me in AbsKernel.cu, and I have tried GCC 9 and 11 with no success. CUDA is set to 11.3 and PyTorch is the release version 1.12.1. Any ideas what might be going on here?

/aten/src/ATen/native/cuda/AbsKernel.cu: In lambda function:
/aten/src/ATen/native/cuda/AbsKernel.cu:25:2440: error: the value of ‘at::native:
:abs_name’ is not usable in a constant expression
 /aten/src/ATen/native/cuda/AbsKernel.cu:18:12: note: ‘at::native::abs_name’ was n
ot declared ‘constexpr’
   const char abs_name[] = "abs_kernel";