Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.

including ipp libraries

Oleg_M_2
Beginner
5,768 Views

Hello!

I'm trying to use Intel IPP for signal processing. I began the work with the Add functions (ippsAdd_64f_A53 and ippsAdd_64f). I included ippvm.h, ippcore.h and ipps.h and wrote the CMakeLists.txt file as follows:

cmake_minimum_required(VERSION 3.7)
project(Test)
find_library(IPP_CORE libippcore.a PATHS /opt/intel/ipp/lib/intel64)
find_library(IPP_VM libippvm.a PATHS /opt/intel/ipp/lib/intel64)
find_library(IPP_S libipps.a PATHS /opt/intel/ipp/lib/intel64)
add_executable(Test main.cpp)
target_include_directories(Test PRIVATE /opt/intel/ipp/include)
target_link_libraries(Test ${IPP_CORE} ${IPP_VM} ${IPP_S})

The first of the function (_A53) works well, but while using the second one I get the following error:

/opt/intel/ipp/lib/intel64/libipps.a(jmp_ippsAdd_64f.o): In function 'in_ippsAdd_64f':
jmp_ippsAdd_64f.c:(.text+0x1): undefined reference to 'ippSafeInit'
/opt/intel/ipp/lib/intel64/libipps.a(jmp_ippsAdd_64f.o): In function 'ippsAdd_64f':
jmp_ippsAdd_64f.c:(.text+0x2a): undefined reference to 'ippJumpIndexForMergedLibs'

Tell me please, what is wrong? As I understand, I need to link some more libraries, but which of them?

Thanks in advance.

0 Kudos
8 Replies
Gennady_F_Intel
Moderator
5,768 Views

+ ipps.a

0 Kudos
Oleg_M_2
Beginner
5,768 Views

Sorry, but as I understand you recomend including libipps.a. But I've already included it with:

find_library(IPP_S libipps.a PATHS /opt/intel/ipp/lib/intel64)
...
target_link_libraries(Test ${IPP_CORE} ${IPP_VM} ${IPP_S})

Could you, please explain my mistake?

0 Kudos
Gennady_F_Intel
Moderator
5,768 Views

sorry, I missed that you added ipps.a lib, then at the first galnce everything looks correct.  Could you try to link this case explicitly w/o Cmake?

0 Kudos
Sergey_K_Intel
Employee
5,768 Views

Hello,

Try to change the order of the libraries in "target_link_libraries" statement. First IPPS, then IPPVM and CORE at the end.
It's important for Linux linker.

0 Kudos
Oleg_M_2
Beginner
5,768 Views

Sergey Khlystov (Intel) wrote:

Hello,

Try to change the order of the libraries in "target_link_libraries" statement. First IPPS, then IPPVM and CORE at the end.
It's important for Linux linker.

Thank you for the reply. I've tried - unfortunately it doesn't help.

0 Kudos
Oleg_M_2
Beginner
5,768 Views

Gennady F. (Intel) wrote:

sorry, I missed that you added ipps.a lib, then at the first galnce everything looks correct.  Could you try to link this case explicitly w/o Cmake?

Yes, it works with both dynamic and static linking through using g++ command.

Now what could it be with cmake? I would be grateful for your help. Because g++ command is ok for test application, but not for the whole project))

0 Kudos
Oleg_M_2
Beginner
5,768 Views

The answer appeared to be quite simple: cmake somehow links a static version of ipps and dynamic versions of other libs. As I understand, IPP needs to be whole static or whole dynamic. To do so I added

set(IPP_STATIC "ON")

to CMakeLists.txt

0 Kudos
WoC
Beginner
5,099 Views

I see those names in several of the of the other ipp libs ... try adding more until the references are resolved.  e.g., try adding

find_library(IPP_I libippi.a PATHS /opt/intel/ipp/lib/intel64)
...
target_link_libraries(Test ${IPP_CORE} ${IPP_VM} ${IPP_S} ${IPP_I})

Also, I don't know if order matters (it matters to the linker), but it seems that the most

general library should be at the end :

target_link_libraries(Test  ${IPP_S} ${IPP_I}${IPP_VM}  ${IPP_CORE})

 

0 Kudos
Reply