[cmake-developers] [CMake 0011929]: Cmake projects requiring (Intel) Fortran fail to configure and/or generate.

Mantis Bug Tracker mantis at public.kitware.com
Fri Mar 4 14:30:16 EST 2011


The following issue has been SUBMITTED. 
====================================================================== 
http://vtk.org/Bug/view.php?id=11929 
====================================================================== 
Reported By:                MarkR
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   11929
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   high
Status:                     new
====================================================================== 
Date Submitted:             2011-03-04 14:30 EST
Last Modified:              2011-03-04 14:30 EST
====================================================================== 
Summary:                    Cmake projects requiring (Intel) Fortran fail to
configure and/or generate.
Description: 
(Note: Error similar to another report (ID=0011831) for cmake 1.8.3)

I am trying to use cmake (cmake-gui) to configure the new v3.1 CGNS library
(www.cgns.org).  This project requires Fortran, which is selected in the 2nd
step of configuration for this project. (i.e. configure once, then select
"ENABLE_FORTRAN" cmake option, then hit configure 2nd time (which fails).
(I'm also having this problem with the OpenMPI v1.5.1 cmake project from
www.openmpi.org).

I have Visual Studio 2010 and 2008 installed.  I also have Intel Fortran 11.1
and XE installed.  I can not get past the (2nd) configure stage for this
project, as it causes cmake to search for a Fortran compiler.

I tried to launch cmake-gui from various command enviroment settings (e.g. VS08
+ Intel 11, VS10 + Intel 11, VS10 + Intel XE), but in each case, the Fortran
generator fails.

The failure message is as follows (message trimmed to show relevant parts - see
"additional information" field for entire message):

CMake Error at
D:/tools/cmake/share/cmake-2.8/Modules/CMakeTestFortranCompiler.cmake:42
(MESSAGE):
  The Fortran compiler "C:/p/Intel/Compiler/11.1/070/bin/intel64/ifort.exe"
  is not able to compile a simple test program.

[more errors]

    LINK : error LNK2001: unresolved external symbol mainCRTStartup
[D:\temp\cgns_3.1\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj]


I don't have details, but I think I recall that the cmake 1.8.4 "Fortran Check"
worked for a DIFFERNT cmake project I also have.

Steps to Reproduce: 
Download CGNS v3.1 source code from www.cgns.org. (released 3.1.2011).

Open "Intel Fortran XE 64-bit" Command prompt, and run cmake-gui.exe.

Point to cgns source code dir and select any build directory of choice.

Hit "configure" and Select "Visual Studio 2010 Win64" and "default native" as
project type.

(Ignore possible CMP0015 warning).

Once additional cmake variables show up in cmake-gui, select (check) the one
labeled "ENABLE_FORTRAN".

Select "configure" again.  Error happens at this point.

Additional Information: 
Here is the entire cmake error message shown in the cmake gui:
Check for working Fortran compiler using: Visual Studio 10 Win64
Check for working Fortran compiler using: Visual Studio 10 Win64  -- broken
CMake Error at
D:/tools/cmake/share/cmake-2.8/Modules/CMakeTestFortranCompiler.cmake:42
(MESSAGE):
  The Fortran compiler "C:/p/Intel/Compiler/11.1/070/bin/intel64/ifort.exe"
  is not able to compile a simple test program.

  It fails with the following output:

   Change Dir: D:/temp/cgns_3.1/CMakeFiles/CMakeTmp

  

  Run Build Command:C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
  cmTryCompileExec.vcxproj /p:Configuration=Debug

  Microsoft (R) Build Engine Version 4.0.30319.1

  [Microsoft .NET Framework, Version 4.0.30319.1]

  Copyright (C) Microsoft Corporation 2007.  All rights reserved.

  

  Build started 3/4/2011 2:18:44 PM.

  Project "D:\temp\cgns_3.1\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj" on
  node 1 (default targets).

  InitializeBuildStatus:

    Creating "cmTryCompileExec.dir\Debug\cmTryCompileExec.unsuccessfulbuild"
because "AlwaysCreate" was specified.

  ManifestResourceCompile:

    C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\rc.exe /nologo
/fo"cmTryCompileExec.dir\Debug\cmTryCompileExec.exe.embed.manifest.res"
cmTryCompileExec.dir\Debug\cmTryCompileExec_manifest.rc 

  Link:

    C:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\bin\x86_amd64\link.exe /ERRORREPORT:QUEUE
/OUT:"D:\temp\cgns_3.1\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec.exe"
/VERSION:"0.0" /INCREMENTAL /NOLOGO /MANIFEST
/ManifestFile:"cmTryCompileExec.dir\Debug\cmTryCompileExec.exe.intermediate.manifest"
/MANIFESTUAC:"level='asInvoker' uiAccess='false'"
/PDB:"D:\temp\cgns_3.1\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec.pdb"
/SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT
/IMPLIB:"D:/temp/cgns_3.1/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec.lib"
/MACHINE:X64 cmTryCompileExec.dir\Debug\cmTryCompileExec.exe.embed.manifest.res

  LINK : error LNK2001: unresolved external symbol mainCRTStartup
  [D:\temp\cgns_3.1\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj]

  D:\temp\cgns_3.1\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec.exe : fatal
  error LNK1120: 1 unresolved externals
  [D:\temp\cgns_3.1\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj]

  Done Building Project
  "D:\temp\cgns_3.1\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj" (default
  targets) -- FAILED.

  

  Build FAILED.

  

  "D:\temp\cgns_3.1\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj" (default
  target) (1) ->

  (Link target) -> 

    LINK : error LNK2001: unresolved external symbol mainCRTStartup
[D:\temp\cgns_3.1\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj]
    D:\temp\cgns_3.1\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec.exe : fatal
error LNK1120: 1 unresolved externals
[D:\temp\cgns_3.1\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj]

  

      0 Warning(s)
      2 Error(s)

  

  Time Elapsed 00:00:01.18

  

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:123 (enable_language)


Configuring incomplete, errors occurred!
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-03-04 14:30 MarkR          New Issue                                    
======================================================================




More information about the cmake-developers mailing list