Repository: opencv
Issue: Compilation (master with contrib) fails at debayer.cu compilation
Labels: category: build/install,category: gpu/cuda (contrib)

Compilation fails with : i:\opencv-master\opencv\modules\core\include\opencv2\core\cuda\detail/color_detail.hpp(535): error : dynamic initializa
tion is not supported for a __constant__ variable [I:\opencv-master\build\modules\cudaimgproc\opencv_cudaimgproc.vcxpro
j]

i:\opencv-master\opencv\modules\core\include\opencv2\core\cuda\detail/color_detail.hpp(584): error : dynamic initializa
tion is not supported for a __constant__ variable [I:\opencv-master\build\modules\cudaimgproc\opencv_cudaimgproc.vcxpro
j]

i:\opencv-master\opencv\modules\core\include\opencv2\core\cuda\detail/color_detail.hpp(674): error : dynamic initializa
tion is not supported for a __constant__ variable [I:\opencv-master\build\modules\cudaimgproc\opencv_cudaimgproc.vcxpro
j]

i:\opencv-master\opencv\modules\core\include\opencv2\core\cuda\detail/color_detail.hpp(751): error : dynamic initializa
tion is not supported for a __constant__ variable [I:\opencv-master\build\modules\cudaimgproc\opencv_cudaimgproc.vcxpro
j]

##### System information (version)
- OpenCV => master (from git, from now)
- Operating System / Platform => Windows 10 64bits
- Compiler => Visual Studio 2017
- cmake 3.13.3 64bits
- cuda 10

##### Detailed description
  Building NVCC (Device) object modules/cudaimgproc/CMakeFiles/cuda_compile_1.dir/src/cuda/Release/cuda_compile_1_gener
  ated_debayer.cu.obj
  debayer.cu
i:\opencv-master\opencv\modules\core\include\opencv2\core\cuda\detail/color_detail.hpp(535): error : dynamic initializa
tion is not supported for a __constant__ variable [I:\opencv-master\build\modules\cudaimgproc\opencv_cudaimgproc.vcxpro
j]

i:\opencv-master\opencv\modules\core\include\opencv2\core\cuda\detail/color_detail.hpp(584): error : dynamic initializa
tion is not supported for a __constant__ variable [I:\opencv-master\build\modules\cudaimgproc\opencv_cudaimgproc.vcxpro
j]

i:\opencv-master\opencv\modules\core\include\opencv2\core\cuda\detail/color_detail.hpp(674): error : dynamic initializa
tion is not supported for a __constant__ variable [I:\opencv-master\build\modules\cudaimgproc\opencv_cudaimgproc.vcxpro
j]

i:\opencv-master\opencv\modules\core\include\opencv2\core\cuda\detail/color_detail.hpp(751): error : dynamic initializa
tion is not supported for a __constant__ variable [I:\opencv-master\build\modules\cudaimgproc\opencv_cudaimgproc.vcxpro
j]

  4 errors detected in the compilation of "C:/Users/soleil/AppData/Local/Temp/tmpxft_000018b0_00000000-10_debayer.cpp1.
  ii".
##### Steps to reproduce

	cmake -G $target -T v141, host=x64 -j8 `
		-DBUILD_JAVA=0 -DWITH_MATLAB=0 -DBUILD_DOC=0 -DBUILD_PERF_TESTS=0 -DBUILD_TESTS=0 -DBUILD_opencv_world=0 `
		-DOPENCV_ENABLE_NONFREE=1 -DBUILD_opencv-apps=0 -DENABLE_PYLINT=0 -DENABLE_CXX11=1 -DWITH_VTK=1 `
		-DCUDA_SDK_ROOT_DIR="$env:CUDA_PATH" -DCUDA_ARCH_BIN="5.2" -DCUDA_VERBOSE_BUILD=0 -DBUILD_CUDA_STUBS=0 `
		-DWITH_OPENCL=1 -DWITH_CUDA=1 -DMKL_WITH_OPENMP=1 -DMKL_WITH_TBB=1 `
		-DOPENCV_EXTRA_MODULES_PATH="../opencv_contrib/modules" `
		-DINSTALL_CREATE_DISTRIB=1 -DCPACK_BINARY_ZIP=1 -DCPACK_SOURCE_ZIP=1 -DCMAKE_VERBOSE_MAKEFILE=0 `
		../opencv | Tee-Object -Variable RESULT