Success! Subscription added.
Success! Subscription removed.
Sorry, you must verify to complete this action. Please click the verification link in your email. You may re-send via your profile.
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
Link Copied
Hi Tomas,
You probably don't need to link with non-pic libraries, unless you build a kernel-mode application like a driver. Regarding unresolved references, please check the order of IPP libs in linker command line: -lippi -lipps -lippvm -lippcore. The other ordering may lead to unresolved symbols.
Regards,
Sergey
Thank you Sergey - that did the trick
I'm still unable to use anything other than nonpic due to 'unresolvable R_386_GOTOFF relocation against symbol `ippJumpIndexForMergedLibs'
Is there a downside to using the nonpic libs?
Could you provide the full R_386 diagnostics message? What object file or library module produces that relocation reference?
That's unpleasant diagnostics, because the relocation looks like compiler-generated.
Regards,
Sergey
/usr/bin/ld: /opt/intel/composer_xe_2013_sp1.0.061/ipp/lib/ia32//libippi.a(jmp_ippiAndC_8u_C1IR_as.o)(.text+0x10): unresolvable R_386_GOTOFF relocation against symbol `ippJumpIndexForMergedLibs'
I'm still a bit curious as to what the downside to nonpic libraries is. Although I'm not building drivers there are some real-time deterministic demands on my system.
Tomas T. wrote:
/usr/bin/ld: /opt/intel/composer_xe_2013_sp1.0.061/ipp/lib/ia32//libippi.a(jmp_ippiAndC_8u_C1IR_as.o)(.text+0x10): unresolvable R_386_GOTOFF relocation against symbol `ippJumpIndexForMergedLibs'
I have asked our QAs regarding this topic. They are trying to reproduce and answer.
As for pic/non-pic libraries, you can use them both - they are tested equally during package preparation. But major area of non-pic libraries usage is kernel-mode execution. Though, I don't know much here.
Regards,
Sergey
Hi Tomas,
I try to reproduce your example:
Distributor ID: Ubuntu
Description: Ubuntu 12.04 LTS
Release: 12.04
Codename: precise
#36-Ubuntu SMP Tue Apr 10 22:19:09 UTC 2012 i686 i686 i386 GNU/Linux
g++ --version
g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
cat ipptwo.cpp
#include <stdio.h>
#include "ipp.h"
int main( void )
{
ippInit();
const IppLibraryVersion* libver; /* library info structure ptr */
/* first print the version of the libraries */
libver = ippsGetLibVersion();
printf( " %s %s \n", libver->Name, libver->Version );
libver = ippiGetLibVersion();
printf( " %s %s \n\n", libver->Name, libver->Version );
return 0;
}
g++ -o ipptwo ipptwo.cpp -I $IPPROOT/include $IPPROOT/lib/ia32/libippi.a $IPPROOT/lib/ia32/libipps.a $IPPROOT/lib/ia32/libippcore.a
./ipptwo
ippSP SSE4.1/4.2 (p8) 8.0.0 (r40040)
ippIP SSE4.1/4.2 (p8) 8.0.0 (r40040)
As you can see it works. So let investigate why you can't link IPP libraries. Please start to build this simple example.
Pavel
Sorry I didn't point that I used IPP PIC libraries which are placed in $IPPROOT/lib/ia32 folder.
Pavel
Let's show more relevant example with Tomas' function:
[cpp]
#include <stdio.h>
#include <ippi.h>
int main()
{
IppiSize roi = {0, 0};
ippiAndC_8u_C1IR(0, NULL, 0, roi);
printf("Test passed\n");
}
[/cpp]
The command line for compiler/linker is:
gcc -O0 -w -I$IPPROOT/include test.cpp $IPPROOT/lib/ia32/libippi.a $IPPROOT/lib/ia32/libippcore.a -Xlinker -Map=output.map
The output.map shows that ippiAndC is really included from various IPP libs (px, w7, etc.). O0 used just to deny compiler optimizations.
./a.out gives "Test passed". AndC function doesn't work, because address is NULL.
Tomas, please do the same.
Regards,
Sergey
There were supposed to be attchments ....
Sorry Tomas, I don't understand what did you do? Which script did you use? Could you explain your steps?
The 'getting started' guide instructs to run appropriate scripts found under /opt/intel/compser.../bin
After installing Intel IPP, set the environment variables by running the script appropriate to your target platform architecture. The scripts are available in <install_dir>/ipp/bin.
<install_dir> is the installation directory, by default, it is:
For super-users: /opt/intel/composer_xe_2013_sp1
-rwxr-xr-x 1 root root 1102 Feb 6 16:10 compilervars.csh*
-rwxr-xr-x 1 root root 1035 Feb 6 16:10 compilervars.sh*
-rwxr-xr-x 1 pluto pluto 31578 Feb 6 16:09 link_install.sh*
The output of those is in the textfiles
Ok, I understand.
In the IPP User Guide you see: "After installing Intel IPP, set the environment variables by running the script appropriate to your target platform architecture. The scripts are available in <install_dir>/ipp/bin."
So you should go to /opt/intel/composer/ipp/bin and run ippenv.sh script to set IPP environment
Pavel
OK - there was a missing /ipp in my folder path - sorry
Still get an error though
pluto@supertriton:/opt/intel/composer_xe_2013_sp1/ipp/bin$ sudo ./ippvars.sh
[sudo] password for pluto:
./ippvars.sh: 39: ./ippvars.sh: [[: not found
You should run:
. ippvars.sh ia32
. ippvars.sh intel64
or
. ippvars.sh ia32_intel64
in depends which architecture you use
Pavel
Community support is provided Monday to Friday. Other contact methods are available here.
Intel does not verify all solutions, including but not limited to any file transfers that may appear in this community. Accordingly, Intel disclaims all express and implied warranties, including without limitation, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement, as well as any warranty arising from course of performance, course of dealing, or usage in trade.
For more complete information about compiler optimizations, see our Optimization Notice.