The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=15546 
====================================================================== 
Reported By:                Steven Petsche
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15546
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2015-04-29 19:36 EDT
Last Modified:              2015-04-29 19:36 EDT
====================================================================== 
Summary:                    Enabling Fortran with the Intel Fortran compiler
fails, worked with 3.0.2
Description: 
CMake 3.0.2 was successfully used for a project. CMake 3.2.2 was installed to
upgrade. Running CMake generator would fail in the startup because the Intel
Fortran compiler would fail the ``try_compile'' hello world test after calling
to enable Fortran. Output is below. The error message complained that there was
*.dir/ -c/* in the path of the output pdb file. Since the wrong path seemed to
be used, I investigated the rule used for this test compilation. It turns out
that CMake/share/cmake-3.2/Modules/Platform/Windows-Intel.cmake uses
Windows-MSVC.cmake to set up the CMAKE_Fortran_COMPILE_OBJECT variable for Intel
Fortran on Windows. Line 261 of Windows-MSVC.cmake changed from 3.0.2 to 3.2.2.
The compiler option ``/Fd<OBJECT_DIR>'' was replaced with
``/Fd<TARGET_COMPILE_PBD>''. Reverting this single line back to 3.0.2 or
changing it to ``/Fd<TARGET_COMPILE_PDB>/'' solves the issue. The extra slash is
needed by the Fortran compiler to know that it is a pdb directory and not a pdb
filename being passed in. There seems to be confusion about whether a pdb
filename or directory should be part of the compile rule. This may be an issue
that TARGET_COMPILE_PDB can hold just a directory without the necessary trailing
/. While it could be an easy fix, marked as major because you cannot enable
Fortran with Intel Fortran on Windows without a difficult to find work around.
CMake stops dead in its tracks. Interesting that the Windows Intel Fortran
environment is set up just like the Microsoft environment (when Microsoft does
not have Fortran).

Steps to Reproduce: 
Try to enable Fortran when running CMake 3.2.2 from an Intel Fortran 2015 shell.
Output is below.

Additional Information: 
-- The Fortran compiler identification is Intel
-- Check for working Fortran compiler: C:/Program Files (x86)/Intel/Composer XE
2015/bin/intel64/ifort.exe
-- Check for working Fortran compiler: C:/Program Files (x86)/Intel/Composer XE
2015/bin/intel64/ifort.exe  -- broken
CMake Error at C:/Program Files
(x86)/CMake/share/cmake-3.2/Modules/CMakeTestFortranCompiler.cmake:54 (message):
  The Fortran compiler "C:/Program Files (x86)/Intel/Composer XE
  2015/bin/intel64/ifort.exe" is not able to compile a simple test program.

  It fails with the following output:

   Change Dir: C:/xxx/build/Release/build_fortran/CMakeFiles/CMakeTmp



  Run Build Command:"C:/MinGW/bin/mingw32-make.exe"
  "cmTryCompileExec143570813/fast"

  C:/MinGW/bin/mingw32-make.exe -f
  CMakeFiles\cmTryCompileExec143570813.dir\build.make
  CMakeFiles/cmTryCompileExec143570813.dir/build

  mingw32-make.exe[1]: Entering directory
  'C:/xxx/build/Release/build_fortran/CMakeFiles/CMakeTmp'

  "C:\Program Files (x86)\CMake\bin\cmake.exe" -E cmake_progress_report
  C:\xxx\build\Release\build_fortran\CMakeFiles\CMakeTmp\CMakeFiles 1

  Building Fortran object
  CMakeFiles/cmTryCompileExec143570813.dir/testFortranCompiler.f.obj

  C:\PROGRA~2\Intel\COMPOS~1\bin\intel64\ifort.exe /nologo /fpp /W1 /nologo
  /fpp /libs:dll /threads /debug:full /dbglibs
  /FoCMakeFiles\cmTryCompileExec143570813.dir\testFortranCompiler.f.obj
  /FdCMakeFiles\cmTryCompileExec143570813.dir\ -c
  C:\xxx\build\Release\build_fortran\CMakeFiles\CMakeTmp\testFortranCompiler.f


  error http://public.kitware.com/Bug/view.php?id=31000: corrupt PDB file
CMakeFiles\cmTryCompileExec143570813.dir
  -c\vc120.pdb; delete and rebuild; if problem persists, delete and try /Z7
  instead

  error code 3 ( can't write file, out of disk, etc.) opening pdb
  CMakeFiles\cmTryCompileExec143570813.dir -c\vc120.pdb

  compilation aborted for
  C:\xxx\build\Release\build_fortran\CMakeFiles\CMakeTmp\testFortranCompiler.f
  (code 1)

  CMakeFiles\cmTryCompileExec143570813.dir\build.make:56: recipe for target
  'CMakeFiles/cmTryCompileExec143570813.dir/testFortranCompiler.f.obj'
  failed

  mingw32-make.exe[1]: ***
  [CMakeFiles/cmTryCompileExec143570813.dir/testFortranCompiler.f.obj] Error
  1

  mingw32-make.exe[1]: Leaving directory
  'C:/xxx/build/Release/build_fortran/CMakeFiles/CMakeTmp'

  Makefile:116: recipe for target 'cmTryCompileExec143570813/fast' failed

  mingw32-make.exe: *** [cmTryCompileExec143570813/fast] Error 2
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2015-04-29 19:36 Steven Petsche New Issue                                    
======================================================================

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to