Skip to content

CUDA: build failure on 3.4 branch #19600

@tomoaki0705

Description

@tomoaki0705

relates #19536

nullptr is a C++11 keyword

System information (version)
  • OpenCV => recent 3.4 ( 513f5a8 )
  • Operating System / Platform => Jetson TX1, TX2 (Aarch64)
  • Compiler => GCC 5.4, CUDA 8.0
Detailed description
/opencv/modules/dnn/src/layers/proposal_layer.cpp:290:9: warning: identifier ‘nullptr’ is a keyword in C++11 [-Wc++0x-compat]
         Mat fakeImageBlob(shape(1, 1, imInfo.at<float>(0), imInfo.at<float>(1)), CV_8UC1, nullptr);
         ^
/opencv/modules/dnn/src/layers/proposal_layer.cpp: In member function ‘virtual void cv::dnn::ProposalLayerImpl::forward(cv::InputArrayOfArrays, cv::OutputArrayOfArrays, cv::OutputArrayOfArrays)’:
/opencv/modules/dnn/src/layers/proposal_layer.cpp:290:91: error: ‘nullptr’ was not declared in this scope
         Mat fakeImageBlob(shape(1, 1, imInfo.at<float>(0), imInfo.at<float>(1)), CV_8UC1, nullptr);
                                                                                           ^
modules/dnn/CMakeFiles/opencv_dnn.dir/build.make:650: recipe for target 'modules/dnn/CMakeFiles/opencv_dnn.dir/src/layers/proposal_layer.cpp.o' failed
make[2]: *** [modules/dnn/CMakeFiles/opencv_dnn.dir/src/layers/proposal_layer.cpp.o] Error 1
CMakeFiles/Makefile2:4722: recipe for target 'modules/dnn/CMakeFiles/opencv_dnn.dir/all' failed
make[1]: *** [modules/dnn/CMakeFiles/opencv_dnn.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Steps to reproduce
  • Following command on Jetson TX1 or TX2 (CUDA 8.0)
mkdir build
cd build
cmake -DOPENCV_EXTRA_MODULES_PATH=/opencv_contrib/modules -DBUILD_EXAMPLES=true -DOPENCV_ENABLE_NONFREE=true -DWITH_CUDA=ON ..
make -j 2 -k all
Issue submission checklist
  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues,
    forum.opencv.org, Stack Overflow, etc and have not found solution
  • I updated to latest OpenCV version and the issue is still there
  • There is reproducer code and related data files: videos, images, onnx, etc

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions