Package Details: opencv-cuda 4.4.0-2

Git Clone URL: (read-only, click to copy)
Package Base: opencv-cuda
Description: Open Source Computer Vision Library with CUDA support
Upstream URL:
Licenses: BSD
Conflicts: opencv, opencv-samples
Provides: opencv, opencv-samples
Submitter: billypilgrim
Maintainer: billypilgrim
Last Packager: billypilgrim
Votes: 9
Popularity: 0.167196
First Submitted: 2018-08-11 08:14
Last Updated: 2020-08-02 12:59

Dependencies (24)

Required by (292)

Sources (2)

Latest Comments

1 2 3 4 5 Next › Last »

petronny commented on 2020-08-05 06:49


[ 29%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/src/grfmt_pfm.cpp.o
[ 29%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/src/grfmt_png.cpp.o
[ 30%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/src/grfmt_pxm.cpp.o
/build/opencv-cuda/src/opencv-4.4.0/modules/imgcodecs/src/grfmt_jpeg2000.cpp: In member function ‘bool cv::Jpeg2KDecoder::readComponent8u(uchar*, void*, int, int, int, int, int)’:
/build/opencv-cuda/src/opencv-4.4.0/modules/imgcodecs/src/grfmt_jpeg2000.cpp:381:48: error: lvalue required as unary ‘&’ operand
  381 |         jas_seqent_t* pix_row = &jas_matrix_get( buffer, y / ystep, 0 );
      |                                  ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/build/opencv-cuda/src/opencv-4.4.0/modules/imgcodecs/src/grfmt_jpeg2000.cpp: In member function ‘bool cv::Jpeg2KDecoder::readComponent16u(short unsigned int*, void*, int, int, int, int, int)’:
/build/opencv-cuda/src/opencv-4.4.0/modules/imgcodecs/src/grfmt_jpeg2000.cpp:447:48: error: lvalue required as unary ‘&’ operand
  447 |         jas_seqent_t* pix_row = &jas_matrix_get( buffer, y / ystep, 0 );
      |                                  ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
[ 30%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/src/grfmt_sunras.cpp.o
[ 30%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/misc/onnx/
make[2]: *** [modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/build.make:199: modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/src/grfmt_jpeg2000.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....

billypilgrim commented on 2020-08-02 13:01

@petronny Done. Thanks for the helpful suggestion :-)

petronny commented on 2020-07-31 05:44

Hi, cuda now depends on gcc9.

You may want to use /opt/cuda/bin/gcc to get rid of the gcc version?

petronny commented on 2020-07-10 14:39

I agree that building with openexr causes more ABI issues.

We need either openexr-cxx98 (perhaps) or removing openexr from opencv-cuda.

Or we can try building opencv-cuda with c++11?

zjhzxhz commented on 2020-03-29 14:24

I got the following error

/usr/bin/ld: /usr/lib/ undefined reference to `std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()@GLIBCXX_3.4.26'

And solve it by adding the following two options to cmake


stevesp commented on 2020-03-09 10:38

@billypilgrim, I looked at it again and the following is the case:

  • Without passing any flags like -DCUDA_ARCH_BIN it builds CUDA binaries for all available platforms (3.0, 3.5, 3.7, ..., 7.5 for me with CUDA 10.2) and that is a problem for the DNN module since it needs a version 5.3 or higher. So it cannot compile the DNN module for all lower versions and therefore fails.

  • Passing the flag -DCUDA_ARCH_BIN you can actually pass one or several versions, separated by a comma (e.g. -DCUDA_ARCH_BIN=6.0,6.1,7.0,7.5).

  • It is also possible to pass the actual architecture type of the GPU that should be supported (e.g. Fermi, Kepler, Maxwell, Pascal, Volta, Turing) with the -DCUDA_GENERATION flag. Then the CUDA_ARCH_BIN version is set to the supported versions.

  • Furthermore, Auto can be passed to the CUDA_GENERATION flag (-DCUDA_GENERATION=Auto). Then cmake runs a small program to get the correct CUDA_ARCH_BIN version (a Nvidia GPU needs to be present, otherwise it fails and sets it to all available platform versions as in the first point explained. I think this last option fixes the build error generally, so it would make sense to add the -DCUDA_GENERATION=Auto to cmake flags in the PKGBUILD file. Don't you think?

billypilgrim commented on 2020-03-08 18:11

@stevesp I'm not sure I completely understand... If the version is not specified then are only versions < 5.3 built or something?

stevesp commented on 2020-03-06 10:27

@petronny you are welcome. I think it should actually work automatically, at least that is what I think according to the following file: But I think the problem is that it tries to build it for all versions, if nothing is set explicitly, also the versions < 5.3. Therefore, passing the version solves the issue. It is possible to build it for several version as well if they are >= 5.3 (see: ).

petronny commented on 2020-03-03 09:05

Hi, your fix works. Thanks.

BTW, what's the default CUDA_ARCH that the package is building for? Can I build it for all CUDA_ARCHs?

stevesp commented on 2020-03-03 08:10

@znmeb you need to add -DCUDA_ARCH_BIN=7.5 to the cmake flags in the build function in the PKGBUILD. Substitute 7.5 with the compute capability your graphics card supports (find out at