View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013144CMakeCMakepublic2012-04-18 11:132013-01-09 10:57
ReporterLukas Mezera 
Assigned ToDavid Cole 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionCMake 2.8.10Fixed in VersionCMake 2.8.10 
Summary0013144: Compatibility with Xcode 4.2 (Build 4C199)
DescriptionI try to compile my project using CMake (cmake v2.8.7-860-g32e0b19 - master and v2.8.7-3470-g19f003f - next) and Xcode 4.2. Mac OS X 10.6.8.

The build ended with error "xcodebuild: error: option '-buildstyle' is no longer supported". Whole log is attached as Additional Information.

I think that this problem is related to 0012621

Note: I am able to test everything what you need.
Additional Information/Users/lukasmezera/cmake/bin/cmake -G Xcode ..
-- The C compiler identification is GNU 4.2.1
-- The CXX compiler identification is GNU 4.2.1
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler using: Xcode
-- Check for working C compiler using: Xcode -- broken
CMake Error at /Users/lukasmezera/cmake/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
  The C compiler "/usr/bin/gcc" is not able to compile a simple test program.

  It fails with the following output:

   Change Dir: /iPhoneCheckout/iPhone/bin/CMakeFiles/CMakeTmp

  

  Run Build Command:/Users/lukasmezera/cmake/bin/cmakexbuild -project
  CMAKE_TRY_COMPILE.xcode build -target cmTryCompileExec3550203041
  -buildstyle Development

  xcodebuild: error: option '-buildstyle' is no longer supported

  

  Usage: xcodebuild [-project <projectname>] [[-target
  <targetname>]...|-alltargets] [-configuration <configurationname>] [-arch
  <architecture>]... [-sdk [<sdkname>|<sdkpath>]]
  [<buildsetting>=<value>]... [<buildaction>]...

         xcodebuild [-project <projectname>] -scheme <schemeName> [-configuration <configurationname>] [-arch <architecture>]... [-sdk [<sdkname>|<sdkpath>]] [<buildsetting>=<value>]... [<buildaction>]...
         xcodebuild -workspace <workspacename> -scheme <schemeName> [-configuration <configurationname>] [-arch <architecture>]... [-sdk [<sdkname>|<sdkpath>]] [<buildsetting>=<value>]... [<buildaction>]...
         xcodebuild -version [-sdk [<sdkfullpath>|<sdkname>] [<infoitem>] ]
         xcodebuild -list [[-project <projectname>]|[-workspace <workspacename>]]
         xcodebuild -showsdks

  Options:

      -usage print full usage
      -verbose provide additional status output
      -project NAME build the project NAME
      -target NAME build the target NAME
      -alltargets build all targets
      -workspace NAME build the workspace NAME
      -scheme NAME build the scheme NAME
      -configuration NAME use the build configuration NAME for building each target
      -xcconfig PATH apply the build settings defined in the file at PATH as overrides
      -arch ARCH build each target for the architecture ARCH; this will override architectures defined in the project
      -sdk SDK use SDK as the name or path of the base SDK when building the project
      -parallelizeTargets build independent targets in parallel
      -jobs NUMBER specify the maximum number of concurrent build operations
      -showsdks display a compact list of the installed SDKs
      -list lists the targets and configurations in a project, or the schemes in a workspace
      -find BINARY display the full path to BINARY in the provided SDK
      -version display the version of Xcode; with -sdk will display info about one or all installed SDKs

  

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:7 (project)
TagsNo tags attached.
Attached Files? file icon patch [^] (3,578 bytes) 2012-05-06 23:49 [Show Content]

 Relationships
related to 0012621closedDavid Cole Compatibility with Xcode 4.3 
related to 0013463closedBrad King Bug 12621 is maybe back 

  Notes
(0029218)
David Cole (manager)
2012-04-18 13:29

We have code in the Xcode generator that looks like this:

  if(this->XcodeVersion == 15)
    {
    makeCommand += " -buildstyle Development ";
    }

Furthermore, that's the only occurrence of the string "buildstyle" in our entire source tree:

$ git grep buildstyle
Source/cmGlobalXCodeGenerator.cxx: makeCommand += " -buildstyle Development ";

...which means that CMake thinks you have an Xcode version 1.5 installed as the "selected" Xcode.

What does "xcode-select -print-path" yield on your machine? (Is it the same as the Xcode 4.2 installation that you think it should be?)

Do you by any chance have multiple versions of Xcode installed? (Most, if not all, of our dashboards have a single version of Xcode installed/available.)
(0029219)
David Cole (manager)
2012-04-18 13:30

And..... can you please try this same exact thing with CMake 2.8.7 on that machine?

I'd really like to know if this problem is a regression that has been introduced recently, or if it's an existing problem, and we have just never encountered this particular setup on one of our own Macs.

Thanks!
(0029220)
David Cole (manager)
2012-04-18 13:31

One more note: I've tried to reproduce this on my own machine which is running Lion OSX 10.7.3 with Xcode 4.2.1 (4D502) installed.

I can't reproduce it here.
(0029225)
Lukas Mezera (reporter)
2012-04-19 02:39

"xcode-select -print-path" command prints path where Xcode 4.2 is installed - /Xcode 4.2.

I have the same problem with CMake 2.8.7. It was the reason why I try to compile you origin/master and origin/next branches.

I have installed two version of Xcode. Xcode 3.2.6 and Xcode 4.2. So problem is probably when you have multiple version of Xcode.

I will try to uninstall both Xcode versions and then install only Xcode 4.2 and I will write you if everything is ok.
(0029301)
Lukas Mezera (reporter)
2012-04-23 04:41

I tried to uninstall Xcode 3.2.6 and Xcode 4.2 and install Xcode 4.2 again. Now I have only one version of Xcode 4.2 and everything works well.
(0029305)
David Cole (manager)
2012-04-23 08:29

It really should work with multiple Xcode versions installed... I'll try to duplicate such on environment on one of our machines here and see what the root problem is. It should work with the "active" Xcode according to xcode-select.
(0029407)
Wade Tregaskis (reporter)
2012-05-06 16:36

I'm seeing the same thing, on a Lion machine that's never seen a version of Xcode prior to 4.{whatever-was-the-first-Lion-GM-version}.

$ /usr/bin/xcode-select -print-path
/Applications/Developer/Xcode.app/Contents/Developer
$ /Applications/Developer/Xcode.app/Contents/Developer/usr/bin/xcodebuild -version
Xcode 4.3.2
Build version 4E2002
(0029408)
Wade Tregaskis (reporter)
2012-05-06 23:48
edited on: 2012-05-06 23:50

The code for detecting the current Xcode version is broken. The following is a quick and dirty patch which fixes it. [FYI: I tried following the instructions in the wiki on how to push this back, but either the instructions are wrong/incomplete, or git on my machine doesn't work the way it's described as working by those instructions. ]

[Update: patch attached instead; the indentation got mangled when pasting it here, inline]

(0030615)
David Cole (manager)
2012-08-13 15:32

This should be fixed by the same commit that fixed related issue 0013463 -- let us know if that's not the case. That fix should be in nightly builds of CMake from today forward.

Thanks.
(0032056)
Robert Maynard (manager)
2013-01-09 10:57

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

 Issue History
Date Modified Username Field Change
2012-04-18 11:13 Lukas Mezera New Issue
2012-04-18 11:40 Brad King Assigned To => David Cole
2012-04-18 11:40 Brad King Status new => assigned
2012-04-18 11:40 Brad King Relationship added related to 0012621
2012-04-18 13:29 David Cole Note Added: 0029218
2012-04-18 13:30 David Cole Note Added: 0029219
2012-04-18 13:31 David Cole Note Added: 0029220
2012-04-19 02:39 Lukas Mezera Note Added: 0029225
2012-04-23 04:41 Lukas Mezera Note Added: 0029301
2012-04-23 08:29 David Cole Note Added: 0029305
2012-05-06 16:36 Wade Tregaskis Note Added: 0029407
2012-05-06 23:48 Wade Tregaskis Note Added: 0029408
2012-05-06 23:49 Wade Tregaskis File Added: patch
2012-05-06 23:50 Wade Tregaskis Note Edited: 0029408
2012-08-13 15:31 David Cole Relationship added related to 0013463
2012-08-13 15:32 David Cole Note Added: 0030615
2012-08-13 15:32 David Cole Status assigned => resolved
2012-08-13 15:32 David Cole Fixed in Version => CMake 2.8.10
2012-08-13 15:32 David Cole Resolution open => fixed
2012-08-13 15:32 David Cole Target Version => CMake 2.8.10
2013-01-09 10:57 Robert Maynard Note Added: 0032056
2013-01-09 10:57 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team