Community
cancel
Showing results for 
Search instead for 
Did you mean: 
thompson_ng
Beginner
65 Views

Linux - Missing ippiConvert_8u16u_C1R on static link ippi_l.a

In IPP 7 Linux version, I am encountering undefined symbol due to IPP tries to find the optimized library at runtime CPU.
Below are the undefined symbol of my program that is statically linked with ippi_a. As you can see, quite a few processor specific calls are undefined. In fact,ippiConvert_8u16u_C1R is mostly undefined.
U g9_dct_8x8_fwd_16s
U g9_ippiConvert_8u16u_C1R
U g9_ippiDCT8x8InvLSClip_16s8u_C1R
U g9_ippiZigzagInv8x8_16s_C1
U hypot
U p8_dct_8x8_fwd_16s
U p8_ippiConvert_8u16u_C1R
U p8_ippiDCT8x8InvLSClip_16s8u_C1R
U p8_ippiZigzagInv8x8_16s_C1
U s8_ippiConvert_8u16u_C1R
U s8_ippiZigzagInv8x8_16s_C1
U v8_dct_8x8_fwd_16s
U v8_ippiDCT8x8InvLSClip_16s8u_C1R
U w7_dct_8x8_fwd_16s
U w7_ippiConvert_8u16u_C1R
U w7_ippiDCT8x8InvLSClip_16s8u_C1R
U w7_ippiZigzagInv8x8_16s_C1
It seems to work if the program is dynamically linked, however, I need to statically link my program.
Is there any work around to include those undefined symbol into my statically link program?
Checking on IPP 6, static linkage does not have these undefined symbol. Thus, it seems like a bug in IPP 7.
0 Kudos
5 Replies
Ying_H_Intel
Employee
65 Views

Dear thompson.ng,

What the exact version of IPP are you using and how the link command line when static linking?

I did a quick check the latest IPP version 7.0. 4 (composerxe-2011.4.191) , it seems they are there

[root@NHM02 ia32]# nm libippi_l.a | grep ippiConvert_8u16u_C1R

piconvert02ca_split_g9_ippiConvert_8u16u_C1R.o:

00000000 T g9_ippiConvert_8u16u_C1R

piconvert02ca_split_p8_ippiConvert_8u16u_C1R.o:

00000000 T p8_ippiConvert_8u16u_C1R

piconvert02ca_split_s8_ippiConvert_8u16u_C1R.o:

00000000 T s8_ippiConvert_8u16u_C1R

piconvert02ca_split_v8_ippiConvert_8u16u_C1R.o:

00000000 T v8_ippiConvert_8u16u_C1R

piconvert02ca_split_w7_ippiConvert_8u16u_C1R.o:

00000000 T w7_ippiConvert_8u16u_C1R

00000005 t LippiConvert_8u16u_C1R

00000000 T ippiConvert_8u16u_C1R

U ippiConvert_8u16u_C1R_arraddr

U g9_ippiConvert_8u16u_C1R

00000000 D ippiConvert_8u16u_C1R_arraddr

U p8_ippiConvert_8u16u_C1R

U v8_ippiConvert_8u16u_C1R

U w7_ippiConvert_8u16u_C1R
[root@NHM02 ia32]# pwd
/opt/intel/composerxe-2011.4.191/ipp/lib/ia32

W.B.R
Ying

thompson_ng
Beginner
65 Views

Hi Ying,
Thanks for replying. My version is Intel 7.0.3.174 withcomposerxe-2011.3.174.
A check on libippi_l.a show something similar to yours.
[root@localhost tsimaging]# nm ipp/x86/lib/libippi_l.a | grep ippiConvert_8u16u_C1R
piconvert02ca_split_g9_ippiConvert_8u16u_C1R.o:
00000000 T g9_ippiConvert_8u16u_C1R
piconvert02ca_split_p8_ippiConvert_8u16u_C1R.o:
00000000 T p8_ippiConvert_8u16u_C1R
piconvert02ca_split_s8_ippiConvert_8u16u_C1R.o:
00000000 T s8_ippiConvert_8u16u_C1R
piconvert02ca_split_v8_ippiConvert_8u16u_C1R.o:
00000000 T v8_ippiConvert_8u16u_C1R
piconvert02ca_split_w7_ippiConvert_8u16u_C1R.o:
00000000 T w7_ippiConvert_8u16u_C1R
00000005 t LippiConvert_8u16u_C1R
00000000 T ippiConvert_8u16u_C1R
U ippiConvert_8u16u_C1R_arraddr
U g9_ippiConvert_8u16u_C1R
00000000 D ippiConvert_8u16u_C1R_arraddr
U p8_ippiConvert_8u16u_C1R
U v8_ippiConvert_8u16u_C1R
U w7_ippiConvert_8u16u_C1R
I believe U means symbol undefined. Althoughs8_ippiConvert_8u16u_C1R is said to be in Text code region, there others are undefined.
They following is my link command
${COMPILER} ${OPTION_TARGET} ${PREPROCESSOR_DEFINITIONS} -O3 -shared -static -static-libgcc -o build/lib${PROJECT_NAME}.so ${COMPILE_INCLUDE} ${COMPILE_SOURCE} ${LINK_LIB_PATH} -Wl,-static ${LINK_LIB}
Where
${COMPILER} = gcc
${OPTION_TARGET} = -m32
${PREPROCESSOR_DEFINITIONS} ==-DNDEBUG -DLINUX32
${COMPILE_INCLUDE} ${COMPILE_SOURCE} ${LINK_LIB_PATH} are the name of include, source and link library path
${LINK_LIB} is all link libraries needed. I am very sure libippi is in.
The same command work for IPP 6.0 with H.264 decoding.
Any suggestion are welcome.
Ying_H_Intel
Employee
65 Views

Hi

Do you havethe detials about the ${LINK_LIB}.

As you know, most functions in IPP depend on basic library ippi / ipps/ippcore. And the linker in linux just resolved the function definition by review the linked library one times. so the link order of library is essential . That is why we always put the -lippi_l -lipps_l -lippcore_l at end of the link line in IPP sample.

for example,you may get undefined symbol about p8_ippiConvert_8u16u_C1R if with

-lippijg -lippi_l -lipps_l -lippj_l -lippcc_l -lippcore_l

and can be resolved by reorder them.

-lippijg -lippj_l -lippcc_l -lippi_l -lipps_l -lippcore_l

Regards,
Ying

thompson_ng
Beginner
65 Views

Thanks for your advice. I will re-order them and try.
My current link sequence is as follows
-lippcc_l -lippi_l -lippj_l -lipps_l -lippvc_l -lippcore_l -lstdc++
Can you advice what is the best order for linking them?
thompson_ng
Beginner
65 Views

This combination of link sequence works for me.
-lippj_l -lippcc_l -lippvc_l -lippi_l -lipps_l -lippcore_l -lstdc++
I hope that Intel will add this informative notes in the IPP link document. I kind of remember in IPP 6, such link requirements are stated in the documentation.
Anyway, I really appreciate Ying helps!! :)
Reply