open-mmlab / denseflow

Extracting optical flow and frames

Home Page:https://open-mmlab.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

denseflow_gpu.cpp:2:10: opencv2/cudaarithm.hpp: No such file or directory

DeeperMind opened this issue · comments

I ran the scripts in INSTALL.md, but encountered the following error:

/home/username/app/src/denseflow/src/denseflow_gpu.cpp:2:10: fatal error: opencv2/cudaarithm.hpp: No such file or directory
    2 | #include "opencv2/cudaarithm.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/zzdenseflow.dir/build.make:89: CMakeFiles/zzdenseflow.dir/src/denseflow_gpu.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:105: CMakeFiles/zzdenseflow.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Following #22, I tried to add ZZROOT=$HOME/app to PATH and $ZZROOT/lib to LD_LIBRARY_PATH, but the error persists.

commented

Have you installed cuda version of opencv?

My bad. It is caused by an earlier error when compiling OpenCV

In file included from /usr/include/cuda_runtime.h:83,
                 from <command-line>:
/usr/include/crt/host_config.h:138:2: error: #error -- unsupported GNU version! gcc versions later than 8 are not supported!
  138 | #error -- unsupported GNU version! gcc versions later than 8 are not supported!
      |  ^~~~~
CMake Error at cuda_compile_1_generated_gpu_mat.cu.o.RELEASE.cmake:222 (message):
  Error generating
  /home/jinan/app/src/opencv/build/modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/./cuda_compile_1_generated_gpu_mat.cu.o

One should set gcc to a proper version using update-alternatives or other methods.