View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015455CMakeCMakepublic2015-03-18 11:402015-11-02 09:13
Reporterqklxtlx 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionno change required 
PlatformApple MacOSOS XOS Version10.4.10
Product VersionCMake 3.2.1 
Target VersionFixed in Version 
Summary0015455: Xcode 6.2 cannot be detected
DescriptionAfter upgrading to Xcode 6.2 with corresponding command line tools, I cannot generate xcodeproj any more. Unix Makefile works correctly though.
Steps To ReproduceA simple CMakeLists.txt:
    project(HELLO)
    set(SRC_LIST main.c)
    add_executable(hello ${SRC_LIST})

This is the error log with `cmake -G "Xcode" .`

➜ /Users/anthony/Downloads/test >cmake -G "Xcode" .
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Check for working C compiler using: Xcode
-- Check for working C compiler using: Xcode -- broken
CMake Error at /usr/local/Cellar/cmake/3.2.1/share/cmake/Modules/CMakeTestCCompiler.cmake:61 (message):
  The C compiler
  "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
  is not able to compile a simple test program.

  It fails with the following output:

   Change Dir: /Users/anthony/Downloads/test/CMakeFiles/CMakeTmp



  Run Build
  Command:"/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild"
  "-project" "CMAKE_TRY_COMPILE.xcodeproj" "build" "-target"
  "cmTryCompileExec1075155225" "-configuration" "Debug"

  === BUILD TARGET cmTryCompileExec1075155225 OF PROJECT CMAKE_TRY_COMPILE
  WITH CONFIGURATION Debug ===



  Check dependencies



  Write auxiliary files

  /bin/mkdir -p
  /Users/anthony/Downloads/test/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTryCompileExec1075155225.build/Objects-normal/x86_64


  write-file
  /Users/anthony/Downloads/test/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTryCompileExec1075155225.build/Objects-normal/x86_64/cmTryCompileExec1075155225.LinkFileList




  CompileC
  CMAKE_TRY_COMPILE.build/Debug/cmTryCompileExec1075155225.build/Objects-normal/x86_64/testCCompiler.o
  testCCompiler.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler

      cd /Users/anthony/Downloads/test/CMakeFiles/CMakeTmp
      export LANG=en_US.US-ASCII
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -DCMAKE_INTDIR=\"Debug\" -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -mmacosx-version-min=10.10 -Wno-sign-conversion -I/Users/anthony/Downloads/test/CMakeFiles/CMakeTmp/Debug/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/anthony/Downloads/test/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTryCompileExec1075155225.build/DerivedSources/x86_64 -I/Users/anthony/Downloads/test/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTryCompileExec1075155225.build/DerivedSources -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -F/Users/anthony/Downloads/test/CMakeFiles/CMakeTmp/Debug -MMD -MT dependencies -MF /Users/anthony/Downloads/test/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTryCompileExec1075155225.build/Objects-normal/x86_64/testCCompiler.d --serialize-diagnostics /Users/anthony/Downloads/test/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTryCompileExec1075155225.build/Objects-normal/x86_64/testCCompiler.dia -c /Users/anthony/Downloads/test/CMakeFiles/CMakeTmp/testCCompiler.c -o /Users/anthony/Downloads/test/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTryCompileExec1075155225.build/Objects-normal/x86_64/testCCompiler.o



  Ld Debug/cmTryCompileExec1075155225 normal x86_64

      cd /Users/anthony/Downloads/test/CMakeFiles/CMakeTmp
      export MACOSX_DEPLOYMENT_TARGET=10.10
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -L/Users/anthony/Downloads/test/CMakeFiles/CMakeTmp/Debug -F/Users/anthony/Downloads/test/CMakeFiles/CMakeTmp/Debug -filelist /Users/anthony/Downloads/test/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTryCompileExec1075155225.build/Objects-normal/x86_64/cmTryCompileExec1075155225.LinkFileList -mmacosx-version-min=10.10 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -force_load /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/CoreService.framework/CoreService -Xlinker -dependency_info -Xlinker /Users/anthony/Downloads/test/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTryCompileExec1075155225.build/Objects-normal/x86_64/cmTryCompileExec1075155225_dependency_info.dat -o /Users/anthony/Downloads/test/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec1075155225

  ld: warning: ObjC object file
  (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/CoreService.framework/CoreService)
  was compiled for iOS Simulator, but linking for MacOSX

  ld: framework not found CoreImage for architecture x86_64

  clang: error: linker command failed with exit code 1 (use -v to see
  invocation)



  ** BUILD FAILED **





  The following build commands failed:

      Ld Debug/cmTryCompileExec1075155225 normal x86_64

  (1 failure)





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


-- Configuring incomplete, errors occurred!
See also "/Users/anthony/Downloads/test/CMakeFiles/CMakeOutput.log".
See also "/Users/anthony/Downloads/test/CMakeFiles/CMakeError.log".
TagsXcode
Attached Fileslog file icon CMakeError.log [^] (32,800 bytes) 2015-03-19 07:46
log file icon CMakeOutput.log [^] (40 bytes) 2015-03-19 07:46
? file icon project.pbxproj [^] (2,740 bytes) 2015-03-19 08:55

 Relationships

  Notes
(0038243)
Brad King (manager)
2015-03-18 15:23

I cannot reproduce this. I installed Xcode 6.2 and the CMake 3.2.1 Xcode generator works for me.

Look in the log files mentioned at the end of the output to see if there is more information.
(0038256)
qklxtlx (reporter)
2015-03-19 07:47

I've posted two log files. It seems try_compile links iPhone SDK.
But I'm wondering why AppleClang is not recognised.
(0038257)
Brad King (manager)
2015-03-19 08:37

Re 0015455:0038256: Thanks. The logged Ld command for the compiler id is identical to mine except that yours has an extra flag:

  -force_load /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/CoreService.framework/CoreService

I don't think CMake is generating anything for that, but you can check the compiler id project file in

 CMakeFiles/3.2.1/CompilerIdC/CompilerIdC.xcodeproj/project.pbxproj

Please attach that file here.

I found a post about a similar problem here:

 http://stackoverflow.com/questions/29059858/xcode-6-2-force-load-ios-frameworks-in-osx-projects [^]
(0038258)
qklxtlx (reporter)
2015-03-19 08:57

The SO post looks the same. I've upload project.pbxproj.
Also, I've double checked Xcode 6.2 and command line for xcode 6.2 & osx 10.10 are installed correctly.
(0038260)
qklxtlx (reporter)
2015-03-19 12:34

Wooops, It seems xcode 6.2 is buggy :(

I recreate a new command line project and it fails with the same reason.
(0038261)
qklxtlx (reporter)
2015-03-19 23:13

Finally I down grade to Xcode 6.1.1 and everything works.
How could I close this issue?

Thanks for your help!
(0038262)
Brad King (manager)
2015-03-20 08:55

Okay, thanks for reporting back.
(0039738)
Robert Maynard (manager)
2015-11-02 09:13

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2015-03-18 11:40 qklxtlx New Issue
2015-03-18 11:41 qklxtlx Tag Attached: Xcode
2015-03-18 15:23 Brad King Note Added: 0038243
2015-03-19 07:46 qklxtlx File Added: CMakeError.log
2015-03-19 07:46 qklxtlx File Added: CMakeOutput.log
2015-03-19 07:47 qklxtlx Note Added: 0038256
2015-03-19 08:37 Brad King Note Added: 0038257
2015-03-19 08:55 qklxtlx File Added: project.pbxproj
2015-03-19 08:57 qklxtlx Note Added: 0038258
2015-03-19 12:34 qklxtlx Note Added: 0038260
2015-03-19 23:13 qklxtlx Note Added: 0038261
2015-03-20 08:55 Brad King Note Added: 0038262
2015-03-20 08:55 Brad King Status new => resolved
2015-03-20 08:55 Brad King Resolution open => no change required
2015-11-02 09:13 Robert Maynard Note Added: 0039738
2015-11-02 09:13 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team