-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Description
#2213 ### System information (version)
- OpenCV => 4.3.0-dev
- Operating System / Platform => Ubuntu 18.04
- Compiler => g++ 7.5.0
Detailed description
I've compiled OpenCV with Ubuntu 18.04 using the following options:
cmake -D CMAKE_BUILD_TYPE=Release
-D CMAKE_INSTALL_PREFIX=/usr/local
-D INSTALL_C_EXAMPLES=ON
-D BUILD_opencv_java=OFF
-D BUILD_opencv_python2=no
-D BUILD_opencv_python3=no
-D OPENCV_GENERATE_PKGCONFIG=ON
-D OPENCV_EXTRA_MODULES_PATH=~/opencv/opencv_contrib/modules/
-D BUILD_EXAMPLES=ON
-D OPENCV_ENABLE_NONFREE=ON
-D WITH_OPENGL=ON
-D WITH_TBB=ON
-D WITH_V4L=ON
-D WITH_EIGEN=ON
-D EIGEN_INCLUDE_PATH=/usr/local/include/eigen3
-D BUILD_opencv_cnn_3dobj=no
-D ENABLE_PRECOMPILED_HEADERS=OFF
-D WITH_QT=ON ..
CMake finds Eigen and the functions using Eigen (fbs_filter.cpp for example) get compiled.
build/modules/ximgproc/CMakeFiles/opencv_ximgproc.dir/src/fbs_filter.cpp.o is generated
However, when I try to reference those functions it shows they weren't included in the /usr/local/lib/libopencv_ximgproc.so file. Other functions that do not depend on Eigen are in shared object file. This is true whether I reference the apt libeigen3-dev version or the downloaded Eigen source.
If I take the functions using Eigen out of the cv::ximgproc namespace and put them in my own project/namespace they compile and link without any problem. I didn't change any class hierarchies.
I've read through many posts with eigen issues which is why I set precompiled headers off. I don't see this specific issue since everything builds but the functions using Eigen are not in the object file.
Steps to reproduce
Issue submission checklist
- [x ] I report the issue, it's not a question
- [x ] I checked the problem with documentation, FAQ, open issues,
answers.opencv.org, Stack Overflow, etc and have not found solution - [ x] I updated to latest OpenCV version and the issue is still there
- There is reproducer code and related data files: videos, images, onnx, etc