-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Building OpenCV 3.4.1+OpenMPI 3.0.1+cuda 9.0.176+GCC 4.8.5 fails due to cudart header #11745
Description
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 [email protected]+core+cuda+dnn+gtk+png+highgui+imgproc+shared+tiff+zlib~python~eigen ^[email protected]+ncurses+openssl ^[email protected]+shared ^[email protected] ^[email protected]+X ^[email protected] ^[email protected] ^[email protected]+tk ^[email protected] ^[email protected]+libmount ^[email protected] ^[email protected] ^[email protected] ^[email protected] ^[email protected]+bzip2+curses+git+libunistring+libxml2+tar+xz ^[email protected] ^[email protected] ^[email protected] %[email protected] arch=linux-centos7-x86_64