CMAKE Error

Started by Honor, 24 June 2016, 19:08:40

Honor

Just downloaded the latest stable source and cmake itself doesn't really want to work? Any thoughts?

Error occurs after I click configure (source and build folders are linked correctly). Perhaps it's because I'm not using an external (non)default hard drive?

texus

#1
What error exactly?

If you ran cmake before in that folder then you could try deleting the cache (in cmake menu bar: File > Delete Cache).

(edit: I didn't see your image when I wrote this because my browser I was using blocked the HTTP request)

Honor

#2
I should mention I'm building for Code::Block's default compiler.

Edit: I have been deleting cache between configurations.

Here is output log from CMAKE build:




Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: C:/Program Files (x86)/CodeBlocks/MinGW/bin/gcc.exe
Build flags:
Id flags:

The output was:
1


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: C:/Program Files (x86)/CodeBlocks/MinGW/bin/gcc.exe
Build flags:
Id flags: -c

The output was:
1


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: C:/Program Files (x86)/CodeBlocks/MinGW/bin/gcc.exe
Build flags:
Id flags: -Aa

The output was:
1
<command-line>:0:1: error: missing '(' after predicate


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: C:/Program Files (x86)/CodeBlocks/MinGW/bin/gcc.exe
Build flags:
Id flags: -D__CLASSIC_C__

The output was:
1


Checking whether the C compiler is IAR using "" did not match "IAR .+ Compiler":
gcc.exe: fatal error: no input files
compilation terminated.
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/Program Files (x86)/CodeBlocks/MinGW/bin/g++.exe
Build flags:
Id flags:

The output was:
1


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/Program Files (x86)/CodeBlocks/MinGW/bin/g++.exe
Build flags:
Id flags: -c

The output was:
1


Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler":
g++.exe: fatal error: no input files
compilation terminated.
Determining if the C compiler works failed with the following output:
Change Dir: D:/SFML/TGUI Build/CMakeFiles/CMakeTmp

Run Build Command:"C:/PROGRA~2/CODEBL~1/MinGW/bin/mingw32-make.exe" "cmTC_7e3c5/fast"
C:/PROGRA~2/CODEBL~1/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_7e3c5.dir\build.make CMakeFiles/cmTC_7e3c5.dir/build

mingw32-make.exe[1]: Entering directory 'D:/SFML/TGUI Build/CMakeFiles/CMakeTmp'

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

C:\PROGRA~2\CODEBL~1\MinGW\bin\gcc.exe     -o CMakeFiles\cmTC_7e3c5.dir\testCCompiler.c.obj   -c "D:\SFML\TGUI Build\CMakeFiles\CMakeTmp\testCCompiler.c"

CMakeFiles\cmTC_7e3c5.dir\build.make:64: recipe for target 'CMakeFiles/cmTC_7e3c5.dir/testCCompiler.c.obj' failed

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

mingw32-make.exe[1]: Leaving directory 'D:/SFML/TGUI Build/CMakeFiles/CMakeTmp'

Makefile:125: recipe for target 'cmTC_7e3c5/fast' failed

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




texus

You could try putting TGUI in a folder which does not contain spaces (e.g. "D:/SFML/TGUI-Build/") or putting it on the C drive to see if it changes anything.

If that doesn't work then it looks like either the compiler or cmake is broken.
All commits that I push to github are automatically tested on different platforms so it is unlikely that there is a fix that I can make, it looks like something specific to your pc.

Honor

Same error after moving it to C:/ and removing spaces in the folder names. Maybe I'll try to download an older version of cmake or something like that, thanks for you help! Very fast response <3

Honor

Solved: Had to manually add MinGW path to enviromental paths, then RESTART computer.

texus

You typically don't have to do that with codeblock's default compiler unless you are using the "MinGW Makefiles" generator instead of "CodeBlocks - MinGW Makefiles", but I'm glad to hear that you found a solution to the problem.

Honor

For some reason Codeblock's MinGW compiler was missing some DLL files that cmake required (Even after several re-installations). I just switched everything to use the standalone MinGW compiler instead.