View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0009286CMakeCTestpublic2009-07-20 05:482009-09-21 13:06
ReporterDavide 
Assigned ToDavid Partyka 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionunable to reproduce 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0009286: CMake fails to compile a test program with last mingw
DescriptionI just downloaded new GCC (last stable version is 4.4.0) from mingw.org and CMake fails to compile a test program.
Additional InformationThe C compiler identification is unknown
The CXX compiler identification is unknown
Check for working C compiler: C:/MinGw/bin/gcc.exe
Check for working C compiler: C:/MinGw/bin/gcc.exe -- broken
CMake Error at C:/Program Files/CMake 2.6/share/cmake-2.6/Modules/CMakeTestCCompiler.cmake:32 (MESSAGE):
  The C compiler "C:/MinGw/bin/gcc.exe" is not able to compile a simple test
  program.

  It fails with the following output:

   Change Dir: C:/Users/Davide/Desktop/winverlihub/build/CMakeFiles/CMakeTmp

  

  Run Build Command:C:/MinGw/bin/mingw32-make.exe "cmTryCompileExec/fast"

  C:/MinGw/bin/mingw32-make.exe -f CMakeFiles\cmTryCompileExec.dir\build.make
  CMakeFiles/cmTryCompileExec.dir/build

  mingw32-make.exe[1]: Entering directory
  `C:/Users/Davide/Desktop/winverlihub/build/CMakeFiles/CMakeTmp'

  "C:\Program Files\CMake 2.6\bin\cmake.exe" -E cmake_progress_report
  C:\Users\Davide\Desktop\winverlihub\build\CMakeFiles\CMakeTmp\CMakeFiles 1

  Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.obj

  C:\MinGw\bin\gcc.exe -o CMakeFiles\cmTryCompileExec.dir\testCCompiler.c.obj
  -c
  C:\Users\Davide\Desktop\winverlihub\build\CMakeFiles\CMakeTmp\testCCompiler.c


  mingw32-make.exe[1]: ***
  [CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.obj] Error 1

  mingw32-make.exe[1]: Leaving directory
  `C:/Users/Davide/Desktop/winverlihub/build/CMakeFiles/CMakeTmp'

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

  

  

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


Configuring incomplete, errors occurred!
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0017426)
Bill Hoffman (manager)
2009-09-14 11:54

Dave, can you check this out with a current mingw install?
(0017435)
Bill Hoffman (manager)
2009-09-14 12:39

Does the compiler work from the command line that you installed?

gcc foo.c

Also, you can try cmake --debug-trycompile, and run the make by hand in the CMakeFiles/CMakeTmp directory. Looks like the gcc is not working.
(0017604)
Davide (reporter)
2009-09-18 05:37

Compiler works fine from command line by compiling a simple program.
This is the ouput of cmake --debug-trycompile
PS C:\Users\netcelli\Desktop\winverlihub\build> cmake --debug-trycompile ..
debug trycompile on
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Check for working C compiler: C:/Users/netcelli/Downloads/MinGW4.4.0/bin/gcc.exe
-- Check for working C compiler: C:/Users/netcelli/Downloads/MinGW4.4.0/bin/gcc.exe -- broken
CMake Error at C:/Program Files/CMake 2.6/share/cmake-2.6/Modules/CMakeTestCCompiler.cmake:32 (MESSAGE):
  The C compiler "C:/Users/netcelli/Downloads/MinGW4.4.0/bin/gcc.exe" is not
  able to compile a simple test program.

  It fails with the following output:

   Change Dir: C:/Users/netcelli/Desktop/winverlihub/build/CMakeFiles/CMakeTmp



  Run Build Command:C:/Users/netcelli/Downloads/MinGW/bin/mingw32-make.exe
  "cmTryCompileExec/fast"

  C:/Users/netcelli/Downloads/MinGW/bin/mingw32-make.exe -f
  CMakeFiles\cmTryCompileExec.dir\build.make
  CMakeFiles/cmTryCompileExec.dir/build

  mingw32-make.exe[1]: Entering directory
  `C:/Users/netcelli/Desktop/winverlihub/build/CMakeFiles/CMakeTmp'

  "C:\Program Files\CMake 2.6\bin\cmake.exe" -E cmake_progress_report
  C:\Users\netcelli\Desktop\winverlihub\build\CMakeFiles\CMakeTmp\CMakeFiles
  1

  Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.obj

  C:\Users\netcelli\Downloads\MinGW4.4.0\bin\gcc.exe -o
  CMakeFiles\cmTryCompileExec.dir\testCCompiler.c.obj -c
  C:\Users\netcelli\Desktop\winverlihub\build\CMakeFiles\CMakeTmp\testCCompiler.c


  mingw32-make.exe[1]: ***
  [CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.obj] Error 1

  mingw32-make.exe[1]: Leaving directory
  `C:/Users/netcelli/Desktop/winverlihub/build/CMakeFiles/CMakeTmp'

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





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


-- Configuring incomplete, errors occurred!
(0017605)
Bill Hoffman (manager)
2009-09-18 08:31

OK, after you run with debug try-compile, then do this:


cd C:/Users/netcelli/Desktop/winverlihub/build/CMakeFiles/CMakeTmp
make VERBOSE=1

What happens?
(0017611)
Davide (reporter)
2009-09-18 14:50

This is the output:

"C:\Program Files\CMake 2.6\bin\cmake.exe" -HC:\Users\netcelli\Desktop\winverlihub\build\CMakeFiles\CMakeTmp -BC:\Users\
netcelli\Desktop\winverlihub\build\CMakeFiles\CMakeTmp --check-build-system CMakeFiles\Makefile.cmake 0
Re-run cmake: build system dependency is missing
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/netcelli/Desktop/winverlihub/build/CMakeFiles/CMakeTmp
"C:\Program Files\CMake 2.6\bin\cmake.exe" -E cmake_progress_start C:\Users\netcelli\Desktop\winverlihub\build\CMakeFile
s\CMakeTmp\CMakeFiles C:\Users\netcelli\Desktop\winverlihub\build\CMakeFiles\CMakeTmp\CMakeFiles\progress.make
C:/Users/netcelli/Downloads/MinGW4.4.0/bin/mingw32-make -f CMakeFiles\Makefile2 all
mingw32-make[1]: Entering directory `C:/Users/netcelli/Desktop/winverlihub/build/CMakeFiles/CMakeTmp'
C:/Users/netcelli/Downloads/MinGW4.4.0/bin/mingw32-make -f CMakeFiles\cmTryCompileExec.dir\build.make CMakeFiles/cmTryCo
mpileExec.dir/depend
mingw32-make[2]: Entering directory `C:/Users/netcelli/Desktop/winverlihub/build/CMakeFiles/CMakeTmp'
"C:\Program Files\CMake 2.6\bin\cmake.exe" -E cmake_depends "MinGW Makefiles" C:\Users\netcelli\Desktop\winverlihub\buil
d\CMakeFiles\CMakeTmp C:\Users\netcelli\Desktop\winverlihub\build\CMakeFiles\CMakeTmp C:\Users\netcelli\Desktop\winverli
hub\build\CMakeFiles\CMakeTmp C:\Users\netcelli\Desktop\winverlihub\build\CMakeFiles\CMakeTmp C:\Users\netcelli\Desktop\
winverlihub\build\CMakeFiles\CMakeTmp\CMakeFiles\cmTryCompileExec.dir\DependInfo.cmake --color=
Dependee "C:\Users\netcelli\Desktop\winverlihub\build\CMakeFiles\CMakeTmp\CMakeFiles\cmTryCompileExec.dir\DependInfo.cma
ke" is newer than depender "C:/Users/netcelli/Desktop/winverlihub/build/CMakeFiles/CMakeTmp/CMakeFiles/cmTryCompileExec.
dir/depend.internal".
Scanning dependencies of target cmTryCompileExec
mingw32-make[2]: Leaving directory `C:/Users/netcelli/Desktop/winverlihub/build/CMakeFiles/CMakeTmp'
C:/Users/netcelli/Downloads/MinGW4.4.0/bin/mingw32-make -f CMakeFiles\cmTryCompileExec.dir\build.make CMakeFiles/cmTryCo
mpileExec.dir/build
mingw32-make[2]: Entering directory `C:/Users/netcelli/Desktop/winverlihub/build/CMakeFiles/CMakeTmp'
"C:\Program Files\CMake 2.6\bin\cmake.exe" -E cmake_progress_report C:\Users\netcelli\Desktop\winverlihub\build\CMakeFil
es\CMakeTmp\CMakeFiles 1
[100%] Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.obj
C:\Users\netcelli\Downloads\MinGW4.4.0\bin\gcc.exe -o CMakeFiles\cmTryCompileExec.dir\testCCompiler.c.obj -c C:\Use
rs\netcelli\Desktop\winverlihub\build\CMakeFiles\CMakeTmp\testCCompiler.c
gcc.exe: CreateProcess: No such file or directory
mingw32-make[2]: *** [CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.obj] Error 1
mingw32-make[2]: Leaving directory `C:/Users/netcelli/Desktop/winverlihub/build/CMakeFiles/CMakeTmp'
mingw32-make[1]: *** [CMakeFiles/cmTryCompileExec.dir/all] Error 2
mingw32-make[1]: Leaving directory `C:/Users/netcelli/Desktop/winverlihub/build/CMakeFiles/CMakeTmp'
mingw32-make: *** [all] Error 2
PS C:\Users\netcelli\Desktop\winverlihub\build\CMakeFiles\CMakeTmp>
(0017612)
Bill Hoffman (manager)
2009-09-18 15:10

What if you run this command by hand:

C:\Users\netcelli\Downloads\MinGW4.4.0\bin\gcc.exe -o CMakeFiles\cmTryCompileExec.dir\testCCompiler.c.obj -c C:\Use
rs\netcelli\Desktop\winverlihub\build\CMakeFiles\CMakeTmp\testCCompiler.c
gcc.exe: CreateProcess: No such file or directory


This seems to be an issue of make not being able to run gcc.exe for some reason, un-cmake related....
(0017630)
Davide (reporter)
2009-09-19 07:50
edited on: 2009-09-19 07:56

Well it says:
gcc.exe: CreateProcess: No such file or directory
There is no object file inside cmTryCompileExec.dir folder.

(0017632)
Bill Hoffman (manager)
2009-09-19 08:42

I would try to get it down to a more simple case first. Can you run the same gcc command from the command line? Can you create a simple makefile that calls the command? It may be some odd path thing or shell thing.
(0017669)
David Partyka (developer)
2009-09-21 11:03

Is this package available for download somewhere? I can't find winverlihub but did find verlihub but it doesnt appear to be cmake-ified.

I installed gcc-4.4 in my own mingw and I am able to configure other packages such as VTK with no problem.
(0017670)
David Partyka (developer)
2009-09-21 11:08

Actually, is C:\MinGW\bin in your PATH? If I remove it from my path and try to configure I get the exact same errors message as your original post:

The C compiler identification is unknown
The CXX compiler identification is unknown
Check for working C compiler: C:/MinGW/bin/gcc.exe
Check for working C compiler: C:/MinGW/bin/gcc.exe -- broken
CMake Error at C:/Program Files (x86)/CMake 2.6/share/cmake-2.6/Modules/CMakeTestCCompiler.cmake:32 (MESSAGE):
  The C compiler "C:/MinGW/bin/gcc.exe" is not able to compile a simple test
  program.

  It fails with the following output:

   Change Dir: C:/Kitware/vtk/binmingw1/CMakeFiles/CMakeTmp

  

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

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

  mingw32-make.exe[1]: Entering directory
  `C:/Kitware/vtk/binmingw1/CMakeFiles/CMakeTmp'

  "C:\Program Files (x86)\CMake 2.6\bin\cmake.exe" -E cmake_progress_report
  C:\Kitware\vtk\binmingw1\CMakeFiles\CMakeTmp\CMakeFiles 1

  Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.obj

  C:\MinGW\bin\gcc.exe -o CMakeFiles\cmTryCompileExec.dir\testCCompiler.c.obj
  -c C:\Kitware\vtk\binmingw1\CMakeFiles\CMakeTmp\testCCompiler.c

  mingw32-make.exe[1]: ***
  [CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.obj] Error 1

  mingw32-make.exe[1]: Leaving directory
  `C:/Kitware/vtk/binmingw1/CMakeFiles/CMakeTmp'

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

  

  

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


Configuring incomplete, errors occurred!
(0017673)
Davide (reporter)
2009-09-21 12:19

Yea it's in my patch. Btw it seems not to be cmake related so I guess it's possible to close this bug.
Sorry!

 Issue History
Date Modified Username Field Change
2009-07-20 05:48 Davide New Issue
2009-09-14 11:54 Bill Hoffman Status new => assigned
2009-09-14 11:54 Bill Hoffman Assigned To => David Partyka
2009-09-14 11:54 Bill Hoffman Note Added: 0017426
2009-09-14 12:39 Bill Hoffman Note Added: 0017435
2009-09-18 05:37 Davide Note Added: 0017604
2009-09-18 08:31 Bill Hoffman Note Added: 0017605
2009-09-18 14:50 Davide Note Added: 0017611
2009-09-18 15:10 Bill Hoffman Note Added: 0017612
2009-09-19 07:50 Davide Note Added: 0017630
2009-09-19 07:56 Davide Note Edited: 0017630
2009-09-19 08:42 Bill Hoffman Note Added: 0017632
2009-09-21 11:03 David Partyka Note Added: 0017669
2009-09-21 11:08 David Partyka Note Added: 0017670
2009-09-21 12:19 Davide Note Added: 0017673
2009-09-21 13:06 Bill Hoffman Status assigned => closed
2009-09-21 13:06 Bill Hoffman Resolution open => unable to reproduce


Copyright © 2000 - 2018 MantisBT Team