{"action":"opened","issue":{"url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/1537","labels_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/1537/labels{/name}","comments_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/1537/comments","events_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/1537/events","html_url":"https://github.com/lionheart/openradar-mirror/issues/1537","id":98724250,"number":1537,"title":"20490378: xcodebuild nondeterministically selects implicit dependencies for the wrong platform","user":{"login":"openradar-mirror","id":13605213,"avatar_url":"https://avatars.githubusercontent.com/u/13605213?v=3","gravatar_id":"","url":"https://api.github.com/users/openradar-mirror","html_url":"https://github.com/openradar-mirror","followers_url":"https://api.github.com/users/openradar-mirror/followers","following_url":"https://api.github.com/users/openradar-mirror/following{/other_user}","gists_url":"https://api.github.com/users/openradar-mirror/gists{/gist_id}","starred_url":"https://api.github.com/users/openradar-mirror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openradar-mirror/subscriptions","organizations_url":"https://api.github.com/users/openradar-mirror/orgs","repos_url":"https://api.github.com/users/openradar-mirror/repos","events_url":"https://api.github.com/users/openradar-mirror/events{/privacy}","received_events_url":"https://api.github.com/users/openradar-mirror/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lionheart/openradar-mirror/labels/classification:serious%20bug","name":"classification:serious bug","color":"e11d21"},{"url":"https://api.github.com/repos/lionheart/openradar-mirror/labels/reproducible:always","name":"reproducible:always","color":"5319e7"},{"url":"https://api.github.com/repos/lionheart/openradar-mirror/labels/status:open","name":"status:open","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/lionheart/openradar-mirror/milestones/1","html_url":"https://github.com/lionheart/openradar-mirror/milestones/Developer%20Tools","labels_url":"https://api.github.com/repos/lionheart/openradar-mirror/milestones/1/labels","id":1237415,"number":1,"title":"Developer Tools","description":null,"creator":{"login":"openradar-mirror","id":13605213,"avatar_url":"https://avatars.githubusercontent.com/u/13605213?v=3","gravatar_id":"","url":"https://api.github.com/users/openradar-mirror","html_url":"https://github.com/openradar-mirror","followers_url":"https://api.github.com/users/openradar-mirror/followers","following_url":"https://api.github.com/users/openradar-mirror/following{/other_user}","gists_url":"https://api.github.com/users/openradar-mirror/gists{/gist_id}","starred_url":"https://api.github.com/users/openradar-mirror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openradar-mirror/subscriptions","organizations_url":"https://api.github.com/users/openradar-mirror/orgs","repos_url":"https://api.github.com/users/openradar-mirror/repos","events_url":"https://api.github.com/users/openradar-mirror/events{/privacy}","received_events_url":"https://api.github.com/users/openradar-mirror/received_events","type":"User","site_admin":false},"open_issues":538,"closed_issues":0,"state":"open","created_at":"2015-08-03T02:08:29Z","updated_at":"2015-08-03T11:35:49Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2015-08-03T11:35:49Z","updated_at":"2015-08-03T11:35:49Z","closed_at":null,"body":"#### Description\n\nSummary:\nGiven a workspace building a framework for iOS & Mac, with two dependency frameworks (also both for iOS & Mac), xcodebuild nondeterministically selects the wrong target (i.e. iOS for Mac, or Mac for iOS) for one or both dependencies. It still seems to build for the Mac (although how is unclear), but it fails when building for iOS, because code signing isn’t enabled in the Mac targets.\n\nPossibly relevant details:\n- all 3 frameworks are built by targets whose names have the platform name as a suffix, e.g. Either-iOS, Either-Mac.\n- all 3 frameworks use the same product name for Mac & iOS, e.g. Prelude.framework.\n- all 6 schemes have “find implicit dependencies” enabled.\n\n\nSteps to Reproduce:\n1. Clone https://github.com/robrix/Either & its dependencies\n\n    git clone --recursive https://github.com/robrix/Either.git\n\n2. cd into the repo.\n\n3. Build the Mac scheme a few times, paying attention to which targets it builds:\n\n    xcodebuild -configuration Release -sdk (xcrun --show-sdk-path --sdk macosx) -workspace Either.xcworkspace/ -scheme Either-Mac\n\n4. Build the iOS scheme a few times, paying attention to which targets it builds:\n\n    xcodebuild -configuration Release -sdk (xcrun --show-sdk-path --sdk iphoneos) -workspace Either.xcworkspace/ -scheme Either-iOS\n\n\nExpected Results:\nI expected it to build the targets for the platform I specified, and no other platform. I expected all builds to succeed.\n\n\nActual Results:\nIt builds the target for the specified platform for the root framework, but arbitrarily selects between iOS and Mac for the dependency targets. On iOS builds, this means that 3/4 builds fail.\n\n\nRegression:\nN/A\n\n\nNotes:\nSample output follows;\n\nMac:\n\nBuild settings from command line:\n    SDKROOT = macosx10.10\n\n=== BUILD TARGET Prelude-iOS OF PROJECT Prelude WITH CONFIGURATION Release ===\n\nCheck dependencies\n\n=== BUILD TARGET Box-iOS OF PROJECT Box WITH CONFIGURATION Release ===\n\nCheck dependencies\n\n=== BUILD TARGET Either-Mac OF PROJECT Either WITH CONFIGURATION Release ===\n\nCheck dependencies\n\n** BUILD SUCCEEDED **\n\n\niOS:\n\nBuild settings from command line:\n    SDKROOT = iphoneos8.3\n\n=== BUILD TARGET Box-Mac OF PROJECT Box WITH CONFIGURATION Release ===\n\nCheck dependencies\nCodeSign error: code signing is required for product type 'Framework' in SDK 'iOS 8.3'\n\n=== BUILD TARGET Prelude-Mac OF PROJECT Prelude WITH CONFIGURATION Release ===\nCheck dependencies\nCodeSign error: code signing is required for product type 'Framework' in SDK 'iOS 8.3'\n\n** BUILD FAILED **\n\n\nThe following build commands failed:\n\tCheck dependencies\n\tCheck dependencies\n(2 failures)\n\n\n\nThis is a serious blocker for Carthage (cf https://github.com/Carthage/Carthage/issues/418 ). It’s possible that renaming the products per-platform would work around this issue, but migrating a _very_ large number of targets & every project using them is intractable. Other workarounds would be greatly appreciated, however :)\n\nThank you!\n\n-\nProduct Version: Xcode 6.3 (6D570)\nCreated: 2015-04-09T22:36:12.342603\nOriginated: 2015-04-09T18:35:00\nOpen Radar Link: http://www.openradar.me/20490378"}}