Get Error by run cmake
Closed this issue · 6 comments
A friend of mine and I have tried to use EtherealEngine and we both (my friend on Windows/me on Linux) failed to run cmake.
Did we get someting wrong or is the version we're using buggy?
It should run fine
Did you follow the build steps in the readme
Yes, when I executed the cmake I get this on the terminal:
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is unknown
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- broken
CMake Error at /usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler "/usr/bin/cc" is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/kai/EtherealEngine/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_fa1cc/fast"
/usr/bin/make -f CMakeFiles/cmTC_fa1cc.dir/build.make
CMakeFiles/cmTC_fa1cc.dir/build
make[1]: Verzeichnis
„/home/kai/EtherealEngine/build/CMakeFiles/CMakeTmp“ wird betreten
Building C object CMakeFiles/cmTC_fa1cc.dir/testCCompiler.c.o
/usr/bin/cc -o CMakeFiles/cmTC_fa1cc.dir/testCCompiler.c.o -c
/home/kai/EtherealEngine/build/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_fa1cc
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_fa1cc.dir/link.txt
--verbose=1
/usr/bin/cc CMakeFiles/cmTC_fa1cc.dir/testCCompiler.c.o -o cmTC_fa1cc
-rdynamic
/usr/bin/ld: cannot find crt1.o: Datei oder Verzeichnis nicht gefunden
/usr/bin/ld: cannot find crti.o: Datei oder Verzeichnis nicht gefunden
/usr/bin/ld: cannot find -lc
/usr/bin/ld: cannot find crtn.o: Datei oder Verzeichnis nicht gefunden
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_fa1cc.dir/build.make:97: die Regel für Ziel
„cmTC_fa1cc“ scheiterte
make[1]: *** [cmTC_fa1cc] Fehler 1
make[1]: Verzeichnis
„/home/kai/EtherealEngine/build/CMakeFiles/CMakeTmp“ wird verlassen
Makefile:126: die Regel für Ziel „cmTC_fa1cc/fast“ scheiterte
make: *** [cmTC_fa1cc/fast] Fehler 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:3 (project)
CMake Error at CMakeLists.txt:3 (project):
No CMAKE_CXX_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "/home/kai/EtherealEngine/build/CMakeFiles/CMakeOutput.log".
See also "/home/kai/EtherealEngine/build/CMakeFiles/CMakeError.log".
Here are the logs:
CMakeError.log
CMakeOutput.log
well it says it right there... Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
try running it like this
cmake -DCMAKE_C_COMPILER=path_to_your_gcc -DCMAKE_CXX_COMPILER=path_to_your_g++ ..
where path_to_your_gcc and path_to_your_g++ is where your compiler is located. Do you even have any compiler installed on your system? You can also use the any IDE that supports CMake to run it like Qt Creator, Visual Studio, Visual Studio Code etc... or you can use the CMake GUI on windows.
Yes that was the problem.
after moving the g++ in a $PATH directory it get an other result.
Now it says: "Xrandr library not found"
When I tried to install xrandr, apt says the x11-xserver-utils package replace it,
but I have installed the x11-xserver-utils.
Also whereis says that xrandr is accessible under /usr/bin/xrandr
after searching a bit in the error-logs I saw, the cmake found the x11-utils, but didn't got back an thread:
Linking C executable cmTC_9ea86
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_9ea86.dir/link.txt --verbose=1
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_9ea86.dir/CheckFunctionExists.c.o -o cmTC_9ea86 -rdynamic -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_9ea86.dir/build.make:97: die Regel für Ziel „cmTC_9ea86“ scheiterte