0

I am trying to install OpenCV 3.2 on a Linux machine (Arch Linux) that has CUDA 10. I cannot remove CUDA 10 because I have other applications (Tensorflow, OpenCV 4, etc) that require CUDA 10. I need OpenCV 3.2 for an older machine learning application I am trying to run however, I am running into errors when building OpenCV 3.2. One of the errors I am dealing with is:

Recipe for target cuda_compile_generated_gpu_mat.cu.o failed

I have already tried disabling dnn_modern when running make.

Note I have also tried changing lines in the make file as suggested by this post: CMake Error: Variables are set to NOTFOUND

The output of the make error after typing make -j8 is:

1 error detected in the compilation of "/tmp/tmpxft_000033aa_00000000-12_gpu_mat.compute_61.cpp1.ii".
CMake Error at cuda_compile_generated_gpu_mat.cu.o.cmake:266 (message):
Error generating file
/home/patelvrajn/Development/opencv-3.2.0/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o


make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/build.make:65: modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1346: modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

***OpenCV 3.2 and 4.0 are needed for both Python and C++ in my case.

Thanks in advance for any help!

nathancy
  • 42,661
  • 14
  • 115
  • 137
  • The error message *'Recipe for target cuda_compile_generated_gpu_mat.cu.o failed'* says nothing about the reason why it's failing. Please be more specific. – nada Jul 08 '19 at 16:20
  • @nada I gave the exact terminal output in the post (edited in), if that is what you are looking for. –  Jul 08 '19 at 16:51
  • my suggestion... install the latest OpenCV, it should not be that hard to adapt to 3.6 a 3.2 code. If you want to continue, you need to know what is failing. Try looking for the error, maybe set it to verbose to get more info. The answer to the link you are posting was to make cuda 9.0 work... and a lot may have changed in cuda 10.0..... You may also try to look the difference in the cmake of the cuda part in the latest version... maybe you get an idea what to change. But maybe even the source code change – api55 Jul 09 '19 at 07:54

1 Answers1

0

Have just followed the same route and encountered exactly the same (not remotely helpful) error message trying to build OpenCV 3.3 on CUDA 10.1 on Windows. We have to assume there's some fundamental conflict between later versions of CUDA and earlier OpenCV versions. Not the best news I know, but the answer to your question is looking like a "No".