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

Linux link error: undefined reference to ippMalloc/ippFree

piet_de_weer
Beginner
1,345 Views
I've just converted an application from Windows (MSVC, Intel compiler, IPP) to Linux (gcc - for now at least, IPP).

When I try to build it, I get 2 errors:

[bash]/opt/intel/ipp/6.1.2.051/ia32/lib//libippsmerged.a(psalloc_split_w7_ippsMalloc_8u.o): In function `w7_ippsMalloc_8u':
psalloc_split_w7_ippsMalloc_8u.i:(.text+0x17): undefined reference to `ippMalloc'
/opt/intel/ipp/6.1.2.051/ia32/lib//libippsmerged.a(psalloc_split_w7_ippsFree.o): In function `w7_ippsFree':
psalloc_split_w7_ippsFree.i:(.text+0x12): undefined reference to `ippFree'
collect2: ld returned 1 exit status
[/bash]
The other IPP functions that I'm using don't seem to cause any issues. I'm building using the following line:

g++ -v -O3 -ffast-math -fomit-frame-pointer -fstrict-aliasing -fno-math-errno -freciprocal-math -fno-signed-zeros -fno-trapping-math -fassociative-math -DSSE2 -I/opt/intel/ipp/6.1.2.051/ia32/include/ -L"/opt/intel/ipp/6.1.2.051/ia32/lib/" -march=pentium4 -lippcore -lippscmerged -lippsrmerged -lippsmerged -lm

In Windows, building with the following (very similar) line succeeds and generates working code:

g++ -v -O3 -ffast-math -fomit-frame-pointer -fstrict-aliasing -fno-math-errno -freciprocal-math -fno-signed-zeros -fno-trapping-math -fassociative-math -DSSE2 -I"C:\\Program Files 2\\Intel\\IPP\\5.1\\ia32\\include" -L"C:\\Program Files 2\\Intel\\IPP\\5.1\\ia32\\lib" -march=pentium4 -lippcorel -lippscmerged -lippsrmerged -lippsmerged -lm -lwinmm

What am I missing?


Note: This is a build which ONLY includes the Pentium 4 code - I haven't tested what happens if I don't specifically include the file ipp_w7.h because I need to make changes at different locations in the code.

0 Kudos
3 Replies
Naveen_G_Intel
Employee
1,345 Views

Hi,

There is good discussion and provided solution for similar issues in the forum, please refer to Linux Port - Linker problems

Also, On-line documentation: how to build ipp in linux environment

http://software.intel.com/en-us/articles/how-to-build-ipp-application-in-linux-environment/

Regards,

Naveen Gv

0 Kudos
piet_de_weer
Beginner
1,345 Views
Thanks! Moving -lippcore to the end of the line did the trick. And the program is even running immediately without any errors (which is quite surprising for a program that consists of over 2 MB of code).
0 Kudos
Naveen_G_Intel
Employee
1,345 Views
Great to know it works fine,

Regards
Naveen Gv
0 Kudos
Reply