Building Opencv with CUDA

Hi everyone, I have a Jetson Orin Nano Developement kit 8GB with following configurations:

Machine: aarch64
Model: NVIDIA Jetson Orin Nano Developer Kit
Distribution: Ubuntu 22.04 Jammy Jellyfish
Release: 5.15.122-tegra
System: Linux
Python: 3.10.12
Gcc: 11.4.0

Libraries
CUDA: 12.2.140
CUDNN: 8.9.4.25
TensorRT: 8.6.2.3
VPI: 3.0.10
Vulkan: 1.3.204
OpenCV: 4.8.0 with CUDA: NO
Module: NVIDIA Jetson Orin Nano (Developer kit) SoC: tegra234
CUDA Arch BIN: 8.7
L4T: 36.2.0
Jetpack: 6.0 DP

I am using the following Cmake command to build opencv with CUDA support

cmake -D WITH_CUDA=ON -D WITH_CUDNN=ON -D CUDA_ARCH_BIN="8.7" -D OPENCV_GENERATE_PKGCONFIG=ON -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules -D WITH_GSTREAMER=ON -D WITH_LIBV4L=ON -D BUILD_opencv_python3=ON -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_EXAMPLES=OFF -D CMAKE_BUILD_TYPE=RELEASE -DCUDA_STANDARD=14.0 -DCUDNN_VERSION=8.9.4 -DL4T_VERSION=36.2 -DPYTHON3_EXECUTABLE=/usr/bin/python3.10 -DBUILD_SHARED_LIBS=ON -D CMAKE_INSTALL_PREFIX=/usr/local ..

(PS: I am not very confident of the make tags myself)

I am getting the folllowing error while performing make:

Please guide me. Thanks.

[Resolved] Documenting in case anyone else faces the same issue
downgrade gcc/g++ from 11 to 10

follow this

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10
sudo update-alternatives --config gcc
sudo update-alternatives --config g++