Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xcode 14.1 xcodebuild fails to build OCHamrest #92

Closed
alexbartisro opened this issue Dec 16, 2022 · 6 comments
Closed

Xcode 14.1 xcodebuild fails to build OCHamrest #92

alexbartisro opened this issue Dec 16, 2022 · 6 comments

Comments

@alexbartisro
Copy link

alexbartisro commented Dec 16, 2022

Hello!

I was wondering if anyone else has this issue under Xcode 14.1 and .2. when installing under Carthage

carthage update --platform iOS --use-xcframeworks --use-netrc --cache-builds --no-use-binaries --derived-data ./derivedData

shell task (/usr/bin/xcrun xcodebuild -project /Users/[myProject]/Carthage/Checkouts/OCHamcrest/Source/OCHamcrest.xcodeproj -scheme libochamcrest -configuration Release CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -showBuildSettings -skipUnavailableActions) failed with exit code 6: 2022-12-16 09:07:12.460 xcodebuild[88170:616009] DVTAssertions: Warning in /System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot1/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-21506/DTDeviceKitBase/DTDKRemoteDeviceData.m:382 Details: (null) deviceType from 00008103-000610181EE3401E was NULL when -platform called. Object: <DTDKMobileDeviceToken: 0x115a07b00> Method: -platform Thread: <NSThread: 0x6000029e24c0>{number = 7, name = (null)}

basically it fails to build libochamcrest.

I'm getting to OCHamcrest as a dependency of OCMockito where I set it to the latest 9.0.1

https://github.com/alexbartisro/OCMockito/tree/fix-xcode13

@jonreid
Copy link
Member

jonreid commented Mar 8, 2023

No idea. Using Carthage 0.39.0 with Xcode 14.2, I do

carthage build --configuration Release --no-skip-current --use-xcframeworks

The output is:

*** xcodebuild output can be found in /var/folders/tg/h4rcf38d6f7dx4tj_jhz74fh0000gp/T/carthage-xcodebuild.8XQTHa.log
A shell task (/usr/bin/xcrun xcodebuild -project /Users/jmreid/Developer/Hamcrest/OCHamcrest/Source/OCHamcrest.xcodeproj -scheme libochamcrest -configuration Release CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -showBuildSettings -skipUnavailableActions) failed with exit code 6:
2023-03-07 18:21:47.522 xcodebuild[73552:2071843] [MT] DVTAssertions: ASSERTION FAILURE in /System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot2/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-21534/IDEFoundation/Execution/RunDestinations/IDERunDestinationCLI.m:566
Details:  Unhandled/unexpected case where no run destinations were produced.
Object:   <IDERunDestinationCLI>
Method:   +resolveRunDestinationsWithWorkspace:scheme:buildAction:schemeCommand:schemeTask:destinationSpecifications:architectures:timeout:runDestinationManager:deviceManager:fallbackPreferredSDK:fallbackPreferredArchitectures:skipUnsupportedDestinations:shouldSkipRunDestinationValidation:didDisambiguate:disambiguatedMatches:disambiguatedMatchesDescription:error:
Thread:   <_NSMainThread: 0x6000019c0180>{number = 1, name = main}
Hints:

Backtrace:
  0   -[DVTAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in DVTFoundation)
  1   _DVTAssertionHandler (in DVTFoundation)
  2   _DVTAssertionFailureHandler (in DVTFoundation)
  3   _sortDevicesForDisplay (in IDEFoundation)
  4   -[Xcode3CommandLineBuildTool _resolveRunDestinationsForBuildAction:] (in Xcode3Core)
  5   -[Xcode3CommandLineBuildTool _resolveInputOptionsWithTimingSection:] (in Xcode3Core)
  6   -[Xcode3CommandLineBuildTool run] (in Xcode3Core)
  7   XcodeBuildMain (in libxcodebuildLoader.dylib)
  8   start (in dyld)

I've disabled the Carthage Build step in CI for now 😢

@jonreid
Copy link
Member

jonreid commented Mar 8, 2023

Note that xcodebuild itself has no such problem. ./makeXCFramework.sh works fine.

@DivineDominion
Copy link

DivineDominion commented Jun 8, 2023

Works on my machine:tm: (Xcode 14.3.1) when checking out main.

$ carthage build --no-skip-current --use-xcframeworks
$ carthage build --configuration Release --no-skip-current --use-xcframeworks

(Had to install tvOS and watchOS devices first)

@jonreid
Copy link
Member

jonreid commented Jun 11, 2023

Great news… thanks for checking, @DivineDominion!

GitHub is still running Xcode 14.2 (even if I specify macos-13), so Carthage still fails in the workflow build. I'm going to leave this open as a reminder to try again when GitHub updates Xcode.

@jonreid
Copy link
Member

jonreid commented Jul 2, 2023

Still 14.2 on macos-13, despite what their documentation says. Will try again later.

@jonreid
Copy link
Member

jonreid commented Aug 13, 2023

After some time, I discovered that while Xcode 14.3 is available on macOS-13, it's not the default. Specifying which Xcode to use fixed things. I finally get to close this 😌

@jonreid jonreid closed this as completed Aug 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants