Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

wrong ELF class

joleho
Beginner
564 Views
Hello,

I installed the Intel Math Kernel Library 9.0 for Linux on my "AMD Turion 64" and then compiled the f95 wrappers for LAPACK in mkl/9.0/interfaces/lapack95 with "make PLAT=lnx32e lib".

I can compile and link my files fine with:

$(MKL_LIB_LAPACK95)/libmkl_lapack95.a -L$(MKL_LIB_ROOT)/ -lmkl_lapack -lmkl_em64t -lguide -lpthread

and the .bashrc file includes:

export MKL_LIB_ROOT=/opt/intel/mkl/9.0/lib/em64t
export MKL_LIB_LAPACK95=/opt/intel/mkl/9.0/interfaces/lapack95

but when I execute, it says:

: error while loading shared libraries: libguide.so: wrong ELF class: ELFCLASS32

What is wrong? Thanks for help!

Joe
0 Kudos
5 Replies
TimP
Honored Contributor III
564 Views
I believe you must make sure when you execute that LD_LIBRARY_PATH is set to point to the same library directory where libguide.so was found when you linked. I am hedging bets a little because you didn't say which compiler you used, but it looks as if you linked against the libguide in your MKL installation.
If you use an Intel compiler which is no older than your MKL version, it is preferable to make sure that the libguide in use at both link and run time is the one supplied with the compiler. The Intel compiler option -openmp would take care of both -lguide and -lpthread.
If you want to avoid the requirement for LD_LIBRARY_PATH at run time, you could use the option to make all Intel compiler libraries static (-i-static for 9.1 compilers).
0 Kudos
Intel_C_Intel
Employee
564 Views

Joe,

I haven't tried doing what you did, but I think the clues are in your posting. You have PLAT=lnx32e. I think you have a mixture of 32-bit and 64-bit code which is not compatible.

Bruce

0 Kudos
Intel_C_Intel
Employee
564 Views

Joe,

I have gone back to look at this again. You need to set PLAT=lnx64. There should then be compatibilites with the objects for the 64-bit OS.

Bruce

0 Kudos
joleho
Beginner
564 Views
Thank you very much!

I just forgot to set the LD_LIBRARY_PATH ! That's it!

(It's not PLAT=lnx64)

Ciao, Joe
0 Kudos
Intel_C_Intel
Employee
564 Views

How did you get it to link without the libpath set?

Bruce

0 Kudos
Reply