Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Oleg_M_2
Beginner
562 Views

including ipp libraries

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
7 Replies
Gennady_F_Intel
Moderator
562 Views

+ ipps.a

Oleg_M_2
Beginner
562 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?

Gennady_F_Intel
Moderator
562 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?

Sergey_K_Intel
Employee
562 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.

Oleg_M_2
Beginner
562 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.

Oleg_M_2
Beginner
562 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))

Oleg_M_2
Beginner
562 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

Reply