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

Intel 2020 Update 4, vcpkg, and static MKL solution conflict

mariopsr-inc_com
2,477 Views

Hello, I have 2 different Visual Studio 2019 c++ solutions:
- Solution A is a .dll and compiles the MKL statically;
- Solution B is a .lib and compiles the MKL statically.

After I installed vcpkg (because I needed the MongoDB and AWS libraries for other solutions) and updated the intel compiler to 2020 update 4, Solution A still works, but Solution B stopped working:

...\lib\eigen\Eigen/src/Core/util/MKL_support.h(57): error : cannot open source file "mkl.h"

 

I already ran .\mklvars.bat intel64 and tried to run vcpkg.exe install intel-mkl:x64-windows-static, but it didn't work.

D:\vcpkg> .\vcpkg.exe install intel-mkl:x64-windows-static
Your feedback is important to improve Vcpkg! Please take 3 minutes to complete our survey by running: vcpkg contact --survey
Computing installation plan...
The following packages will be built and installed:
    intel-mkl[core]:x64-windows-static -> 2020.0.0
Detecting compiler hash for triplet x64-windows-static...
Could not locate cached archive: C:\Users\rsampaio\AppData\Local\vcpkg\archives\e0\e00c8b35410404b24a76708bdae0a0036a784ffd.zip
Starting package 1/1: intel-mkl:x64-windows-static
Building package intel-mkl[core]:x64-windows-static...
CMake Warning (dev) at ports/intel-mkl/portfile.cmake:10:
  Syntax Warning in cmake code at column 38

  Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
  scripts/ports.cmake:136 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at ports/intel-mkl/portfile.cmake:15 (message):
  Could not find MKL.  Before continuing, please download and install MKL
  (20200000 or higher) from:

      https://registrationcenter.intel.com/en/products/download/3178/



  Also ensure vcpkg has been rebuilt with the latest version (v0.0.104 or
  later)
Call Stack (most recent call first):
  scripts/ports.cmake:136 (include)


Error: Building package intel-mkl:x64-windows-static failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  Package: intel-mkl:x64-windows-static
  Vcpkg version: 2020.11.12-nohash

Additionally, attach any relevant sections from the log files above.


Does anyone know what it can be?

0 Kudos
4 Replies
mariopsr-inc_com
2,464 Views

If I remove the mkl include, it still gives an error related to ipo x vcpkg:

3>    Tracking command:
3>    C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Tracker.exe /a /d "C:\Program Files (x86)\MSBuild\15.0\FileTracker\FileTracker32.dll" /i D:\Development\maximum-flows\build\windows\Release\maximum-flows.tlog /r "D:\DEVELOPMENT\MAXIMUM-FLOWS\BUILD\WINDOWS\RELEASE\MAIN.OBJ|D:\DEVELOPMENT\MAXIMUM-FLOWS\BUILD\WINDOWS\RELEASE\PARALLEL.OBJ|D:\DEVELOPMENT\MAXIMUM-FLOWS\LIB\PSRNETWORK-LIBRARY\BIN\WINDOWS\STATIC\RELEASE\PSRNETWORK.LIB|D:\DEVELOPMENT\MAXIMUM-FLOWS\LIB\PSRNETWORK-LIBRARY\LIB\PSRCLASSES\VISUALSTUDIO\DATA\BIN\WINDOWS\RELEASE-V2019\PSRDATA.LIB" /b MSBuildConsole_CancelEventdf57ed4278eb44ea9f6a2de9cbe9f1cc  /c "D:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020\windows\bin\Intel64\xilink.exe"  -qm64 /OUT:"D:\Development\maximum-flows\\bin\windows\Release\maximum-flows.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64\\" /LIBPATH:"D:\vcpkg\scripts\buildsystems\msbuild\..\..\..\installed\x64-windows\lib" /LIBPATH:"D:\vcpkg\scripts\buildsystems\msbuild\..\..\..\installed\x64-windows\lib\manual-link" msmpi.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib "D:\vcpkg\scripts\buildsystems\msbuild\..\..\..\installed\x64-windows\lib\*.lib" /MANIFEST /manifest:embed /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"D:\Development\maximum-flows\\bin\windows\Release\maximum-flows.pdb" /SUBSYSTEM:CONSOLE /OPT:REF /OPT:ICF /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"D:\Development\maximum-flows\\bin\windows\Release\maximum-flows.lib" /MACHINE:X64 "D:\Development\maximum-flows\\build\windows\Release\parallel.obj"
3>    "D:\Development\maximum-flows\\build\windows\Release\main.obj"
3>    "D:\Development\maximum-flows\lib\psrnetwork-library\lib\psrclasses\visualstudio\data\bin\windows\Release-v2019\PSRData.lib"
3>    "D:\Development\maximum-flows\lib\psrnetwork-library\bin\windows\static\Release\PSRNetwork.lib"
3>    ipo: : error #11018: Cannot open D:\vcpkg\scripts\buildsystems\msbuild\..\..\..\installed\x64-windows\lib\*.lib
3>    ipo: : warning #11021: unresolved __std_init_once_begin_initialize
3>            Referenced in PSRNetwork.lib(psrnetwork_core.obj)
3>    ipo: : warning #11021: unresolved __std_init_once_complete
3>            Referenced in PSRNetwork.lib(psrnetwork_core.obj)
3>    ipo: : error #11023: Not all components required for linking are present on command line
3>    The command exited with code -1.
3>    Output Property: LinkSkippedExecution=False
3>  Done executing task "XILINK" -- FAILED.
0 Kudos
mariopsr-inc_com
2,454 Views

and finally, when I remove vcpkg from the solution, I still get an error:

3>    C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Tracker.exe /a /d "C:\Program Files (x86)\MSBuild\15.0\FileTracker\FileTracker32.dll" /i D:\Development\maximum-flows\build\windows\Release\maximum-flows.tlog /r "D:\DEVELOPMENT\MAXIMUM-FLOWS\BUILD\WINDOWS\RELEASE\MAIN.OBJ|D:\DEVELOPMENT\MAXIMUM-FLOWS\BUILD\WINDOWS\RELEASE\PARALLEL.OBJ|D:\DEVELOPMENT\MAXIMUM-FLOWS\LIB\PSRNETWORK-LIBRARY\BIN\WINDOWS\STATIC\RELEASE\PSRNETWORK.LIB|D:\DEVELOPMENT\MAXIMUM-FLOWS\LIB\PSRNETWORK-LIBRARY\LIB\PSRCLASSES\VISUALSTUDIO\DATA\BIN\WINDOWS\RELEASE-V2019\PSRDATA.LIB" /b MSBuildConsole_CancelEventfae79a88cf064152a800859dde5f9500  /c "D:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020\windows\bin\Intel64\xilink.exe"  -qm64 /OUT:"D:\Development\maximum-flows\\bin\windows\Release\maximum-flows.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64\\" msmpi.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /manifest:embed /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"D:\Development\maximum-flows\\bin\windows\Release\maximum-flows.pdb" /SUBSYSTEM:CONSOLE /OPT:REF /OPT:ICF /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"D:\Development\maximum-flows\\bin\windows\Release\maximum-flows.lib" /MACHINE:X64 "D:\Development\maximum-flows\\build\windows\Release\parallel.obj"
3>    "D:\Development\maximum-flows\\build\windows\Release\main.obj"
3>    "D:\Development\maximum-flows\lib\psrnetwork-library\lib\psrclasses\visualstudio\data\bin\windows\Release-v2019\PSRData.lib"
3>    "D:\Development\maximum-flows\lib\psrnetwork-library\bin\windows\static\Release\PSRNetwork.lib"
3>    ipo: : warning #11021: unresolved __std_init_once_begin_initialize
3>            Referenced in PSRNetwork.lib(psrnetwork_core.obj)
3>    ipo: : warning #11021: unresolved __std_init_once_complete
3>            Referenced in PSRNetwork.lib(psrnetwork_core.obj)
3>    ipo: : error #11023: Not all components required for linking are present on command line
0 Kudos
RahulV_intel
Moderator
2,388 Views

Hi,


I'm investigating your issue and will get back to you soon with the updates.


Thanks,

Rahul


0 Kudos
Gennady_F_Intel
Moderator
2,359 Views

The last line: "error #11023: Not all components required for linking are present on command line" shows that not you need to add mkl's directory to your systems paths


0 Kudos
Reply