Hello,
I've recently decided to give SFML 2.0 a try. I'm following
http://www.sfml-dev.org/tutorials/2.0/compile-with-cmake.php in order to compile the source code manually (I want to use C++11 features in my source code, otherwise I wouldn't bother with CMake).
I've got the source code in a folder on my desktop called SFML2 and a separate folder on my desktop called SFML2-Build that will store the results of the build.
After filling out these two directories at the top of the CMake GUI, I went into Configure, selected Unix Makefiles, and then Specify native compilers, as per the 2.0 c++11 build instructions. Then I went on to select clang for C and clang++ for the c++ compiler, subsequently pressing Done on that same window.
However, as soon as I click done, I get a bunch of errors, and the build is deemed unsuccessful. I've followed the tutorials to a T so I'm not seeing what could be going wrong here. The source code is the latest version from GitHub.
Here is the error output log:
CMake Error: Cannot open file for write: /Users/Mike/Desktop/SFML2-Build/CMakeCache.txt.tmp
CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake:160 (file):
file Internal CMake error when trying to open file:
/Users/Mike/Desktop/SFML2-Build/CMakeFiles/CMakeOutput.log for writing.
Call Stack (most recent call first):
CMakeLists.txt:17 (project)
CMake Error: Could not open file for write in copy operation /Users/Mike/Desktop/SFML2-Build/CMakeFiles/2.8.10.2/CMakeSystem.cmake.tmp
CMake Error: : System Error: No such file or directory
CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake:172 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:17 (project)
CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:99 (file):
file problem creating directory:
/Users/Mike/Desktop/SFML2-Build/CMakeFiles/2.8.10.2/CompilerIdC
Call Stack (most recent call first):
/Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:39 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake:124 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:17 (project)
CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:99 (file):
file problem creating directory:
/Users/Mike/Desktop/SFML2-Build/CMakeFiles/2.8.10.2/CompilerIdC
Call Stack (most recent call first):
/Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:39 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake:124 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:17 (project)
CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:99 (file):
file problem creating directory:
/Users/Mike/Desktop/SFML2-Build/CMakeFiles/2.8.10.2/CompilerIdC
Call Stack (most recent call first):
/Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:39 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake:124 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:17 (project)
The C compiler identification is unknown
CMake Error: Could not open file for write in copy operation /Users/Mike/Desktop/SFML2-Build/CMakeFiles/2.8.10.2/CMakeCCompiler.cmake.tmp
CMake Error: : System Error: No such file or directory
CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake:171 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:17 (project)
CMake Error: Could not find cmake module file:/Users/Mike/Desktop/SFML2-Build/CMakeFiles/2.8.10.2/CMakeCCompiler.cmake
CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:99 (file):
file problem creating directory:
/Users/Mike/Desktop/SFML2-Build/CMakeFiles/2.8.10.2/CompilerIdCXX
Call Stack (most recent call first):
/Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:39 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake:120 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:17 (project)
CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:99 (file):
file problem creating directory:
/Users/Mike/Desktop/SFML2-Build/CMakeFiles/2.8.10.2/CompilerIdCXX
Call Stack (most recent call first):
/Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:39 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake:120 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:17 (project)
The CXX compiler identification is unknown
CMake Error: Could not open file for write in copy operation /Users/Mike/Desktop/SFML2-Build/CMakeFiles/2.8.10.2/CMakeCXXCompiler.cmake.tmp
CMake Error: : System Error: No such file or directory
CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake:167 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:17 (project)
CMake Error: Could not find cmake module file:/Users/Mike/Desktop/SFML2-Build/CMakeFiles/2.8.10.2/CMakeCXXCompiler.cmake
Check for working C compiler: /usr/bin/cc
CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:35 (file):
file Internal CMake error when trying to open file:
/Users/Mike/Desktop/SFML2-Build/CMakeFiles/CMakeTmp/testCCompiler.c for
writing.
Call Stack (most recent call first):
CMakeLists.txt:17 (project)
CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:47 (try_compile):
Failed to open
/Users/Mike/Desktop/SFML2-Build/CMakeFiles/CMakeTmp/CMakeLists.txt
No such file or directory
Call Stack (most recent call first):
CMakeLists.txt:17 (project)
Check for working C compiler: /usr/bin/cc -- broken
CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:58 (file):
file Internal CMake error when trying to open file:
/Users/Mike/Desktop/SFML2-Build/CMakeFiles/CMakeError.log for writing.
Call Stack (most recent call first):
CMakeLists.txt:17 (project)
CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/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:
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:17 (project)
Configuring incomplete, errors occurred!
CMake Error: Cannot open file for write: /Users/Mike/Desktop/SFML2-Build/CMakeCache.txt.tmp
CMake Error: : System Error: Permission denied
CMake Error: Unable to open cache file for save. /Users/Mike/Desktop/SFML2-Build/CMakeCache.txt
CMake Error: : System Error: Permission denied
CMake Error: : System Error: No such file or directory
CMake Error: Unable to open cache file for save. /Users/Mike/Desktop/SFML2-Build/CMakeCache.txt
CMake Error: : System Error: No such file or directory
Thanks for any help with this, I can't wait to get this up and running!