System information (version)
- OpenCV => 3.4.1
- Operating System / Platform => Linux CentOS 7.4 64 bit
- Compiler => GCC 4.8.5
Detailed description
I am trying to install OpenCV 3.4.1 (using GCC 4.8.5, OpenMPI 3.0.1, cuda 9.0.176, nvidia driver 387.26) with the supercomputing package manager (SPACK) from llnl. The compilation fails, when building the dnn module.
[ 40%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/layers/prior_box_layer.cpp.o
cd /scratch/spackapps/spack-stage/spack-stage-IPjQ3f/opencv-3.4.1/spack-build/modules/dnn && /cluster/apps/spack/lib/spack/env/gcc/g++ -DCVAPI_EXPORTS -DHAVE_PROTOBUF=1 -DOPENCV_TRAITS_ENABLE_DEPRECATED -D_USE_MATH_DEFINES -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/scratch/spackapps/spack-stage/spack-stage-IPjQ3f/opencv-3.4.1/spack-build/3rdparty/ippicv/ippicv_lnx/include -I/scratch/spackapps/spack-stage/spack-stage-IPjQ3f/opencv-3.4.1/spack-build/3rdparty/ippicv/ippiw_lnx/include -isystem /scratch/spackapps/spack-stage/spack-stage-IPjQ3f/opencv-3.4.1/spack-build -I/cluster/apps/spack/var/spack/stage/opencv-3.4.1-dsxu5aazxkbttlfztlqp4h4ct3yu6xfm/opencv-3.4.1/modules/dnn/include -I/cluster/apps/spack/var/spack/stage/opencv-3.4.1-dsxu5aazxkbttlfztlqp4h4ct3yu6xfm/opencv-3.4.1/modules/dnn/src -I/scratch/spackapps/spack-stage/spack-stage-IPjQ3f/opencv-3.4.1/spack-build/modules/dnn -I/cluster/apps/spack/var/spack/stage/opencv-3.4.1-dsxu5aazxkbttlfztlqp4h4ct3yu6xfm/opencv-3.4.1/modules/cudev/include -I/cluster/apps/spack/var/spack/stage/opencv-3.4.1-dsxu5aazxkbttlfztlqp4h4ct3yu6xfm/opencv-3.4.1/modules/core/include -I/cluster/apps/spack/var/spack/stage/opencv-3.4.1-dsxu5aazxkbttlfztlqp4h4ct3yu6xfm/opencv-3.4.1/modules/imgproc/include -I/cluster/apps/spack/var/spack/stage/opencv-3.4.1-dsxu5aazxkbttlfztlqp4h4ct3yu6xfm/opencv-3.4.1/modules/dnn/src/ocl4dnn/include -I/cluster/apps/spack/var/spack/stage/opencv-3.4.1-dsxu5aazxkbttlfztlqp4h4ct3yu6xfm/opencv-3.4.1/modules/ts/include -I/cluster/apps/spack/var/spack/stage/opencv-3.4.1-dsxu5aazxkbttlfztlqp4h4ct3yu6xfm/opencv-3.4.1/modules/imgcodecs/include -I/cluster/apps/spack/var/spack/stage/opencv-3.4.1-dsxu5aazxkbttlfztlqp4h4ct3yu6xfm/opencv-3.4.1/modules/videoio/include -I/cluster/apps/spack/var/spack/stage/opencv-3.4.1-dsxu5aazxkbttlfztlqp4h4ct3yu6xfm/opencv-3.4.1/modules/highgui/include -I/cluster/apps/spack/var/spack/stage/opencv-3.4.1-dsxu5aazxkbttlfztlqp4h4ct3yu6xfm/opencv-3.4.1/modules/dnn/test -I/cluster/apps/spack/var/spack/stage/opencv-3.4.1-dsxu5aazxkbttlfztlqp4h4ct3yu6xfm/opencv-3.4.1/modules/dnn/perf -isystem /cluster/spack/apps/linux-centos7-x86_64/gcc-4.8.5/protobuf-3.1.0-l4okq4ruz7pclkxnr7kcsoghssoprscg/include -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Winit-self -Wpointer-arith -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -Wno-shadow -Wno-parentheses -Wno-maybe-uninitialized -Wno-sign-promo -Wno-missing-declarations -Wno-deprecated -Wno-missing-declarations -Wno-shadow -Wno-unused-parameter -Wno-unused-local-typedefs -Wno-sign-compare -Wno-sign-promo -Wno-undef -Wno-ignored-qualifiers -Wno-extra -Wno-unused-function -Wno-deprecated-declarations -Wno-error=non-virtual-dtor -Wno-unused-parameter -Wno-undef -Wno-ignored-qualifiers -Wno-enum-compare -Wno-deprecated-declarations -Wno-invalid-offsetof -O2 -g -DNDEBUG -fPIC -o CMakeFiles/opencv_dnn.dir/src/layers/prior_box_layer.cpp.o -c /cluster/apps/spack/var/spack/stage/opencv-3.4.1-dsxu5aazxkbttlfztlqp4h4ct3yu6xfm/opencv-3.4.1/modules/dnn/src/layers/prior_box_layer.cpp
In file included from /cluster/spack/apps/linux-centos7-x86_64/gcc-4.8.5/cuda-9.0.176-uqbi62cpkd645vbehqscqy42zhdvfvqq/include/math_functions.hpp:1725:0,
from /cluster/apps/spack/var/spack/stage/opencv-3.4.1-dsxu5aazxkbttlfztlqp4h4ct3yu6xfm/opencv-3.4.1/modules/dnn/src/layers/mvn_layer.cpp:46:
/cluster/spack/apps/linux-centos7-x86_64/gcc-4.8.5/cuda-9.0.176-uqbi62cpkd645vbehqscqy42zhdvfvqq/include/crt/func_macro.h:20:2: error: #error -- incorrect inclusion of a cudart header file
#error -- incorrect inclusion of a cudart header file
^
Steps to reproduce
Install SPACK (https://spack.readthedocs.io/en/latest/index.html) and run the command:
spack install --no-checksum opencv@3.4.1+core+cuda+dnn+gtk+png+highgui+imgproc+shared+tiff+zlib~python~eigen ^cmake@3.4.3+ncurses+openssl ^protobuf@3.1.0+shared ^cuda@9.0.176 ^gtkplus@2.24.31+X ^libtiff@4.0.6 ^libpng@1.6.27 ^python@2.7.13+tk ^libpthread-stubs@0.3 ^glib@2.49.7+libmount ^xproto@7.0.29 ^libx11@1.6.3 ^zlib@1.2.11 ^flex@2.6.1 ^gettext@0.19.8.1+bzip2+curses+git+libunistring+libxml2+tar+xz ^util-linux@2.29.1 ^freetype@2.7 ^fontconfig@2.11.1 %gcc@4.8.5 arch=linux-centos7-x86_64
System information (version)
Detailed description
I am trying to install OpenCV 3.4.1 (using GCC 4.8.5, OpenMPI 3.0.1, cuda 9.0.176, nvidia driver 387.26) with the supercomputing package manager (SPACK) from llnl. The compilation fails, when building the dnn module.
Steps to reproduce
Install SPACK (https://spack.readthedocs.io/en/latest/index.html) and run the command:
spack install --no-checksum opencv@3.4.1+core+cuda+dnn+gtk+png+highgui+imgproc+shared+tiff+zlib~python~eigen ^cmake@3.4.3+ncurses+openssl ^protobuf@3.1.0+shared ^cuda@9.0.176 ^gtkplus@2.24.31+X ^libtiff@4.0.6 ^libpng@1.6.27 ^python@2.7.13+tk ^libpthread-stubs@0.3 ^glib@2.49.7+libmount ^xproto@7.0.29 ^libx11@1.6.3 ^zlib@1.2.11 ^flex@2.6.1 ^gettext@0.19.8.1+bzip2+curses+git+libunistring+libxml2+tar+xz ^util-linux@2.29.1 ^freetype@2.7 ^fontconfig@2.11.1 %gcc@4.8.5 arch=linux-centos7-x86_64