Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Ipp 8.0 OS X static link problem

Vilhelm_K_
Novice
346 Views

Hi,

I'm trying to build with static link to IPP using g++. I read on this forum I need to provide the full path to lib files /opt/intel/ipp/lib/libippac.a etc. so I'm doing that. However I'm getting linker errors such as this:

Undefined symbols for architecture i386:
  "___libm_sse2_atanf", referenced from:
      _px_ippsArctan_32f_I in libipps.a(psatan_px---ippsArctan_32f_I.o)

What am I doing wrong?

0 Kudos
1 Solution
Vilhelm_K_
Novice
346 Views

I just solved it. I had to link to the following libraries also:

/opt/intel/composerxe/lib/libsvml.a

/opt/intel/composerxe/lib/libirc.a

/opt/intel/composerxe/lib/libimf.a

View solution in original post

0 Kudos
3 Replies
Sergey_K_Intel
Employee
346 Views

Hi Vilhelm,

What if you add "-lm" to the "g++" command line? That is, to add compiler's libm.a library to the linking process?

Regards,
Sergey

0 Kudos
Vilhelm_K_
Novice
346 Views

That doesn't help. From what I understand libm.a is not available as a separate static library on OSX, see here: http://stackoverflow.com/questions/6240639/where-is-the-standard-c-library-on-mac-os-x

The compiler should instead implicitly link to math routines in libSystem.dylib. And maybe that lib does not contain sse2-specific routines like ___libm_sse2_atanf that the linker complains about?

This document seems relevant to my problems: http://software.intel.com/en-us/articles/unresolved-external-symbol-libm-sse2

However this is for an older version of IPP and it suggests that IPP comes with special optimized version of libm.lib. But I cannot find any such files to link to in my IPP OSX install.

Here is my current command line:

g++ -shared -L/opt/intel/ipp/lib   [...my .o files...]   -m32 -lm /opt/intel/ipp/lib/libippcore.a /opt/intel/ipp/lib/libippi.a /opt/intel/ipp/lib/libippac.a /opt/intel/ipp/lib/libippcc.a /opt/intel/ipp/lib/libippch.a /opt/intel/ipp/lib/libippcv.a /opt/intel/ipp/lib/libippdc.a /opt/intel/ipp/lib/libippdi.a /opt/intel/ipp/lib/libippj.a /opt/intel/ipp/lib/libippm.a /opt/intel/ipp/lib/libippr.a /opt/intel/ipp/lib/libipps.a /opt/intel/ipp/lib/libippsc.a /opt/intel/ipp/lib/libippvc.a /opt/intel/ipp/lib/libippvm.a

Any other idea? I really want to get this working.

0 Kudos
Vilhelm_K_
Novice
347 Views

I just solved it. I had to link to the following libraries also:

/opt/intel/composerxe/lib/libsvml.a

/opt/intel/composerxe/lib/libirc.a

/opt/intel/composerxe/lib/libimf.a

0 Kudos
Reply