Unable to build opencv from source

i am trying to build opencv from source with CUDA enabled. I have tried various version of opencv. i keep getting the error below.

Makefile:162: recipe for target ‘all’ failed
make: *** [all] Error 2

may i know what this error means. what should i do to get rid of this error?

what you show us, is not the real error (this must be a few lines above)

to help you better, we need:

  • exact opencv version
  • os
  • cuda sdk version
  • your cmake cmdline

did you build with opencv_contrib ?