Multiple opencv 3 & IPP build issues
This post started out as a question, but morphed into a notification of multiple problems I had building opencv 3 with IPP "out of the box", and to provide a workaround, which works for me at least.
Here's a summary of my issues:
- Opencv3 does not build out of the box with the supplied IPP libraries. This is an apparent link failure, and happens with several objects.
- Opencv3 does not recognize the IPPROOT environment variable, which I believe is a standard environment variable used when IPP is already installed on a system
- I could find no documentation on how to direct OpenCV to look for the existing IPP on the system, and had to search thru included cmake files to find the right flag.
- OpenCV3 does not work with IPP 9, due to Intel removing the libippm.a library, and OpenCV still looking for it.
- sudo make install doesnt work, as the linker cannot find several of the IPP libraries (libirc, libimf, libsvml)
Solution (at least for me):
- edit cmake/OpenCVFindIPP.cmake, and comment out the line _ipp_add_library(m)
- build with D IPPROOT='pathToMyIPP'
- instead of sudo make install, need to ensure that the root user has sourced the appropriate Intel compilervars script (for me its /opt/intel/bin/compilervars.sh intel64), then do
su make install
Details:
I've been using opencv 2.4.x for awhile now but need to upgrade to 3 to get functionality that doesnt exist in 2.4.x. I downloaded 3.1.0 from the website and tried to build i (only flag I used was -D CMAKE_BUILD_TYPE=RELEASE) . It fails when trying to link with the IPP that comes bundled in the 3rdparty directory of opencv 3. I have a CentOS version of linux, but I'm fairly certain that CentOS does not play in any of these problems.
Problems using OpenCV-provided IPP:
On compile (make stage), there's a ton of errors that look like:
../../lib/libopencv_imgproc.so.3.1.0: undefined reference to ippiCopySubpixIntersect_8u_C1R'
../../lib/libopencv_imgproc.so.3.1.0: undefined reference to
ippiCopy_32f_AC4C3R'
../../lib/libopencv_imgproc.so.3.1.0: undefined reference to ippiDistanceTransform_5x5_8u32f_C1R'
../../lib/libopencv_imgproc.so.3.1.0: undefined reference to
ippiFilterBorder_32f_C1R'
../../lib/libopencv_imgproc.so.3.1.0: undefined reference to ippiFilterBorderInit_32f'
../../lib/libopencv_imgproc.so.3.1.0: undefined reference to
ippiResizeCubic_32f_C3R'
../../lib/libopencv_core.so.3.1.0: undefined reference to `ippiNorm_L2_16u_C1MR'
I see that theres a libippicv.a file included under 3rdparty, and I checked a few of the symbols for existence using nm libippicv.a, and all the symbols I checked exist. I also did a search on the entire opencv3 tree for inclusion of this library in the link line of make files, and it seems to exist. So I'm really confused. Since I have IPP as part of the intel compiler suite I gave up and used the IPP that came from Intel.
Directing CMake to use system IPP
It turns out I have the intel compiler on my system so I ...
"I realize that as a user I have no right to ask the OpenCV developers to do any additional work"
old post
install opencv