Undefined references

Undefined references

I am having problem linking ansyscust.e145. The main problem is undefined refreences, such as:

user03.o: In function `user03_':
user03.F:(.text+0x3): undefined reference to `__intel_cpu_feature_indicator'
user03.F:(.text+0x22): undefined reference to `__intel_cpu_feature_indicator'
user03.F:(.text+0x39): undefined reference to `__intel_cpu_features_init'

 Compilers to use:
 F90: /opt/intel/composer_xe_2013_sp1.0.080/bin/intel64/ifort
 C:   /opt/intel/composer_xe_2013_sp1.0.080/bin/intel64/icc
 C++: /opt/intel/composer_xe_2013_sp1.0.080/bin/intel64/icpc

Linux Red Hat 6.4

Another problem I am having is that the command -lGLU is not found by ld. Is it lGLU obsolate for the compilers?

Thanks a lot in advance!

8 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Regarding the -lGLU issue, make sure you have the library libGLU.so in your system library paths (or specify a path with -L/path/to/library).  You may be missing (and need to install) a package that supplies that library.

Note that "-lGLU" isn't a linker command on its own, just the "-l" part is.  That option tells the linker to prepend "lib" and postpend ".so" to whatever follows "-l" and then look for that file in known library directories and any additional directories specified by the "-L" option. 

You may require an older version of ifort in order to avoid those undefined references, assuming you can't rebuild the ANSYS objects (specifically the Fortran main program).

Thanks Casey, now --lGLU is not a problem. My libGLU.so was a kind of corrupted, I removed it and ln.

Thanks Timp, then I will contact ANSYS support.

the undefined objects listed above are in libirc ( /opt/intel/composer_xe_2013_sp1.0.080/composer/lib/intel64/libirc*). In case you use the Intel compiler for the link step, this will be taken care of automatically - no need to do add this library. This will work fine too  in case you have some object code generated by older Intel compilers. Don't try to link without the Intel compiler - it is rather complex to set up the 'ld' call explicitly. You can use a triival Fortran code foo.f and run 'ifort -dryrun foo.f' to see how 'ifort' calls the linker 'ld' 

For ANSYS 14.5, the needed version for compilers is Intel 11.1.069 From this page:  http://software.intel.com/en-us/articles/intel-compiler-and-composer-update-version-numbers-to-compiler-version-number-mapping I looked up the version and 11.1.069 is:  11.1 Update 5. The version I have installed is composer_xe_2013_sp1.0.080. I wonder if there is a way to change the compiler version. I tryed to find the version 11.1.069 in the Intel website, but I could not.

I will appreciate any piece of advice. Thanks a lot!!!

Yes - no problem to change the compiler version: you can install multiple compilers and by 'sourcing' the corresponding compilervars.sh file, you can select what you need.

On registrationcenter.intel.com we only offer 11.1 Update 9, not Update  5. In case you really need U5, open a case at premier.intel.com or send me a private message and I will help

11.1 update 9 should be fully compatible for use with ANSYS which matches an earlier update of 11.1.

Leave a Comment

Please sign in to add a comment. Not a member? Join today