Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29280 Discussions

Build using cmake failed “is not able to compile a simple test program.”

csH2
Beginner
11,711 Views

I tried to build  my project using CMake but it failed with error “is not able to compile a simple test program.” Anyone can help?

The detailed information is as follows:

 

-- Detecting Fortran compiler ABI info  
-- Detecting Fortran compiler ABI info - failed  
-- Check for working Fortran compiler: D:/Program Files/IVF/compilers_and_libraries_2018.3.210/windows/bin/intel64/ifort.exe  
-- Check for working Fortran compiler: D:/Program Files/IVF/compilers_and_libraries_2018.3.210/windows/bin/intel64/ifort.exe- broken   CMake Error at D:/Program Files/CMake/share/cmake-3.18/Modules/CMakeTestFortranCompiler.cmake:51 (message):   The Fortran compiler

    "D:/Program Files/IVF/compilers_and_libraries_2018.3.210/windows/bin/intel64/ifort.exe"

  is not able to compile a simple test program.  It fails with the following output:

   Change Dir: C:/Users/xxx/build/CMakeFiles/CMakeTmp

   Run Build Command(s):D:/PROGRA~2/MINGW-~1/X86_64~1.0-P/mingw64/bin/mingw32-make.exe cmTC_809ef/fast && mingw32-make.exe[1]: Entering directory  'C:/Users/xxx/build/CMakeFiles/CMakeTmp' 
   D:/PROGRA~2/MINGW-~1/X86_64~1.0-P/mingw64/bin/mingw32-make.exe  -f CMakeFiles\cmTC_809ef.dir\build.make CMakeFiles/cmTC_809ef.dir/build   
   mingw32-make.exe[2]: Entering directory 'C:/Users/xxx/build/CMakeFiles/CMakeTmp'    
   Building Fortran object CMakeFiles/cmTC_809ef.dir/testFortranCompiler.f.obj  
   D:\PROGRA~2\IVF\COMPIL~1.210\windows\bin\intel64\ifort.exe  /nologo /fpp   /W1 /nologo /fpp /libs:dll /threads  /Od /debug:full /dbglibs /FoCMakeFiles\cmTC_809ef.dir\testFortranCompiler.f.obj  /FdCMakeFiles\cmTC_809ef.dir/ -c C:\Users  xxx\build\CMakeFiles\CMakeTmp\testFortranCompiler.f 
   warning #31001: The dll for reading and writing the pdb (for example,  mspdb110.dll) could  not be found on your path. This is usually a configuration error. Compilation will continue using /Z7 instead of /Zi, but expect a similar err r when you link your program. 
   Linking Fortran executable cmTC_809ef.exe    
   "D:\Program  Files\CMake\bin\cmake.exe" -E cmake_link_script CMakeFiles\cmTC_809ef.dir\link.txt --verbose=1    
   "D:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_809ef.dir --rc=rc --mt="" --manifests -- xilink /nologo @CMakeFiles\cmTC_809ef.dir\objects1.rsp /out:cmTC_809ef.exe /implib:cmTC_809ef.lib /pdb:C:\Users\xxx\build\CMakeFiles\CMakeTmp\cmTC_809ef.pdb /version:0.0 /machine:x64  /debug /INCREMENTAL:YES /subsystem:console user32.lib    
   RC Pass 1: command "rc /fo CMakeFiles\cmTC_809ef.dir/manifest.res CMakeFiles\cmTC_809ef.dir/manifest.rc" failed (exit code 0) with the following output:   
   The system cannot find the file specified.mingw32-make.exe[2]: *** [CMakeFiles\cmTC_809ef.dir\build.make:107: cmTC_809ef.exe] Error -1   mingw32- 
   make.exe[2]: Leaving directory 'C:/Users/xxx/build/CMakeFiles/CMakeTmp'          

 

 

0 Kudos
1 Solution
Steve_Lionel
Honored Contributor III
11,682 Views

The better solution is to start your command line session using the shortcut provided or call ipsxe-comp-vars.bat from your script to establish the proper environment.

View solution in original post

0 Kudos
3 Replies
csH2
Beginner
11,698 Views

The problem has been solved by adding the right path for rc.exe to the PATH variable.

0 Kudos
Steve_Lionel
Honored Contributor III
11,683 Views

The better solution is to start your command line session using the shortcut provided or call ipsxe-comp-vars.bat from your script to establish the proper environment.

0 Kudos
JohnNichols
Valued Contributor III
11,669 Views

Or use Visual Studio -- that works a treat and is even colour coded. 

0 Kudos
Reply