[CMake] CMake 2.8.8-2.8.9 - Generate Xcode 4.4.1 project

David Cole david.cole at kitware.com
Fri Aug 10 11:02:00 EDT 2012


There is never any reason to run CMake as root or to use sudo to
configure a project build tree with CMake.

Mixing and matching use of sudo/non-sudo within the same build tree is
simply asking for file permissions problems.


On Fri, Aug 10, 2012 at 10:22 AM, Romain LEGUAY <romain.leguay at gmail.com> wrote:
> Hi again!
>
> I succeed to generate a Xcode project (with a normal user) with cmake-gui.
> I hope this new information can lead you to the solution.
>
> Regards,
> Romain
>
> Le 10/08/12 11:34, Romain LEGUAY a écrit :
>
> Hi everyone!
>
> I have a problem to generate a Xcode project.
>
> I completely remove Xcode 4.4.1 (and command line tools) and CMake 2.8.9.
>
> I reinstall Xcode 4.4.1 and command line tools and CMake 2.8.9.
>
> I had this error when I try to generate a XCode project ('cmake -GXcode .'):
>     xcodebuild: error: developer tools not installed; download from
>
> Thanks to Yu You, I apply this command:
>     sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
>
> And now I have the same error as previously:
> cmake -GXcode .
> -- The CXX compiler identification is GNU 4.2.1
> -- Checking whether CXX compiler has -isysroot
> -- Checking whether CXX compiler has -isysroot - yes
> -- Checking whether CXX compiler supports OSX deployment target flag
> -- Checking whether CXX compiler supports OSX deployment target flag - yes
> -- Check for working CXX compiler using: Xcode
> -- Check for working CXX compiler using: Xcode -- broken
> CMake Error at /Applications/CMake
> 2.8-9.app/Contents/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake:45
> (MESSAGE):
>   The C++ compiler "/usr/bin/llvm-g++" is not able to compile a simple test
>   program.
>
>   It fails with the following output:
>
>    Change Dir: /Users/rleguay/temp/test/DummyProject/CMakeFiles/CMakeTmp
>
>   Run Build Command:/Applications/CMake\ 2.8-9.app/Contents/bin/cmakexbuild
>   -project CMAKE_TRY_COMPILE.xcodeproj build -target
>   cmTryCompileExec2932044491 -configuration Debug
>
>   === BUILD NATIVE TARGET cmTryCompileExec2932044491 OF PROJECT
>   CMAKE_TRY_COMPILE WITH CONFIGURATION Debug ===
>
>   Check dependencies
>
>   CompileC
>
> CMAKE_TRY_COMPILE.build/Debug/cmTryCompileExec2932044491.build/Objects-normal/x86_64/testCXXCompiler.o
>   testCXXCompiler.cxx normal x86_64 c++
>   com.apple.compilers.llvm.clang.1_0.compiler
>
>       cd /Users/rleguay/temp/test/DummyProject/CMakeFiles/CMakeTmp
>       /Applications/Xcode.app/Contents/Developer/usr/bin/llvm-gcc-4.2 -x c++
> -arch x86_64 -fmessage-length=0 -Wno-trigraphs -fpascal-strings -O0
> -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type
> -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors
> -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function
> -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value
> -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants
> -Wno-conversion -Wno-sign-compare -Wno-shorten-64-to-32 -Wno-newline-eof
> -Wc++11-extensions "-DCMAKE_INTDIR=\"Debug\"" -i2012-08-10 11:13:51.477
> xcodebuild[1087:3603]  DVTAssertions: Warning in
> /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-1559/Xcode3Sources/XcodeIDE/Frameworks/DevToolsBase/pbxcore/SpecificationTypes/XCCommandLineToolSpecification.m:810
>
>   Details: Unable to get message category info for tool
>   '/Applications/Xcode.app/Contents/Developer/usr/bin/llvm-gcc-4.2'.
>
>   Reason: i686-apple-darwin11-llvm-gcc-4.2: no input files
>
>   Object: <XCCompilerSpecificationClang: 0x400afa520>
>
>   Method: -messageCategoryInfoForExecutablePath:
>
>   Thread: <NSThread: 0x40078a860>{name = (null), num = 4}
>
>   Please file a bug at http://bugreport.apple.com with this warning message
>   and any useful information you can provide.
>
>   sysroot
>
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
>   -fasm-blocks -Wdeprecated-declarations -Winvalid-offsetof
>   -mmacosx-version-min=10.7 -Wno-sign-conversion
>   -I/Users/rleguay/temp/test/DummyProject/CMakeFiles/CMakeTmp/Debug/include
>
> -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
>
> -I/Users/rleguay/temp/test/DummyProject/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTryCompileExec2932044491.build/DerivedSources/x86_64
>
> -I/Users/rleguay/temp/test/DummyProject/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTryCompileExec2932044491.build/DerivedSources
>   -Wmost -Wno-four-char-constants -Wno-unknown-pragmas
>   -F/Users/rleguay/temp/test/DummyProject/CMakeFiles/CMakeTmp/Debug -g -MMD
>   -MT dependencies -MF
>
> /Users/rleguay/temp/test/DummyProject/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTryCompileExec2932044491.build/Objects-normal/x86_64/testCXXCompiler.d
>   --serialize-diagnostics
>
> /Users/rleguay/temp/test/DummyProject/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTryCompileExec2932044491.build/Objects-normal/x86_64/testCXXCompiler.dia
>   -c
>
> /Users/rleguay/temp/test/DummyProject/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
>   -o
>
> /Users/rleguay/temp/test/DummyProject/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTryCompileExec2932044491.build/Objects-normal/x86_64/testCXXCompiler.o
>
>   i686-apple-darwin11-llvm-gcc-4.2:
>
> /Users/rleguay/temp/test/DummyProject/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTryCompileExec2932044491.build/Objects-normal/x86_64/testCXXCompiler.dia:
>   No such file or directory
>
>   cc1plus: error: unrecognized command line option
>   "-Wno-exit-time-destructors"
>
>   cc1plus: error: unrecognized command line option "-Wc++11-extensions"
>
>   cc1plus: error: unrecognized command line option "-Wno-sign-conversion"
>
>   cc1plus: error: unrecognized command line option "-fserialize-diagnostics"
>
>   Command /Applications/Xcode.app/Contents/Developer/usr/bin/llvm-gcc-4.2
>   failed with exit code 1
>
>   ** BUILD FAILED **
>
>   The following build commands failed:
>
>       CompileC
>
> CMAKE_TRY_COMPILE.build/Debug/cmTryCompileExec2932044491.build/Objects-normal/x86_64/testCXXCompiler.o
>   testCXXCompiler.cxx normal x86_64 c++
>   com.apple.compilers.llvm.clang.1_0.compiler
>
>   (1 failure)
>
>   CMake will not be able to correctly generate this project.
> Call Stack (most recent call first):
>   CMakeLists.txt:2 (project)
>
> -- Configuring incomplete, errors occurred!
>
> I think there is some problem to generate the cmTryCompileExec file because
> when I do:
>     sudo cmake -GXcode .
>
> I have no problem.
> Of course I have write access to my project folder so I don't really
> understand the problem here...
>
> If anyone has some clues ;).
>
> Regards,
> Romain LEGUAY
>
> Le 09/08/12 23:06, Bill Hoffman a écrit :
>
> On 8/9/2012 4:58 PM, Etuka Onono wrote:
>
> ichael and David, thanks for responding.  Rest assured that I always
> truncate my build directory when I come to a sticky halt with Cmake.
>
> Michael, I set a symmlink to /Developer/Applications/Xcode.app as you
> suggested, but this does not solve my problem (I know David had his
> doubts, I wanted to try anyway).  I do think you are right about it
> having something to do with information on older issues of Xcode,
> though, as I have a clean install of Xcode 4.4.1 and Cmake 2.8.8 that
> works (neither have been upgraded) and I have been as rigorous as I
> feel I can be in deleting all Cmake artefacts when installing Cmake
> 2.8.8 (removed anything vaguely related to Cmake in /Library and
> ~/Library, removed all the symmlinks in /usr/bin, etc).
>
>
>
> See this bug report:
>
> http://www.cmake.org/Bug/view.php?id=13353
>
> Trouble is here:
> xcodebuild: error: option '-buildstyle' is no longer supported
>
> Answer is : "Looks like it's no longer an issue with the final release of
> Xcode 4.4 and OS X 10.8. This issue can be closed. "
>
> -Bill
>
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
>
>
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake


More information about the CMake mailing list