Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26758 Discussions

Linker errors with Visual Fortran Compiler 19.0.1.144

Chris_G_2
Beginner
118 Views

Today I installed Visual Fortran Compiler 19.0.1.144. I am geting linker errors with every program I try to compile and link that uses the MKL library. I typically get:

mkl_core.lib(ilaenv.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx512_sgesvd_square_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx2_sgesvd_square_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx_sgesvd_square_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m3_sgesvd_square_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj)

etc.....

I have looked this up and it seems that if I change the to Multithread DLL (/libs:dll /threads) the problem will go away, and indeed it does in as much as the program will now link. However, it causes other problems down the line - I will need new re-distributable libraries which, with a commercial project, will cause problems elsewhere.

So my question is: what has changed that I now need to do this? None of my software that uses the MKL library will link.

I enclose the build log.

0 Kudos
3 Replies
Steve_Lionel
Black Belt Retired Employee
118 Views

Looks like MKL made a change that causes problems with static library builds. It wouldn't be the first time. I suggest asking in https://software.intel.com/en-us/forums/intel-math-kernel-library  Or, better, open a ticket at https://supporttickets.intel.com/?lang=en-US and specify that the product you are having issue with is the Intel Math Kernel Library and NOT the Fortran compiler, or else a response will almost certainly be delayed.

Chris_G_2
Beginner
118 Views

Thanks Steve; I have folllowed your suggestion and opened a ticket.

However, since then I have discovered some software which I have written which uses the MKL library and this works without any problems.

Very puzzling.

avinashs
New Contributor I
118 Views

I am using 19.0.1.144 as well and my observations with regard to LAPACK in MKL are:
1. Debug/Release x86 versions of programs are working with MKL Sequential/Parallel.
2. Debug/Release x64 versions do not work with different compiler errors in each case.
3. Option /iface:cvf has problems with MKL with regard to character arguments. This is previously documented as well and cannot be used in x64.
4. Very interestingly, I have created my own LAPACK library with relevant LAPACK source code in IVF 19.0.1.144 with no errors in any configuration. So I am using my own IVF library to avoid having to deal with MKL errors.
5. There is no change in performance even on large scale systems between MKL and my library.

Reply