Ask Your Question
1

Linker error when building 2.4.7 with IPP 8.0

asked 2013-11-27 04:41:05 -0600

Gianluigi gravatar image

updated 2013-11-28 20:26:35 -0600

I'm trying to build new OpenCV 2.4.7 with IPP.
If I use old IPP 7.1update1 or uncheck WITH_IPP, it can be build correctly.
But if I upgradde to IPP 8.0 or 8.0update1, it will appear linker error like below:

../../lib/libopencv_core.so.2.4.7: undefined reference to `_intel_fast_memcpy'
../../lib/libopencv_core.so.2.4.7: undefined reference to `__svml_cos4'
../../lib/libopencv_core.so.2.4.7: undefined reference to `__svml_sin2'
../../lib/libopencv_core.so.2.4.7: undefined reference to `__intel_ssse3_rep_memcpy'
../../lib/libopencv_core.so.2.4.7: undefined reference to `__svml_sincos2'
../../lib/libopencv_core.so.2.4.7: undefined reference to `_intel_fast_memset'
../../lib/libopencv_core.so.2.4.7: undefined reference to `__svml_sin4'
../../lib/libopencv_core.so.2.4.7: undefined reference to `__libm_sse2_sincos'
../../lib/libopencv_core.so.2.4.7: undefined reference to `__intel_ssse3_memcpy'

Please help me to correct it, thanks.

Suplement: After I use my correctly built opencv(2.4.7 with IPP 7.1) to build my code. It will appear linker error again, like below:

/usr/bin/ld: cannot find -llibippcore_l.a
/usr/bin/ld: cannot find -llibipps_l.a
/usr/bin/ld: cannot find -llibippi_l.a
/usr/bin/ld: cannot find -llibippcv_l.a
/usr/bin/ld: cannot find -llibippcc_l.a
/usr/bin/ld: cannot find -llibippvm_l.a
/usr/bin/ld: cannot find -ltbb

and these link is come from opencv.pc.
I don't know my link direcctory should be set to /opt/intel/ipp/lib/intel64 or not but I can comfirm the name -llibippcore_l.a is not correct, it should be -lippcore_l.a normally.
The opencv 2.6.1 don't use these linking and can work correctly.

edit retag flag offensive close merge delete

Comments

Gianluigi, I have the same problem. Do you use IPP as Intel Composer XE component or standalone version?

Alexander Karsakov gravatar imageAlexander Karsakov ( 2013-12-30 08:48:41 -0600 )edit

I am having the same issue. It appears as if it occurs because the intel compiler knows where some internal libraries are, but you are using traditional ld. Finding the right libraries (so far, irc, imf, and svml appear to be needed) and adding them to the compiler options seems to get further in the compilation process. I don't have it all the way working yet though. If I do, I will post my modified cmake file.

Clark gravatar imageClark ( 2014-01-27 16:07:10 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-01-28 09:29:49 -0600

Clark gravatar image

updated 2014-01-28 09:31:21 -0600

Well, I have compilation working (have not actually run a program yet though.) That said, the inclusion of the lib-irc, imf, and svml libraries seemed to work. I also needed to change the CMake file from looking for the static versions to looking for the .so versions. I am pasting the diff between the original and my modified "OpenCVFindIPP.cmake" file below.

Besides the CMake file, the original IPP search seemed to find a different directory than what was actually needed. I'm not sure what exactly IPP is putting in each directory, but for me it installed both a "composer_xe_2013_sp1" and "composer_xe_2013_sp1.0.080" directory. The cmake found the first directory by default, but the required .so files are only in the .0.080 directory. So I changed the "IPP_H_PATH" using the CMAKE gui.

Hope this helps. I should mention that this is with 2.4.8, not 2.4.7. The problem is a change in IPP though, I believe.


35c35
< set(IPP_LIB_SUFFIX  ${CMAKE_STATIC_LIBRARY_SUFFIX})
---
> set(IPP_LIB_SUFFIX  ${CMAKE_SHARED_LIBRARY_SUFFIX})
166a167,169
>   ${IPP_LIB_PREFIX}irc${IPP_SUFFIX}${IPP_LIB_SUFFIX}
>   ${IPP_LIB_PREFIX}imf${IPP_SUFFIX}${IPP_LIB_SUFFIX}
>   ${IPP_LIB_PREFIX}svml${IPP_SUFFIX}${IPP_LIB_SUFFIX}
216c219,225
<       set(IPP_LIBRARY_DIRS ${IPP_ROOT_DIR}/lib/intel64 PARENT_SCOPE)
---
>       if(NOT EXISTS ${IPP_ROOT_DIR}/../compiler/lib/intel64)
>            message(SEND_ERROR "IPP EM64T libraries not found")
>       endif()
>       set(IPP_LIBRARY_DIRS 
>         ${IPP_ROOT_DIR}/lib/intel64 
>         ${IPP_ROOT_DIR}/../compiler/lib/intel64
>         PARENT_SCOPE)
edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-11-27 04:41:05 -0600

Seen: 2,269 times

Last updated: Jan 28 '14