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

Linker issues migrating from v6 to v8

Tomas_T_
Beginner
2,030 Views

I'm currently trying to test Ipp 8.0 on a Linux platform (Ubuntu 12.04) where I've been using version 6.0.1

I'm trying to link statically but I always get: 'unresolvable R_386_GOTOFF relocation against symbol `ippJumpIndexForMergedLibs' which prompted me to try the nonpic libraries. 

This worked well enough for one simple application but another, more complex ones fails linking with a host of errors similar to this (full list attached):

/opt/intel/composer_xe_2013_sp1.0.061/ipp/lib/ia32/nonpic/libippi.a(piresset_p8---ownResize16plLz3.o): In function `p8_ownResize16plLz3':
piresset_p8---ownResize16plLz3.i:(.text+0xd1): undefined reference to `p8_ippsCopy_32f'
piresset_p8---ownResize16plLz3.i:(.text+0xdf): undefined reference to `p8_ippsCopy_32f'
piresset_p8---ownResize16plLz3.i:(.text+0x17b): undefined reference to `p8_ippsCopy_32f'
piresset_p8---ownResize16plLz3.i:(.text+0x25b): undefined reference to `p8_ippsCopy_32f'
piresset_p8---ownResize16plLz3.i:(.text+0x266): undefined reference to `p8_ippsCopy_32f'
/opt/intel/composer_xe_2013_sp1.0.061/ipp/lib/ia32/nonpic/libippi.a(piresset_p8---ownResize16plLz3.o):piresset_p8---ownResize16plLz3.i:(.text+0x2c4): more undefined references to `p8_ippsCopy_32f' follow

Help on identifying the issues would be much appreciated 

linker command g++ -o build-host-debug/bin/xrp -L/opt/intel/composer_xe_2013_sp1.0.061/ipp/lib/ia32/nonpic -Xlinker --copy-dt-needed-entries -L./build-host-debug/lib -Wl,-rpath  .... long list of .o files and libs

 

0 Kudos
29 Replies
Tomas_T_
Beginner
509 Views

Changed line 39 using two sets of single brackets instead of the double so now it runs. Still get the same error when linking.

Can you suggest further tests?

 

0 Kudos
Pavel_B_Intel1
Employee
509 Views

Please check how do you place IPP libraries in link string. You should keep dependances in IPP libraries, for example if you use functions from Image Processing (ippIP) library you should point:

$IPPROOT/lib/ia32/libippi.a $IPPROOT/lib/ia32/libipps.a $IPPROOT/lib/ia32/libippcore.a 

because ippIP depends on ippSP and ippSP depends on ippCore. The full list of dependances you can see in IPP User Guide.

Pavel

0 Kudos
Tomas_T_
Beginner
509 Views

Thanks, still the same though.

I think I'll just evaluate using nonpic libraries 

 

0 Kudos
Pavel_B_Intel1
Employee
509 Views

Please check if you point IPP libraries in correct order. Could you provide link string (how do you point IPP libraries)

0 Kudos
Tomas_T_
Beginner
509 Views

Ok - found a really stupid error on my part. I was linking to components linked to the old version of IPP.

Removed that but that brought me a different set of errors 

g++ -o build-host-debug/bin/SimpleXscanReader -pthread -L/opt/intel/composer_xe_2013_sp1.0.061/ipp/lib/ia32/ -L/home/pluto/Downloads/xtk_simple/lib/ -L/opt/EDTpdv/ -Xlinker --copy-dt-needed-entries -L./build-host-debug/lib -Wl,-rpath ./ build-host-debug/obj/SimpleXscanReader.o build-host-debug/obj/SimpleXscanReader_impl.o build-host-debug/obj/SimpleXscanReader_version.o -lmversion -lappbase -lstorageconfig -lstoragestate -lplutoexcept -ltiff -lpng -lstringpin -lintegerpin -ldoublepin -ldigitaliopin -lsyncpin -lxtk_lib -lintf_edt -ldl -lboost_thread -lboost_filesystem -lpinwrappers -lopencv_core -lopencv_imgproc -lopencv_highgui -lsharedmalloc -lippcv -lippi -lipps -lippvm -lippcore -lrt
/opt/intel/composer_xe_2013_sp1.0.061/ipp/lib/ia32//libipps.a(psdivh9l9cn_h9---ownippsDiv_32f.o): In function `h9_ownippsDiv_32f':
psdivh9l9cn_h9---ownippsDiv_32f.i:(.text+0x3ca): undefined reference to `__intel_ssse3_rep_memcpy'
/opt/intel/composer_xe_2013_sp1.0.061/ipp/lib/ia32//libipps.a(pscopyca_px---ownsCopy_8u.o): In function `px_ownsCopy_8u':
pscopyca_px---ownsCopy_8u.i:(.text+0x28): undefined reference to `_intel_fast_memcpy'
/opt/intel/composer_xe_2013_sp1.0.061/ipp/lib/ia32//libipps.a(psdivg9e9cn_g9---ownippsDiv_32f.o): In function `g9_ownippsDiv_32f':
psdivg9e9cn_g9---ownippsDiv_32f.i:(.text+0x452): undefined reference to `__intel_ssse3_rep_memcpy'
collect2: ld returned 1 exit status

Also it seems like the environment vars set by the ippvars.sh script do not stay in my system

 

 

0 Kudos
Sergey_K_Intel
Employee
509 Views

These functions are from Intel compiler's libs, probably from libirc. Try to add "-lirc" to the end of g++ command line. "icc" does this automatically, while "g++" requires explicit library reference.

Regards,
Sergey

0 Kudos
Tomas_T_
Beginner
509 Views

Thanks - that did the trick.

Am I meant to run the ippvars script each time I want to work on my IPP projects?

0 Kudos
Pavel_B_Intel1
Employee
509 Views

ippvars.sh script setup  IPPROOT and LD_LIBRARY_PATH environment to simplify work with IPP libraries. You can setup this variables in your profile file and no necessary to run ippvars.sh each time in this case.

0 Kudos
Yi__Chungfai
Beginner
509 Views

I noticed that Tomas T used "lappbase" on the #26. In my project, the compiler such an error: /usr/bin/ld: cannot find -lappbase. I do not know which library "lappbase" comes from, so I do not know how to solve it. I hope someone can explain it. My system is RHEL5.5. Thank you very much! My e-mail is yi445250544@gamil.com 

0 Kudos
Reply