Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation trouble #1

Open
sgsellan opened this issue Feb 20, 2025 · 3 comments
Open

Compilation trouble #1

sgsellan opened this issue Feb 20, 2025 · 3 comments

Comments

@sgsellan
Copy link

Hi!

Thanks for making this code available! I was assigned this as part of the Graphics Replicability Stamp project, and unfortunately have not been able to compile using the instructions on my Linux machine. I don't use Linux much, so there's definitely a chance I am doing something wrong :) Any idea what this could be about?

I ran the following, according to the instructions (I am installing with conda, since I don't have sudo access in this machine):

conda create -n statmc
conda activate statmc
conda install nvidia/label/cuda-12.3.0::cuda
conda install anaconda::cmake
conda install conda-forge::libstdcxx
conda install anaconda::zlib
git clone --recursive https://github.com/cg-tuwien/StatMC.git
cd StatMC/
mkdir build
cd build
mkdir opencv
cd opencv

and then

cmake -DCMAKE_C_COMPILER=/mnt2/sgsellan/anaconda3/bin/clang -DCMAKE_CXX_COMPILER=/mnt2/sgsellan/anaconda3/bin/clang++ -DCMAKE_C_STANDARD=17 -DCMAKE_CXX_STANDARD=17 -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} -march=native" -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -march=native" -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc -DCMAKE_CUDA_HOST_COMPILER=/usr/bin/clang++ -DCMAKE_CUDA_ARCHITECTURES=86 -DWITH_CUDA=ON -DWITH_CUBLAS=ON -DOPENCV_EXTRA_MODULES_PATH=../../src/ext/opencv_contrib/modules -DBUILD_LIST=cudaarithm,cudev,cudaimgproc,highgui,ximgproc ../../src/ext/opencv

but, during the opencv cmake (output cropped), encounter this error:

[ 21%] Building NVCC (Device) object modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_minmax.cu.o
nvcc warning : incompatible redefinition for option 'compiler-bindir', the last value of this option was used
nvcc warning : incompatible redefinition for option 'compiler-bindir', the last value of this option was used
/mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/detail/reduce.hpp(379): error: no instance of overloaded function "cv::cudev::blockReduce" matches the argument list
            argument types are: (cuda::std::__4::tuple<volatile int *, volatile int *>, cuda::std::__4::tuple<int &, int &>, int, cuda::std::__4::tuple<cv::cudev::minimum<int>, cv::cudev::maximum<int>>)
              blockReduce<BLOCK_SIZE>(smem_tuple(sminval, smaxval), tie(mymin, mymax), tid, make_tuple(minOp, maxOp));
              ^
/mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/block/reduce.hpp(72): note #3327-D: candidate function template "cv::cudev::blockReduce<N,P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,R0,R1,R2,R3,R4,R5,R6,R7,R8,R9,Op0,Op1,Op2,Op3,Op4,Op5,Op6,Op7,Op8,Op9>(const thrust::THRUST_200302_520_NS::tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9> &, const thrust::THRUST_200302_520_NS::tuple<R0, R1, R2, R3, R4, R5, R6, R7, R8, R9> &, uint, const thrust::THRUST_200302_520_NS::tuple<Op0, Op1, Op2, Op3, Op4, Op5, Op6, Op7, Op8, Op9> &)" failed deduction
  __attribute__((device)) __inline__ __attribute__((always_inline)) void blockReduce(const tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9>& smem,
                                                                         ^
/mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/block/reduce.hpp(63): note #3327-D: candidate function template "cv::cudev::blockReduce<N,T,Op>(volatile T *, T &, uint, const Op &)" failed deduction
  __attribute__((device)) __inline__ __attribute__((always_inline)) void blockReduce(volatile T* smem, T& val, uint tid, const Op& op)
                                                                         ^
          detected during:
            instantiation of "void cv::cudev::grid_reduce_detail::MinMaxReductor<cv::cudev::grid_reduce_detail::both, src_type, work_type>::reduceGrid<BLOCK_SIZE>(work_type *, int) [with src_type=uchar, work_type=int, BLOCK_SIZE=256]" at line 412
            instantiation of "void cv::cudev::grid_reduce_detail::reduce<Reductor,BLOCK_SIZE,PATCH_X,PATCH_Y,SrcPtr,ResType,MaskPtr>(SrcPtr, ResType *, MaskPtr, int, int) [with Reductor=cv::cudev::grid_reduce_detail::MinMaxReductor<cv::cudev::grid_reduce_detail::both, uchar, int>, BLOCK_SIZE=256, PATCH_X=4, PATCH_Y=4, SrcPtr=cv::cudev::GlobPtr<uchar>, ResType=int, MaskPtr=cv::cudev::WithOutMask]" at line 421
            instantiation of "void cv::cudev::grid_reduce_detail::reduce<Reductor,Policy,SrcPtr,ResType,MaskPtr>(const SrcPtr &, ResType *, const MaskPtr &, int, int, cudaStream_t) [with Reductor=cv::cudev::grid_reduce_detail::MinMaxReductor<cv::cudev::grid_reduce_detail::both, uchar, int>, Policy=cv::cudev::DefaultGlobReducePolicy, SrcPtr=cv::cudev::GlobPtr<uchar>, ResType=int, MaskPtr=cv::cudev::WithOutMask]" at line 460
            instantiation of "void cv::cudev::grid_reduce_detail::minMaxVal<Policy,SrcPtr,ResType,MaskPtr>(const SrcPtr &, ResType *, const MaskPtr &, int, int, cudaStream_t) [with Policy=cv::cudev::DefaultGlobReducePolicy, SrcPtr=cv::cudev::GlobPtr<uchar>, ResType=int, MaskPtr=cv::cudev::WithOutMask]" at line 206 of /mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/reduce.hpp
            instantiation of "void cv::cudev::gridFindMinMaxVal_<Policy,SrcPtr,ResType>(const SrcPtr &, cv::cudev::GpuMat_<ResType> &, cv::cuda::Stream &) [with Policy=cv::cudev::DefaultGlobReducePolicy, SrcPtr=cv::cudev::GpuMat_<uchar>, ResType=int]" at line 349 of /mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/reduce.hpp
            instantiation of "void cv::cudev::gridFindMinMaxVal(const SrcPtr &, cv::cudev::GpuMat_<ResType> &, cv::cuda::Stream &) [with SrcPtr=cv::cudev::GpuMat_<uchar>, ResType=int]" at line 68 of /mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudaarithm/src/cuda/minmax.cu
            instantiation of "void <unnamed>::minMaxImpl<T,R>(const cv::cuda::GpuMat &, const cv::cuda::GpuMat &, cv::cuda::GpuMat &, cv::cuda::Stream &) [with T=uchar, R=int]" at line 92 of /mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudaarithm/src/cuda/minmax.cu

/mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/detail/reduce.hpp(379): error: no instance of overloaded function "cv::cudev::blockReduce" matches the argument list
            argument types are: (cuda::std::__4::tuple<volatile int *, volatile int *>, cuda::std::__4::tuple<int &, int &>, int, cuda::std::__4::tuple<cv::cudev::minimum<int>, cv::cudev::maximum<int>>)
              blockReduce<BLOCK_SIZE>(smem_tuple(sminval, smaxval), tie(mymin, mymax), tid, make_tuple(minOp, maxOp));
              ^
/mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/block/reduce.hpp(72): note #3327-D: candidate function template "cv::cudev::blockReduce<N,P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,R0,R1,R2,R3,R4,R5,R6,R7,R8,R9,Op0,Op1,Op2,Op3,Op4,Op5,Op6,Op7,Op8,Op9>(const thrust::THRUST_200302_520_NS::tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9> &, const thrust::THRUST_200302_520_NS::tuple<R0, R1, R2, R3, R4, R5, R6, R7, R8, R9> &, uint, const thrust::THRUST_200302_520_NS::tuple<Op0, Op1, Op2, Op3, Op4, Op5, Op6, Op7, Op8, Op9> &)" failed deduction
  __attribute__((device)) __inline__ __attribute__((always_inline)) void blockReduce(const tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9>& smem,
                                                                         ^
/mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/block/reduce.hpp(63): note #3327-D: candidate function template "cv::cudev::blockReduce<N,T,Op>(volatile T *, T &, uint, const Op &)" failed deduction
  __attribute__((device)) __inline__ __attribute__((always_inline)) void blockReduce(volatile T* smem, T& val, uint tid, const Op& op)
                                                                         ^
          detected during:
            instantiation of "void cv::cudev::grid_reduce_detail::MinMaxReductor<cv::cudev::grid_reduce_detail::both, src_type, work_type>::reduceGrid<BLOCK_SIZE>(work_type *, int) [with src_type=schar, work_type=int, BLOCK_SIZE=256]" at line 412
            instantiation of "void cv::cudev::grid_reduce_detail::reduce<Reductor,BLOCK_SIZE,PATCH_X,PATCH_Y,SrcPtr,ResType,MaskPtr>(SrcPtr, ResType *, MaskPtr, int, int) [with Reductor=cv::cudev::grid_reduce_detail::MinMaxReductor<cv::cudev::grid_reduce_detail::both, schar, int>, BLOCK_SIZE=256, PATCH_X=4, PATCH_Y=4, SrcPtr=cv::cudev::GlobPtr<schar>, ResType=int, MaskPtr=cv::cudev::WithOutMask]" at line 421
            instantiation of "void cv::cudev::grid_reduce_detail::reduce<Reductor,Policy,SrcPtr,ResType,MaskPtr>(const SrcPtr &, ResType *, const MaskPtr &, int, int, cudaStream_t) [with Reductor=cv::cudev::grid_reduce_detail::MinMaxReductor<cv::cudev::grid_reduce_detail::both, schar, int>, Policy=cv::cudev::DefaultGlobReducePolicy, SrcPtr=cv::cudev::GlobPtr<schar>, ResType=int, MaskPtr=cv::cudev::WithOutMask]" at line 460
            instantiation of "void cv::cudev::grid_reduce_detail::minMaxVal<Policy,SrcPtr,ResType,MaskPtr>(const SrcPtr &, ResType *, const MaskPtr &, int, int, cudaStream_t) [with Policy=cv::cudev::DefaultGlobReducePolicy, SrcPtr=cv::cudev::GlobPtr<schar>, ResType=int, MaskPtr=cv::cudev::WithOutMask]" at line 206 of /mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/reduce.hpp
            instantiation of "void cv::cudev::gridFindMinMaxVal_<Policy,SrcPtr,ResType>(const SrcPtr &, cv::cudev::GpuMat_<ResType> &, cv::cuda::Stream &) [with Policy=cv::cudev::DefaultGlobReducePolicy, SrcPtr=cv::cudev::GpuMat_<schar>, ResType=int]" at line 349 of /mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/reduce.hpp
            instantiation of "void cv::cudev::gridFindMinMaxVal(const SrcPtr &, cv::cudev::GpuMat_<ResType> &, cv::cuda::Stream &) [with SrcPtr=cv::cudev::GpuMat_<schar>, ResType=int]" at line 68 of /mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudaarithm/src/cuda/minmax.cu
            instantiation of "void <unnamed>::minMaxImpl<T,R>(const cv::cuda::GpuMat &, const cv::cuda::GpuMat &, cv::cuda::GpuMat &, cv::cuda::Stream &) [with T=schar, R=int]" at line 93 of /mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudaarithm/src/cuda/minmax.cu

/mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/detail/reduce.hpp(379): error: no instance of overloaded function "cv::cudev::blockReduce" matches the argument list
            argument types are: (cuda::std::__4::tuple<volatile int *, volatile int *>, cuda::std::__4::tuple<int &, int &>, int, cuda::std::__4::tuple<cv::cudev::minimum<int>, cv::cudev::maximum<int>>)
              blockReduce<BLOCK_SIZE>(smem_tuple(sminval, smaxval), tie(mymin, mymax), tid, make_tuple(minOp, maxOp));
              ^
/mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/block/reduce.hpp(72): note #3327-D: candidate function template "cv::cudev::blockReduce<N,P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,R0,R1,R2,R3,R4,R5,R6,R7,R8,R9,Op0,Op1,Op2,Op3,Op4,Op5,Op6,Op7,Op8,Op9>(const thrust::THRUST_200302_520_NS::tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9> &, const thrust::THRUST_200302_520_NS::tuple<R0, R1, R2, R3, R4, R5, R6, R7, R8, R9> &, uint, const thrust::THRUST_200302_520_NS::tuple<Op0, Op1, Op2, Op3, Op4, Op5, Op6, Op7, Op8, Op9> &)" failed deduction
  __attribute__((device)) __inline__ __attribute__((always_inline)) void blockReduce(const tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9>& smem,
                                                                         ^
/mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/block/reduce.hpp(63): note #3327-D: candidate function template "cv::cudev::blockReduce<N,T,Op>(volatile T *, T &, uint, const Op &)" failed deduction
  __attribute__((device)) __inline__ __attribute__((always_inline)) void blockReduce(volatile T* smem, T& val, uint tid, const Op& op)
                                                                         ^
          detected during:
            instantiation of "void cv::cudev::grid_reduce_detail::MinMaxReductor<cv::cudev::grid_reduce_detail::both, src_type, work_type>::reduceGrid<BLOCK_SIZE>(work_type *, int) [with src_type=ushort, work_type=int, BLOCK_SIZE=256]" at line 412
            instantiation of "void cv::cudev::grid_reduce_detail::reduce<Reductor,BLOCK_SIZE,PATCH_X,PATCH_Y,SrcPtr,ResType,MaskPtr>(SrcPtr, ResType *, MaskPtr, int, int) [with Reductor=cv::cudev::grid_reduce_detail::MinMaxReductor<cv::cudev::grid_reduce_detail::both, ushort, int>, BLOCK_SIZE=256, PATCH_X=4, PATCH_Y=4, SrcPtr=cv::cudev::GlobPtr<ushort>, ResType=int, MaskPtr=cv::cudev::WithOutMask]" at line 421
            instantiation of "void cv::cudev::grid_reduce_detail::reduce<Reductor,Policy,SrcPtr,ResType,MaskPtr>(const SrcPtr &, ResType *, const MaskPtr &, int, int, cudaStream_t) [with Reductor=cv::cudev::grid_reduce_detail::MinMaxReductor<cv::cudev::grid_reduce_detail::both, ushort, int>, Policy=cv::cudev::DefaultGlobReducePolicy, SrcPtr=cv::cudev::GlobPtr<ushort>, ResType=int, MaskPtr=cv::cudev::WithOutMask]" at line 460
            instantiation of "void cv::cudev::grid_reduce_detail::minMaxVal<Policy,SrcPtr,ResType,MaskPtr>(const SrcPtr &, ResType *, const MaskPtr &, int, int, cudaStream_t) [with Policy=cv::cudev::DefaultGlobReducePolicy, SrcPtr=cv::cudev::GlobPtr<ushort>, ResType=int, MaskPtr=cv::cudev::WithOutMask]" at line 206 of /mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/reduce.hpp
            instantiation of "void cv::cudev::gridFindMinMaxVal_<Policy,SrcPtr,ResType>(const SrcPtr &, cv::cudev::GpuMat_<ResType> &, cv::cuda::Stream &) [with Policy=cv::cudev::DefaultGlobReducePolicy, SrcPtr=cv::cudev::GpuMat_<ushort>, ResType=int]" at line 349 of /mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/reduce.hpp
            instantiation of "void cv::cudev::gridFindMinMaxVal(const SrcPtr &, cv::cudev::GpuMat_<ResType> &, cv::cuda::Stream &) [with SrcPtr=cv::cudev::GpuMat_<ushort>, ResType=int]" at line 68 of /mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudaarithm/src/cuda/minmax.cu
            instantiation of "void <unnamed>::minMaxImpl<T,R>(const cv::cuda::GpuMat &, const cv::cuda::GpuMat &, cv::cuda::GpuMat &, cv::cuda::Stream &) [with T=ushort, R=int]" at line 94 of /mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudaarithm/src/cuda/minmax.cu

/mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/detail/reduce.hpp(379): error: no instance of overloaded function "cv::cudev::blockReduce" matches the argument list
            argument types are: (cuda::std::__4::tuple<volatile int *, volatile int *>, cuda::std::__4::tuple<int &, int &>, int, cuda::std::__4::tuple<cv::cudev::minimum<int>, cv::cudev::maximum<int>>)
              blockReduce<BLOCK_SIZE>(smem_tuple(sminval, smaxval), tie(mymin, mymax), tid, make_tuple(minOp, maxOp));
              ^
/mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/block/reduce.hpp(72): note #3327-D: candidate function template "cv::cudev::blockReduce<N,P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,R0,R1,R2,R3,R4,R5,R6,R7,R8,R9,Op0,Op1,Op2,Op3,Op4,Op5,Op6,Op7,Op8,Op9>(const thrust::THRUST_200302_520_NS::tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9> &, const thrust::THRUST_200302_520_NS::tuple<R0, R1, R2, R3, R4, R5, R6, R7, R8, R9> &, uint, const thrust::THRUST_200302_520_NS::tuple<Op0, Op1, Op2, Op3, Op4, Op5, Op6, Op7, Op8, Op9> &)" failed deduction
  __attribute__((device)) __inline__ __attribute__((always_inline)) void blockReduce(const tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9>& smem,
                                                                         ^
/mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/block/reduce.hpp(63): note #3327-D: candidate function template "cv::cudev::blockReduce<N,T,Op>(volatile T *, T &, uint, const Op &)" failed deduction
  __attribute__((device)) __inline__ __attribute__((always_inline)) void blockReduce(volatile T* smem, T& val, uint tid, const Op& op)
                                                                         ^
          detected during:
            instantiation of "void cv::cudev::grid_reduce_detail::MinMaxReductor<cv::cudev::grid_reduce_detail::both, src_type, work_type>::reduceGrid<BLOCK_SIZE>(work_type *, int) [with src_type=short, work_type=int, BLOCK_SIZE=256]" at line 412
            instantiation of "void cv::cudev::grid_reduce_detail::reduce<Reductor,BLOCK_SIZE,PATCH_X,PATCH_Y,SrcPtr,ResType,MaskPtr>(SrcPtr, ResType *, MaskPtr, int, int) [with Reductor=cv::cudev::grid_reduce_detail::MinMaxReductor<cv::cudev::grid_reduce_detail::both, short, int>, BLOCK_SIZE=256, PATCH_X=4, PATCH_Y=4, SrcPtr=cv::cudev::GlobPtr<short>, ResType=int, MaskPtr=cv::cudev::WithOutMask]" at line 421
            instantiation of "void cv::cudev::grid_reduce_detail::reduce<Reductor,Policy,SrcPtr,ResType,MaskPtr>(const SrcPtr &, ResType *, const MaskPtr &, int, int, cudaStream_t) [with Reductor=cv::cudev::grid_reduce_detail::MinMaxReductor<cv::cudev::grid_reduce_detail::both, short, int>, Policy=cv::cudev::DefaultGlobReducePolicy, SrcPtr=cv::cudev::GlobPtr<short>, ResType=int, MaskPtr=cv::cudev::WithOutMask]" at line 460
            instantiation of "void cv::cudev::grid_reduce_detail::minMaxVal<Policy,SrcPtr,ResType,MaskPtr>(const SrcPtr &, ResType *, const MaskPtr &, int, int, cudaStream_t) [with Policy=cv::cudev::DefaultGlobReducePolicy, SrcPtr=cv::cudev::GlobPtr<short>, ResType=int, MaskPtr=cv::cudev::WithOutMask]" at line 206 of /mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/reduce.hpp
            instantiation of "void cv::cudev::gridFindMinMaxVal_<Policy,SrcPtr,ResType>(const SrcPtr &, cv::cudev::GpuMat_<ResType> &, cv::cuda::Stream &) [with Policy=cv::cudev::DefaultGlobReducePolicy, SrcPtr=cv::cudev::GpuMat_<short>, ResType=int]" at line 349 of /mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/reduce.hpp
            instantiation of "void cv::cudev::gridFindMinMaxVal(const SrcPtr &, cv::cudev::GpuMat_<ResType> &, cv::cuda::Stream &) [with SrcPtr=cv::cudev::GpuMat_<short>, ResType=int]" at line 68 of /mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudaarithm/src/cuda/minmax.cu
            instantiation of "void <unnamed>::minMaxImpl<T,R>(const cv::cuda::GpuMat &, const cv::cuda::GpuMat &, cv::cuda::GpuMat &, cv::cuda::Stream &) [with T=short, R=int]" at line 95 of /mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudaarithm/src/cuda/minmax.cu

/mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/detail/reduce.hpp(379): error: no instance of overloaded function "cv::cudev::blockReduce" matches the argument list
            argument types are: (cuda::std::__4::tuple<volatile int *, volatile int *>, cuda::std::__4::tuple<int &, int &>, int, cuda::std::__4::tuple<cv::cudev::minimum<int>, cv::cudev::maximum<int>>)
              blockReduce<BLOCK_SIZE>(smem_tuple(sminval, smaxval), tie(mymin, mymax), tid, make_tuple(minOp, maxOp));
              ^
/mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/block/reduce.hpp(72): note #3327-D: candidate function template "cv::cudev::blockReduce<N,P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,R0,R1,R2,R3,R4,R5,R6,R7,R8,R9,Op0,Op1,Op2,Op3,Op4,Op5,Op6,Op7,Op8,Op9>(const thrust::THRUST_200302_520_NS::tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9> &, const thrust::THRUST_200302_520_NS::tuple<R0, R1, R2, R3, R4, R5, R6, R7, R8, R9> &, uint, const thrust::THRUST_200302_520_NS::tuple<Op0, Op1, Op2, Op3, Op4, Op5, Op6, Op7, Op8, Op9> &)" failed deduction
  __attribute__((device)) __inline__ __attribute__((always_inline)) void blockReduce(const tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9>& smem,
                                                                         ^
/mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/block/reduce.hpp(63): note #3327-D: candidate function template "cv::cudev::blockReduce<N,T,Op>(volatile T *, T &, uint, const Op &)" failed deduction
  __attribute__((device)) __inline__ __attribute__((always_inline)) void blockReduce(volatile T* smem, T& val, uint tid, const Op& op)
                                                                         ^
          detected during:
            instantiation of "void cv::cudev::grid_reduce_detail::MinMaxReductor<cv::cudev::grid_reduce_detail::both, src_type, work_type>::reduceGrid<BLOCK_SIZE>(work_type *, int) [with src_type=int, work_type=int, BLOCK_SIZE=256]" at line 412
            instantiation of "void cv::cudev::grid_reduce_detail::reduce<Reductor,BLOCK_SIZE,PATCH_X,PATCH_Y,SrcPtr,ResType,MaskPtr>(SrcPtr, ResType *, MaskPtr, int, int) [with Reductor=cv::cudev::grid_reduce_detail::MinMaxReductor<cv::cudev::grid_reduce_detail::both, int, int>, BLOCK_SIZE=256, PATCH_X=4, PATCH_Y=4, SrcPtr=cv::cudev::GlobPtr<int>, ResType=int, MaskPtr=cv::cudev::WithOutMask]" at line 421
            instantiation of "void cv::cudev::grid_reduce_detail::reduce<Reductor,Policy,SrcPtr,ResType,MaskPtr>(const SrcPtr &, ResType *, const MaskPtr &, int, int, cudaStream_t) [with Reductor=cv::cudev::grid_reduce_detail::MinMaxReductor<cv::cudev::grid_reduce_detail::both, int, int>, Policy=cv::cudev::DefaultGlobReducePolicy, SrcPtr=cv::cudev::GlobPtr<int>, ResType=int, MaskPtr=cv::cudev::WithOutMask]" at line 460
            instantiation of "void cv::cudev::grid_reduce_detail::minMaxVal<Policy,SrcPtr,ResType,MaskPtr>(const SrcPtr &, ResType *, const MaskPtr &, int, int, cudaStream_t) [with Policy=cv::cudev::DefaultGlobReducePolicy, SrcPtr=cv::cudev::GlobPtr<int>, ResType=int, MaskPtr=cv::cudev::WithOutMask]" at line 206 of /mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/reduce.hpp
            instantiation of "void cv::cudev::gridFindMinMaxVal_<Policy,SrcPtr,ResType>(const SrcPtr &, cv::cudev::GpuMat_<ResType> &, cv::cuda::Stream &) [with Policy=cv::cudev::DefaultGlobReducePolicy, SrcPtr=cv::cudev::GpuMat_<int>, ResType=int]" at line 349 of /mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/reduce.hpp
            instantiation of "void cv::cudev::gridFindMinMaxVal(const SrcPtr &, cv::cudev::GpuMat_<ResType> &, cv::cuda::Stream &) [with SrcPtr=cv::cudev::GpuMat_<int>, ResType=int]" at line 68 of /mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudaarithm/src/cuda/minmax.cu
            instantiation of "void <unnamed>::minMaxImpl<T,R>(const cv::cuda::GpuMat &, const cv::cuda::GpuMat &, cv::cuda::GpuMat &, cv::cuda::Stream &) [with T=int, R=int]" at line 96 of /mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudaarithm/src/cuda/minmax.cu

/mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/detail/reduce.hpp(379): error: no instance of overloaded function "cv::cudev::blockReduce" matches the argument list
            argument types are: (cuda::std::__4::tuple<volatile float *, volatile float *>, cuda::std::__4::tuple<float &, float &>, int, cuda::std::__4::tuple<cv::cudev::minimum<float>, cv::cudev::maximum<float>>)
              blockReduce<BLOCK_SIZE>(smem_tuple(sminval, smaxval), tie(mymin, mymax), tid, make_tuple(minOp, maxOp));
              ^
/mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/block/reduce.hpp(72): note #3327-D: candidate function template "cv::cudev::blockReduce<N,P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,R0,R1,R2,R3,R4,R5,R6,R7,R8,R9,Op0,Op1,Op2,Op3,Op4,Op5,Op6,Op7,Op8,Op9>(const thrust::THRUST_200302_520_NS::tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9> &, const thrust::THRUST_200302_520_NS::tuple<R0, R1, R2, R3, R4, R5, R6, R7, R8, R9> &, uint, const thrust::THRUST_200302_520_NS::tuple<Op0, Op1, Op2, Op3, Op4, Op5, Op6, Op7, Op8, Op9> &)" failed deduction
  __attribute__((device)) __inline__ __attribute__((always_inline)) void blockReduce(const tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9>& smem,
                                                                         ^
/mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/block/reduce.hpp(63): note #3327-D: candidate function template "cv::cudev::blockReduce<N,T,Op>(volatile T *, T &, uint, const Op &)" failed deduction
  __attribute__((device)) __inline__ __attribute__((always_inline)) void blockReduce(volatile T* smem, T& val, uint tid, const Op& op)
                                                                         ^
          detected during:
            instantiation of "void cv::cudev::grid_reduce_detail::MinMaxReductor<cv::cudev::grid_reduce_detail::both, src_type, work_type>::reduceGrid<BLOCK_SIZE>(work_type *, int) [with src_type=float, work_type=float, BLOCK_SIZE=256]" at line 412
            instantiation of "void cv::cudev::grid_reduce_detail::reduce<Reductor,BLOCK_SIZE,PATCH_X,PATCH_Y,SrcPtr,ResType,MaskPtr>(SrcPtr, ResType *, MaskPtr, int, int) [with Reductor=cv::cudev::grid_reduce_detail::MinMaxReductor<cv::cudev::grid_reduce_detail::both, float, float>, BLOCK_SIZE=256, PATCH_X=4, PATCH_Y=4, SrcPtr=cv::cudev::GlobPtr<float>, ResType=float, MaskPtr=cv::cudev::WithOutMask]" at line 421
            instantiation of "void cv::cudev::grid_reduce_detail::reduce<Reductor,Policy,SrcPtr,ResType,MaskPtr>(const SrcPtr &, ResType *, const MaskPtr &, int, int, cudaStream_t) [with Reductor=cv::cudev::grid_reduce_detail::MinMaxReductor<cv::cudev::grid_reduce_detail::both, float, float>, Policy=cv::cudev::DefaultGlobReducePolicy, SrcPtr=cv::cudev::GlobPtr<float>, ResType=float, MaskPtr=cv::cudev::WithOutMask]" at line 460
            instantiation of "void cv::cudev::grid_reduce_detail::minMaxVal<Policy,SrcPtr,ResType,MaskPtr>(const SrcPtr &, ResType *, const MaskPtr &, int, int, cudaStream_t) [with Policy=cv::cudev::DefaultGlobReducePolicy, SrcPtr=cv::cudev::GlobPtr<float>, ResType=float, MaskPtr=cv::cudev::WithOutMask]" at line 206 of /mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/reduce.hpp
            instantiation of "void cv::cudev::gridFindMinMaxVal_<Policy,SrcPtr,ResType>(const SrcPtr &, cv::cudev::GpuMat_<ResType> &, cv::cuda::Stream &) [with Policy=cv::cudev::DefaultGlobReducePolicy, SrcPtr=cv::cudev::GpuMat_<float>, ResType=float]" at line 349 of /mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/reduce.hpp
            instantiation of "void cv::cudev::gridFindMinMaxVal(const SrcPtr &, cv::cudev::GpuMat_<ResType> &, cv::cuda::Stream &) [with SrcPtr=cv::cudev::GpuMat_<float>, ResType=float]" at line 68 of /mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudaarithm/src/cuda/minmax.cu
            instantiation of "void <unnamed>::minMaxImpl<T,R>(const cv::cuda::GpuMat &, const cv::cuda::GpuMat &, cv::cuda::GpuMat &, cv::cuda::Stream &) [with T=float, R=float]" at line 97 of /mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudaarithm/src/cuda/minmax.cu

/mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/detail/reduce.hpp(379): error: no instance of overloaded function "cv::cudev::blockReduce" matches the argument list
            argument types are: (cuda::std::__4::tuple<volatile double *, volatile double *>, cuda::std::__4::tuple<double &, double &>, int, cuda::std::__4::tuple<cv::cudev::minimum<double>, cv::cudev::maximum<double>>)
              blockReduce<BLOCK_SIZE>(smem_tuple(sminval, smaxval), tie(mymin, mymax), tid, make_tuple(minOp, maxOp));
              ^
/mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/block/reduce.hpp(72): note #3327-D: candidate function template "cv::cudev::blockReduce<N,P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,R0,R1,R2,R3,R4,R5,R6,R7,R8,R9,Op0,Op1,Op2,Op3,Op4,Op5,Op6,Op7,Op8,Op9>(const thrust::THRUST_200302_520_NS::tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9> &, const thrust::THRUST_200302_520_NS::tuple<R0, R1, R2, R3, R4, R5, R6, R7, R8, R9> &, uint, const thrust::THRUST_200302_520_NS::tuple<Op0, Op1, Op2, Op3, Op4, Op5, Op6, Op7, Op8, Op9> &)" failed deduction
  __attribute__((device)) __inline__ __attribute__((always_inline)) void blockReduce(const tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9>& smem,
                                                                         ^
/mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/block/reduce.hpp(63): note #3327-D: candidate function template "cv::cudev::blockReduce<N,T,Op>(volatile T *, T &, uint, const Op &)" failed deduction
  __attribute__((device)) __inline__ __attribute__((always_inline)) void blockReduce(volatile T* smem, T& val, uint tid, const Op& op)
                                                                         ^
          detected during:
            instantiation of "void cv::cudev::grid_reduce_detail::MinMaxReductor<cv::cudev::grid_reduce_detail::both, src_type, work_type>::reduceGrid<BLOCK_SIZE>(work_type *, int) [with src_type=double, work_type=double, BLOCK_SIZE=256]" at line 412
            instantiation of "void cv::cudev::grid_reduce_detail::reduce<Reductor,BLOCK_SIZE,PATCH_X,PATCH_Y,SrcPtr,ResType,MaskPtr>(SrcPtr, ResType *, MaskPtr, int, int) [with Reductor=cv::cudev::grid_reduce_detail::MinMaxReductor<cv::cudev::grid_reduce_detail::both, double, double>, BLOCK_SIZE=256, PATCH_X=4, PATCH_Y=4, SrcPtr=cv::cudev::GlobPtr<double>, ResType=double, MaskPtr=cv::cudev::WithOutMask]" at line 421
            instantiation of "void cv::cudev::grid_reduce_detail::reduce<Reductor,Policy,SrcPtr,ResType,MaskPtr>(const SrcPtr &, ResType *, const MaskPtr &, int, int, cudaStream_t) [with Reductor=cv::cudev::grid_reduce_detail::MinMaxReductor<cv::cudev::grid_reduce_detail::both, double, double>, Policy=cv::cudev::DefaultGlobReducePolicy, SrcPtr=cv::cudev::GlobPtr<double>, ResType=double, MaskPtr=cv::cudev::WithOutMask]" at line 460
            instantiation of "void cv::cudev::grid_reduce_detail::minMaxVal<Policy,SrcPtr,ResType,MaskPtr>(const SrcPtr &, ResType *, const MaskPtr &, int, int, cudaStream_t) [with Policy=cv::cudev::DefaultGlobReducePolicy, SrcPtr=cv::cudev::GlobPtr<double>, ResType=double, MaskPtr=cv::cudev::WithOutMask]" at line 206 of /mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/reduce.hpp
            instantiation of "void cv::cudev::gridFindMinMaxVal_<Policy,SrcPtr,ResType>(const SrcPtr &, cv::cudev::GpuMat_<ResType> &, cv::cuda::Stream &) [with Policy=cv::cudev::DefaultGlobReducePolicy, SrcPtr=cv::cudev::GpuMat_<double>, ResType=double]" at line 349 of /mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/reduce.hpp
            instantiation of "void cv::cudev::gridFindMinMaxVal(const SrcPtr &, cv::cudev::GpuMat_<ResType> &, cv::cuda::Stream &) [with SrcPtr=cv::cudev::GpuMat_<double>, ResType=double]" at line 68 of /mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudaarithm/src/cuda/minmax.cu
            instantiation of "void <unnamed>::minMaxImpl<T,R>(const cv::cuda::GpuMat &, const cv::cuda::GpuMat &, cv::cuda::GpuMat &, cv::cuda::Stream &) [with T=double, R=double]" at line 98 of /mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudaarithm/src/cuda/minmax.cu

7 errors detected in the compilation of "/mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules/cudaarithm/src/cuda/minmax.cu".
CMake Error at cuda_compile_1_generated_minmax.cu.o.Release.cmake:280 (message):
  Error generating file
  /mnt2/sgsellan/StatMC/build/opencv/modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/./cuda_compile_1_generated_minmax.cu.o


make[2]: *** [modules/cudaarithm/CMakeFiles/opencv_cudaarithm.dir/build.make:196: modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_minmax.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:3461: modules/cudaarithm/CMakeFiles/opencv_cudaarithm.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
@HiroyukiSakai
Copy link
Collaborator

Hi!

I'll try my best to help. :)

The error messages point to an OpenCV function (blockReduce()) that we haven't modified, suggesting a possible version mismatch or incompatibility issue.
In fact, the same error message can occur when CUDA 12.4 is used instead of 12.3.
Therefore, it's worth double-checking that CUDA 12.3 is definitely being used, even though you've requested it.
I think it's possible that system specifics (like another CUDA version already being installed) can override the requested version during compilation.
You can check the active CUDA version using nvidia-smi.

Let me know if this helps!
I'm happy to try reproducing the problem on my end if needed.

@sgsellan
Copy link
Author

Thank you! Turns out conda did not install 12.3 even though I told it to :) Computers are fun. This allows me to build opencv, however, when building pbrt-v3, I get

[ 66%] Built target IlmImfTest
make: *** [Makefile:166: all] Error 2
(statmc) sgsellan@concerto:/mnt2/sgsellan/StatMC/build/pbrt-v3$ make
[  0%] Building CXX object CMakeFiles/pbrt.dir/src/core/api.cpp.o
In file included from /mnt2/sgsellan/StatMC/src/core/api.cpp:49:
In file included from /mnt2/sgsellan/StatMC/src/core/film.h:58:
In file included from /mnt2/sgsellan/StatMC/src/statistics/buffer.h:14:
/mnt2/sgsellan/StatMC/src/statistics/statpbrt.h:13:10: fatal error: 'opencv2/cudaimgproc.hpp' file not found
   13 | #include <opencv2/cudaimgproc.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/pbrt.dir/build.make:135: CMakeFiles/pbrt.dir/src/core/api.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:814: CMakeFiles/pbrt.dir/all] Error 2
make: *** [Makefile:166: all] Error 2

Digging around, I see this means that the cuda files that should be generated by building opencv were not generated, and indeed, when I run

find /mnt2/sgsellan/anaconda3/envs/statmc/ -name cudaimgproc.hpp

I get nothing. I look back at my cmake output for opencv and see

-- General configuration for OpenCV 4.8.1 =====================================
--   Version control:               4.8.1
-- 
--   Extra modules:
--     Location (extra):            /mnt2/sgsellan/StatMC/src/ext/opencv_contrib/modules
--     Version control (extra):     7977472f
-- 
--   Platform:
--     Timestamp:                   2025-02-20T14:16:44Z
--     Host:                        Linux 5.15.0-130-generic x86_64
--     CMake:                       3.31.2
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/gmake
--     Configuration:               Release
-- 
--   CPU/HW features:
--     Baseline:                    SSE SSE2 SSE3 SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX AVX2
--       requested:                 DETECT
--     Dispatched code generation:  AVX512_SKX
--       requested:                 SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
--       AVX512_SKX (3 files):      + AVX_512F AVX512_COMMON AVX512_SKX
-- 
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++ standard:                17
--     C++ Compiler:                /mnt2/sgsellan/anaconda3/bin/clang++  (ver 17.0.6)
--     C++ flags (Release):         -march=native   -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Wno-long-long -pthread -Qunused-arguments -ffunction-sections -fdata-sections  -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -march=native   -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Wno-long-long -pthread -Qunused-arguments -ffunction-sections -fdata-sections  -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     C Compiler:                  /mnt2/sgsellan/anaconda3/bin/clang
--     C flags (Release):           -march=native   -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Wno-long-long -pthread -Qunused-arguments -ffunction-sections -fdata-sections  -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -march=native   -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Wno-long-long -pthread -Qunused-arguments -ffunction-sections -fdata-sections  -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     Linker flags (Release):      -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/mnt2/sgsellan/anaconda3/envs/statmc/lib -Wl,-rpath-link,/mnt2/sgsellan/anaconda3/envs/statmc/lib -L/mnt2/sgsellan/anaconda3/envs/statmc/lib  -L/mnt2/sgsellan/anaconda3/envs/statmc/targets/x86_64-linux/lib -L/mnt2/sgsellan/anaconda3/envs/statmc/targets/x86_64-linux/lib/stubs  -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined  
--     Linker flags (Debug):        -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/mnt2/sgsellan/anaconda3/envs/statmc/lib -Wl,-rpath-link,/mnt2/sgsellan/anaconda3/envs/statmc/lib -L/mnt2/sgsellan/anaconda3/envs/statmc/lib  -L/mnt2/sgsellan/anaconda3/envs/statmc/targets/x86_64-linux/lib -L/mnt2/sgsellan/anaconda3/envs/statmc/targets/x86_64-linux/lib/stubs  -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined  
--     ccache:                      NO
--     Precompiled headers:         NO
--     Extra dependencies:          dl m pthread rt
--     3rdparty dependencies:
-- 
--   OpenCV modules:
--     To be built:                 calib3d core features2d flann highgui imgcodecs imgproc video ximgproc
--     Disabled:                    world
--     Disabled by dependency:      aruco bgsegm bioinspired ccalib datasets dnn dnn_objdetect dnn_superres dpm face fuzzy gapi hfs img_hash intensity_transform java_bindings_generator js_bindings_generator line_descriptor mcc ml objc_bindings_generator objdetect optflow phase_unwrapping photo plot python_bindings_generator python_tests quality rapid reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking ts videoio videostab wechat_qrcode xfeatures2d xobjdetect xphoto
--     Unavailable:                 alphamat cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev cvv freetype hdf java julia matlab ovis python2 python3 sfm viz
--     Applications:                apps
--     Documentation:               NO
--     Non-free algorithms:         NO
-- 
--   GUI:                           NONE
--     GTK+:                        NO
--     VTK support:                 NO
-- 
--   Media I/O: 
--     ZLib:                        /mnt2/sgsellan/anaconda3/envs/statmc/lib/libz.so (ver 1.2.13)
--     JPEG:                        libjpeg-turbo (ver 2.1.3-62)
--     WEBP:                        build (ver encoder: 0x020f)
--     PNG:                         /mnt2/sgsellan/anaconda3/envs/statmc/lib/libpng.so (ver 1.6.39)
--     TIFF:                        build (ver 42 - 4.2.0)
--     JPEG 2000:                   build (ver 2.5.0)
--     OpenEXR:                     build (ver 2.3.0)
--     HDR:                         YES
--     SUNRASTER:                   YES
--     PXM:                         YES
--     PFM:                         YES
-- 
--   Video I/O:
--     DC1394:                      NO
--     FFMPEG:                      NO
--       avcodec:                   NO
--       avformat:                  NO
--       avutil:                    NO
--       swscale:                   NO
--       avresample:                NO
--     GStreamer:                   NO
--     v4l/v4l2:                    YES (linux/videodev2.h)
-- 
--   Parallel framework:            pthreads
-- 
--   Trace:                         YES (with Intel ITT)
-- 
--   Other third-party libraries:
--     Intel IPP:                   2021.8 [2021.8.0]
--            at:                   /mnt2/sgsellan/StatMC/build/opencv/3rdparty/ippicv/ippicv_lnx/icv
--     Intel IPP IW:                sources (2021.8.0)
--               at:                /mnt2/sgsellan/StatMC/build/opencv/3rdparty/ippicv/ippicv_lnx/iw
--     VA:                          NO
--     Lapack:                      NO
--     Eigen:                       NO
--     Custom HAL:                  NO
--     Protobuf:                    build (3.19.1)
--     Flatbuffers:                 builtin/3rdparty (23.5.9)
-- 
--   NVIDIA CUDA:                   NO
-- 
--   cuDNN:                         NO
-- 
--   OpenCL:                        YES (no extra features)
--     Include path:                /mnt2/sgsellan/StatMC/src/ext/opencv/3rdparty/include/opencl/1.2
--     Link libraries:              Dynamic load
-- 
--   Python (for build):            /mnt2/sgsellan/anaconda3/envs/statmc/bin/python3
-- 
--   Java:                          
--     ant:                         NO
--     Java:                        NO
--     JNI:                         NO
--     Java wrappers:               NO
--     Java tests:                  NO
-- 
--   Install to:                    /usr/local
-- -----------------------------------------------------------------

which includes

--     Unavailable:                 alphamat cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev cvv freetype hdf java julia matlab ovis python2 python3 sfm viz

and

--   NVIDIA CUDA:                   NO

So, indeed, opencv is not installing these parts. Any idea why this could be? Here's my CMakeCache.txt in case that's useful.

@HiroyukiSakai
Copy link
Collaborator

It looks like your CUDA installation couldn't be found by CMake for building OpenCV.
This might have to do with not having administrator rights on that machine and CUDA probably not being installed in a default location.
Maybe specifying the location explicitly with the CUDA_TOOLKIT_ROOT_DIR CMake variable helps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants