relocation error: __intel_cpu_indicator

relocation error: __intel_cpu_indicator

hjmjohnson's picture

Hello,

I am trying to compile my code with the intel 7.0 compilers. I have two very large projects, on in C and one in C++. The project written in C compiles and runs wonderfully. In both cases, I am using the icc compiler to compile and link with following flags:
-DNDEBUG -O3 -rcd -tpp7 -axiMK -c99 -march=pentium4 -mcpu=pentium4

The programs and libraries in the C project compile, link and run just wonderfully. The programs in the C++ project compile and link without error, but I get the following error at run time:
./lereg2.exe: relocation error: ./lereg2.exe: undefined symbol: __intel_cpu_indicator

I have tried to explicitly link agaist the libirc.a file, but this does not seem to help (infact the compiler does not complain that it is missing).

Any help would be greatly appreciated.

Regards,
Hans J. Johnson
hans-johnson@uiowa.edu

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
GaneshRao (Intel)'s picture

Hans
A quick comment - -axiMK may be redundant. -aK would mean that the code is optimized for a pentium 3 and also CPU-dispatched. Please note that CPU dispatch is being invoked because of the the 'a' in your flags.

Having said that, it is not clear to me why you are seeing this error at runtime. Could you please consider opening an issue at http://premier.intel.com ?

Thanks,
Ganesh

John O (Intel)'s picture

Hi Hans,


It's notclear why you areseeing this issue. By default,icc willstatically link in libira.a, so we need to find out what optionsare being passing to icc that changes the default. It might be options passed to icc when creating a library or shared library.


A very useful compiler option is -dryrun, this lists the exact commands are being based to the compiler (mcpcom) and the linker(ld) - what is being passed to ld is what's important for this issue. By default,libirc is linked in statically & will look like this when doing icc -dryrun ...


-Bstatic


-lirc



Running nm on the object file, library & exe to search for the symbol should help find what stage to add -dryrun option:



nm libvec.so | grep intel_cpu
0000591c B __intel_cpu_indicator
00004850 T __intel_cpu_indicator_init


This shows __intel_cpu_indicator is statically linked in, the default behavior. I wasn't able to create a test case that reproduces your issue, so I don't know why you are seeing this issue. Let us know if this works, thanks,
John

Login to leave a comment.