-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Description
System information (version)
- OpenCV => 4.x
- Operating System / Platform => ubuntu 22.04
- Compiler => gcc 11.4
Detailed description
On trying to compile 4.x with CUDA, this issue comes up:
opencv_contrib/modules/xphoto/src/oilpainting.cpp:61:34: error: expected ‘)’ before ‘&’ token
61 | ParallelOilPainting(Mat& img, Mat &d, Mat &iLuminance, int r,int k) :
Steps to reproduce
My CMAKE flags were:
-D CUDNN_LIBRARY=usr/lib/x86_64-linux-gnu/libcudnn.so
-D CUDNN_INCLUDE_DIR=/usr/include
-D CMAKE_CXX_STANDARD=17
-D OPENCV_GENERATE_PKGCONFIG=YES
-D CMAKE_CXX_STANDARD_REQUIRED=ON
-D CMAKE_BUILD_TYPE=RELEASE
-D CMAKE_INSTALL_PREFIX="$install_path"
-D OPENCV_EXTRA_MODULES_PATH="$contrib_path/modules"
-D WITH_CUDA=ON
-D WITH_CUDNN=ON
-D WITH_GTK=ON
-D WITH_VTK=OFF
-D OPENCV_DNN_CUDA=ON
-D ENABLE_FAST_MATH=1
-D CUDA_FAST_MATH=1
-D CUDA_ARCH_BIN="$cuda_arch_bin"
-D WITH_CUBLAS=1
-D WITH_LIBV4L=ON
-D WITH_OPENGL=ON
-D WITH_TBB=ON
-D WITH_QT=ON
-D OPENCV_ENABLE_NONFREE=ON
-D INSTALL_PYTHON_EXAMPLES=OFF
-D BUILD_opencv_java=OFF
-D BUILD_opencv_python=OFF
-D INSTALL_C_EXAMPLES=OFF
-D INSTALL_PYTHON_EXAMPLES=OFF
-D BUILD_EXAMPLES=OFF
-D CMAKE_CXX_FLAGS=${SIMD_FLAG}
The seems to break cpp compiles for C++ 17, and 23. Removing "Type " addresses the issue.
Issue submission checklist
- [ X] I report the issue, it's not a question
- [X ] I checked the problem with documentation, FAQ, open issues,
forum.opencv.org, Stack Overflow, etc and have not found any solution - [ X] I updated to the latest OpenCV version and the issue is still there
- [ X] There is reproducer code and related data files: videos, images, onnx, etc
The same issue is true for opencv_contrib/modules/datasets/src/tinyxml2/tinyxml2.h: At global scope:
opencv_contrib/modules/datasets/src/tinyxml2/tinyxml2.h:215:25: error: expected unqualified-id before ‘)’ token
215 | DynArray< T, INIT >() {