View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008089CMakeCMakepublic2008-11-13 00:372008-11-14 17:46
ReporterRoscoe A. Bartlett 
Assigned ToBill Hoffman 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in Version 
Summary0008089: Fortran compiler check cycles forever when full path is not used with CMAKE_Fortran_COMPILER
DescriptionA colege found that on one of his machines that CMake would cycle forever trying to set the cache variable for the fortran compiler.

Here is the configure script that he used to configure Trilinos with CMake:

===============================================================================

cmake \
-D CMAKE_CXX_COMPILER:FILEPATH=mpiCC \
-D CMAKE_C_COMPILER:FILEPATH=mpicc \
-D CMAKE_Fortran_COMPILER:FILEPATH=mpif77 \
../../Trilinos

===============================================================================

When configureing with this option for the Fortran compiler the output that he got was:

===============================================================================

Configuring Trilinos build directory

...
-- Check for working Fortran compiler: mpif77
-- Check for working Fortran compiler: mpif77 -- works
-- Checking whether mpif77 supports Fortran 90
-- Checking whether mpif77 supports Fortran 90 -- yes

...

You have changed variables that require your cache to be deleted.
Configure will be re-run and you may have to reset some variables.
The following variables have changed:
CMAKE_Fortran_COMPILER= mpif77


Configuring Trilinos build directory

...

-- Check for working Fortran compiler: mpif77
-- Check for working Fortran compiler: mpif77 -- works
-- Checking whether mpif77 supports Fortran 90
-- Checking whether mpif77 supports Fortran 90 -- yes

...

You have changed variables that require your cache to be deleted.
Configure will be re-run and you may have to reset some variables.
The following variables have changed:
CMAKE_Fortran_COMPILER= mpif77


Configuring Trilinos build directory

...

-- Check for working Fortran compiler: mpif77
-- Check for working Fortran compiler: mpif77 -- works
-- Checking whether mpif77 supports Fortran 90
-- Checking whether mpif77 supports Fortran 90 -- yes

...

You have changed variables that require your cache to be deleted.
Configure will be re-run and you may have to reset some variables.
The following variables have changed:
CMAKE_Fortran_COMPILER= mpif77

...

===============================================================================

This cycle goes on and on and on ...

I just tried this on another machine myself and I was able to reproduce the problem where it just cycles forever. Note that I also tried this with a recent CVS version of CMake (less than a week old) and it does same thing.

However, when you change to use the full path to the Fortran compiler then the problem goes away.

Has anyone else noticed this problem with the CMAKE_Fortran_COMPILER option?

Note that this same behavior does not happen with CMAKE_C_COMPILER or CMAKE_CXX_COMPILER.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0014097)
Bill Hoffman (manager)
2008-11-13 09:04

That issue happens with the c, cxx or Fortran compiler. The "expected" way of specifying the compiler is via the environment vars C, CXX, and FC. So, from bash it would be something like this:

(export CC=mpicc; export CXX=mpiCC; export mpif77; cmake ../../Trilinos )

This is obviously a bug. It comes from the code that tries to detect a compiler change from ccmake or cmake-gui made by the user. The -D flags put the value in the cache with no full path, then cmake changes it to a full path which deletes the cache, but the command line flags are restored to the cache, and it cycles....
(0014117)
Bill Hoffman (manager)
2008-11-14 17:46

$ cvs commit -m "BUG: fix for 0008089, fix rebuild with fortran and -D" CMakeDetermineFortranCompiler.cmake
Committer: Bill Hoffman <bill.hoffman@kitware.com>
/cvsroot/CMake/CMake/Modules/CMakeDetermineFortranCompiler.cmake,v <-- CMakeDetermineFortranCompiler.cmake
new revision: 1.24; previous revision: 1.23

Found it. It was just a Fortran thing.

 Issue History
Date Modified Username Field Change
2008-11-13 00:37 Roscoe A. Bartlett New Issue
2008-11-13 08:58 Bill Hoffman Status new => assigned
2008-11-13 08:58 Bill Hoffman Assigned To => Bill Hoffman
2008-11-13 09:04 Bill Hoffman Note Added: 0014097
2008-11-14 17:46 Bill Hoffman Note Added: 0014117
2008-11-14 17:46 Bill Hoffman Status assigned => closed
2008-11-14 17:46 Bill Hoffman Resolution open => fixed


Copyright © 2000 - 2018 MantisBT Team