3

I'm trying to compile opencv 2.4.5 on Ubuntu (12.10) with TBB and IPP 7.1. I'm using cmake to configure the makefiles, with this command:

cmake -D WITH_TBB=ON -D WITH_IPP=ON ../opencv-2.4.5

Having previosly set the IPPROOT variable:

setenv IPPROOT=/opt/intel/ipp/

(The documentation states USE_IPP instead WITH_IPP, but this is incorrect as CMake prints out that it disregards the switch.) The cmake utility seems to recognize the IPP libraries and prints out:

...
-- found IPP: 7.1.1 [7.1.1]
-- at: /opt/intel/composerxe/ipp
-- IPP libs: libippvm_l.a;libippcc_l.a;libippcv_l.a;libippi_l.a;libipps_l.a;libippcore_l.a
...
--   Other third-party libraries:
--     Use IPP:                     7.1.1 [7.1.1]
--          at:                     /opt/intel/composerxe/ipp

Cmake succeeds, and so does the build (make). The problem is that the output files are not linked to IPP in any way, and are actually the same as if built without IPP, using

cmake -D WITH_TBB=ON ../opencv-2.4.5

(IPP is off by default).

Has anyone been able to successfully build OpenCV so that it actually utilizes IPP?

SashaM
  • 311
  • 1
  • 7

1 Answers1

0

I am faced the same problem: configuring opencv with enabled IPP option, it finds libraries, compiles without an errors, but nothing happens — it doesn't linked against it.
Here is a ldd result:

# ldd /usr/local/opencv-246-ipp/lib/libopencv_core.so
linux-vdso.so.1 =>  (0x00007fff563ab000)
libz.so.1       => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f70dee83000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f70dec66000)
librt.so.1      => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f70dea5d000)
libstdc++.so.6  => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f70de75a000)
libm.so.6       => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f70de455000)
libgcc_s.so.1   => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f70de23e000)
libc.so.6       => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f70dde76000)
/lib64/ld-linux-x86-64.so.2 (0x00007f70dfc55000) 

I've thought, it because of staticly linking, but it doesn't affect to result, i've got the same execution time (with and without IPP option).

But!

I've built the latest(github) version of OpenCV against the fresh (8.0) version of IPP and it works.

Linking:

otool -L /usr/local/opencv/lib/libopencv_core.3.0.0.dylib
/usr/local/opencv/lib/libopencv_core.3.0.0.dylib:
lib/libopencv_core.3.0.dylib (compatibility version 3.0.0, current version 3.0.0)
./libippvm-8.0.dylib (compatibility version 8.0.0, current version 8.0.0)
./libippcc-8.0.dylib (compatibility version 8.0.0, current version 8.0.0)
./libippcv-8.0.dylib (compatibility version 8.0.0, current version 8.0.0)
./libippi-8.0.dylib (compatibility version 8.0.0, current version 8.0.0)
./libipps-8.0.dylib (compatibility version 8.0.0, current version 8.0.0)
./libippcore-8.0.dylib (compatibility version 8.0.0, current version 8.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 60.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)

But it still doesn't affect to result (in my case), execution time for resize operation doesn't change.

Hope it'll help someone.

tacobot
  • 915
  • 2
  • 9
  • 15