View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013756CMakeCMakepublic2012-11-28 17:292013-12-02 08:51
ReporterNick Hutchinson 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformLinuxOSUbuntuOS Version12.10
Product VersionCMake 2.8.10.2 
Target VersionCMake 2.8.11Fixed in VersionCMake 2.8.11 
Summary0013756: Infinite loop when reconfiguring with different CMAKE_C_COMPILER
DescriptionIt's possible to get CMake stuck in a seemingly infinite loop when reconfiguring a project.
Steps To Reproduce1. Create the following trivial CMakeList.txt:
~~~~
cmake_minimum_required(VERSION 2.8.8)
~~~~

2. `cd` to the directory containing this file, and execute `cmake .`
3. Execute `cmake . -DCMAKE_C_COMPILER=cc`

Expected Behaviour:
CMake reconfigures the project with the specified compiler.

Actual Behaviour:
CMake prints the following to stdout in an infinite loop:
~~~~
-- Configuring done
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_C_COMPILER= cc
~~~~
TagsNo tags attached.
Attached Files

 Relationships
related to 0006102closedBill Hoffman Changing compilers should be an easier operation 
related to 0013901closedBrad King cmake . -DCMAKE_CXX_COMPILER= results in segfault 
has duplicate 0013927closedBrad King CMake loops indefinitely when compiler is changed 
has duplicate 0013989closedRobert Maynard Unable to change native compilers after initial configuration 
related to 0013926closedBrad King CMake hangs on OSX 
related to 0008193closedBill Hoffman Cmake goes to endless loop on mac os X when trying to generate Unix make files. 
related to 0014097closed variable UNIX set to 1 on windows xp in VM on linux host 
related to 0014294closedBrad King Specifying CMAKE_CXX_COMPILER=g++ after first run deletes all cached values 

  Notes
(0031864)
Benjamin Schindler (reporter)
2012-12-10 10:29
edited on: 2012-12-10 10:32

I experience exactly the same thing with cmake-gui. I start the gui, specify a different native compiler, run configure. The configure step fails for other reasons but the cache is deleted. I could manually add all variables required to make configure work, but its about 10 variables and if just one is wrong, I have to start afresh. Really annoying! In my opinion not so minor.

I just tried 2.8.9 and there, it works

(0032240)
Brad King (manager)
2013-02-08 16:45

For reference, see comment 0013901:0032239.
(0032354)
Brad King (manager)
2013-02-20 08:12

Fixed (see commit message for explanation):

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1df09e57 [^]

and test added:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e83e6a1c [^]
(0034646)
Robert Maynard (manager)
2013-12-02 08:51

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2012-11-28 17:29 Nick Hutchinson New Issue
2012-12-10 10:29 Benjamin Schindler Note Added: 0031864
2012-12-10 10:32 Benjamin Schindler Note Edited: 0031864
2013-02-08 16:39 Brad King Relationship added related to 0006102
2013-02-08 16:39 Brad King Relationship added related to 0013901
2013-02-08 16:45 Brad King Note Added: 0032240
2013-02-17 09:24 Brad King Relationship added has duplicate 0013927
2013-02-20 08:12 Brad King Note Added: 0032354
2013-02-20 08:12 Brad King Assigned To => Brad King
2013-02-20 08:12 Brad King Status new => resolved
2013-02-20 08:12 Brad King Resolution open => fixed
2013-02-20 08:12 Brad King Fixed in Version => CMake 2.8.11
2013-02-20 08:12 Brad King Target Version => CMake 2.8.11
2013-02-20 08:14 Brad King Relationship added related to 0013926
2013-03-07 08:51 Robert Maynard Relationship added has duplicate 0013989
2013-03-15 09:02 Brad King Relationship added related to 0008193
2013-04-18 08:22 Brad King Relationship added related to 0014097
2013-07-16 08:39 Brad King Relationship added related to 0014294
2013-12-02 08:51 Robert Maynard Note Added: 0034646
2013-12-02 08:51 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team