Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cmake cygwin make.exe error

I have got a problem with CMake 2.8.9. I use the GUI. I try to make a makefile (ogre 1.8).
As I have Windows 7 x64, I use CygWin with gcc.exe and g++.exe and make.exe (located in the bin directory).
When I try to "Configure", CMake logs the following error:

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

It fails with the following output:

Change Dir: H:/Ogre/gcc18/CMakeFiles/CMakeTmp



Run Build Command:G:/cygwin/bin/make.exe "cmTryCompileExec2682355191/fast"

/usr/bin/make -f CMakeFiles\cmTryCompileExec2682355191.dir\build.make
CMakeFiles/cmTryCompileExec2682355191.dir/build

D e r B e f e h l " m T r y C o m p i l e E x e c 2 6 8 2 3 5 5 1 9 1 .  d i r " i s t e n t w e d e r f a l s c h g e s c h r i e b e n o d e r  k o n n t e   n i c h t   g e f u n d e n   w e r d e n . 

makeMakefile:116: recipe for target `cmTryCompileExec2682355191/fast' failed

: *** [cmTryCompileExec2682355191/fast] Error 1





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


Configuring incomplete, errors occurred!

Whereas D e r B e f e h l " m T r y C o m p i l e.......
means "The command "mTryCompile......" is either spelled wrong or could not be found

$ make -version
GNU Make 3.82.90
Built for i686-pc-cygwin
Copyright (C) 2010  Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.


gcc-Version 4.5.3 (GCC)

My cache looks like this:

//Path to a program.
CMAKE_AR:FILEPATH=G:/cygwin/bin/ar.exe

//Choose the type of build, options are: None(CMAKE_CXX_FLAGS or
// CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.
CMAKE_BUILD_TYPE:STRING=

//Enable/Disable color output during build.
CMAKE_COLOR_MAKEFILE:BOOL=ON

//CXX compiler.
CMAKE_CXX_COMPILER:FILEPATH=G:/cygwin/bin/g++.exe

//C compiler.
CMAKE_C_COMPILER:FILEPATH=G:/cygwin/bin/gcc.exe

//Flags used by the compiler during all build types.
CMAKE_C_FLAGS:STRING=

//Flags used by the compiler during debug builds.
CMAKE_C_FLAGS_DEBUG:STRING=

//Flags used by the compiler during release minsize builds.
CMAKE_C_FLAGS_MINSIZEREL:STRING=

//Flags used by the compiler during release builds (/MD /Ob1 /Oi
// /Ot /Oy /Gs will produce slightly less optimized but smaller
// files).
CMAKE_C_FLAGS_RELEASE:STRING=

//Flags used by the compiler during Release with Debug Info builds.
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=

//Flags used by the linker.
CMAKE_EXE_LINKER_FLAGS:STRING=' '

//Flags used by the linker during debug builds.
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during release minsize builds.
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during release builds.
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during Release with Debug Info builds.
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//Install path prefix, prepended onto install directories.
CMAKE_INSTALL_PREFIX:PATH=C:/Program Files (x86)/OGRE

//Path to a program.
CMAKE_LINKER:FILEPATH=G:/cygwin/bin/ld.exe

//Path to a program.
CMAKE_MAKE_PROGRAM:FILEPATH=G:/cygwin/bin/make.exe

//Flags used by the linker during the creation of modules.
CMAKE_MODULE_LINKER_FLAGS:STRING=' '

//Flags used by the linker during debug builds.
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during release minsize builds.
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during release builds.
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during Release with Debug Info builds.
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//Path to a program.
CMAKE_NM:FILEPATH=G:/cygwin/bin/nm.exe

//Path to a program.
CMAKE_OBJCOPY:FILEPATH=G:/cygwin/bin/objcopy.exe

//Path to a program.
CMAKE_OBJDUMP:FILEPATH=G:/cygwin/bin/objdump.exe

//Value Computed by CMake
CMAKE_PROJECT_NAME:STATIC=OGRE

//Path to a program.
CMAKE_RANLIB:FILEPATH=G:/cygwin/bin/ranlib.exe

//Path to a program.
CMAKE_SH:FILEPATH=G:/cygwin/bin/sh.exe

//Flags used by the linker during the creation of dll's.
CMAKE_SHARED_LINKER_FLAGS:STRING=' '

//Flags used by the linker during debug builds.
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during release minsize builds.
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during release builds.
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during Release with Debug Info builds.
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//If set, runtime paths are not added when installing shared libraries,
// but are added when building.
CMAKE_SKIP_INSTALL_RPATH:BOOL=OFF

//If set, runtime paths are not added when using shared libraries.
CMAKE_SKIP_RPATH:BOOL=OFF

//Path to a program.
CMAKE_STRIP:FILEPATH=G:/cygwin/bin/strip.exe

//If true, cmake will use relative paths in makefiles and projects.
CMAKE_USE_RELATIVE_PATHS:BOOL=ON

//If this value is on, makefiles will be generated without the
// .SILENT directive, and all commands will be echoed to the console
// during the make.  This is useful for debugging only. With Visual
// Studio IDE projects all commands are done without /nologo.
CMAKE_VERBOSE_MAKEFILE:BOOL=OFF

CYGWIN:BOOL=ON

//Value Computed by CMake
OGRE_BINARY_DIR:STATIC=H:/Ogre/gcc18

//Value Computed by CMake
OGRE_SOURCE_DIR:STATIC=H:/Ogre/ogre_src_v1-8-1/ogre_src_v1-8-1
like image 321
Marco Alka Avatar asked Nov 05 '12 00:11

Marco Alka


1 Answers

Under Cygwin you cannot use your regular Windows CMake installation. You have to install the UNIX version of CMake using the Cygwin Setup program.

like image 132
sakra Avatar answered Nov 15 '22 11:11

sakra