paulrouget/servoshell

Xcode 9 support?

Closed this issue · 7 comments

Currently, servoshell 56be89a cannot build with Xcode 9 on macOS Sierra 10.12.6.

$ export OPENSSL_INCLUDE_DIR=`brew --prefix openssl`/include
export OPENSSL_LIB_DIR=`brew --prefix openssl`/lib
$ cargo build --release

causes build failure:

<snip>

cargo:rustc-link-search=framework=target/MMTabBarView/Release/

--- stderr
2017-09-21 11:38:32.760 ibtoold[19832:4986912] [MT] DVTPlugInLoading: Failed to load code for plug-in com.apple.dt.IDE.IDEInterfaceBuilderCocoaTouchIntegration (/Applications/Xcode.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework), error = Error Domain=NSCocoaErrorDomain Code=3587 "dlopen_preflight(/Applications/Xcode.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration): Library not loaded: /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator
  Referenced from: /Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/SimulatorKit.framework/Versions/A/SimulatorKit
  Reason: image not found" UserInfo={NSLocalizedFailureReason=The bundle is damaged or missing necessary resources., NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSFilePath=/Applications/Xcode.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration, NSDebugDescription=dlopen_preflight(/Applications/Xcode.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration): Library not loaded: /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator
  Referenced from: /Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/SimulatorKit.framework/Versions/A/SimulatorKit
  Reason: image not found, NSBundlePath=/Applications/Xcode.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework, NSLocalizedDescription=The bundle “IDEInterfaceBuilderCocoaTouchIntegration” couldn’t be loaded because it is damaged or missing necessary resources.}, dyldError = dlopen(/Applications/Xcode.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration, 0): Library not loaded: /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator
  Referenced from: /Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/SimulatorKit.framework/Versions/A/SimulatorKit
  Reason: image not found
2017-09-21 11:38:32.760 ibtoold[19832:4986912] [MT] DVTPlugInExtensionFaulting: Failed to fire fault for extension Xcode.InterfaceBuilderKit.iOSIntegration.Singletons: Error Domain=DVTPlugInErrorDomain Code=2 "Loading a plug-in failed." UserInfo={DVTPlugInIdentifierErrorKey=com.apple.dt.IDE.IDEInterfaceBuilderCocoaTouchIntegration, DVTPlugInExecutablePathErrorKey=/Applications/Xcode.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration, NSLocalizedRecoverySuggestion=The plug-in or one of its prerequisite plug-ins may be missing or damaged and may need to be reinstalled., DVTPlugInDYLDErrorMessageErrorKey=dlopen(/Applications/Xcode.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration, 0): Library not loaded: /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator
  Referenced from: /Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/SimulatorKit.framework/Versions/A/SimulatorKit
  Reason: image not found, NSLocalizedDescription=Loading a plug-in failed., NSFilePath=/Applications/Xcode.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework, NSLocalizedFailureReason=The plug-in “com.apple.dt.IDE.IDEInterfaceBuilderCocoaTouchIntegration” at path “/Applications/Xcode.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework” could not be loaded.  The plug-in or one of its prerequisite plug-ins may be missing or damaged., NSUnderlyingError=0x7fd27c4a6af0 {Error Domain=NSCocoaErrorDomain Code=3587 "dlopen_preflight(/Applications/Xcode.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration): Library not loaded: /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator
  Referenced from: /Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/SimulatorKit.framework/Versions/A/SimulatorKit
  Reason: image not found" UserInfo={NSLocalizedFailureReason=The bundle is damaged or missing necessary resources., NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSFilePath=/Applications/Xcode.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration, NSDebugDescription=dlopen_preflight(/Applications/Xcode.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration): Library not loaded: /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator
  Referenced from: /Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/SimulatorKit.framework/Versions/A/SimulatorKit
  Reason: image not found, NSBundlePath=/Applications/Xcode.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework, NSLocalizedDescription=The bundle “IDEInterfaceBuilderCocoaTouchIntegration” couldn’t be loaded because it is damaged or missing necessary resources.}}}
2017-09-21 11:38:32.769 ibtoold[19832:4986912] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error getting value for parameter key 'name' of extension 'Xcode.InterfaceBuilderKit.iOSIntegration.Singletons' in plug-in 'com.apple.dt.IDE.IDEInterfaceBuilderiOSIntegration''
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fffbe2742cb __exceptionPreprocess + 171
	1   libobjc.A.dylib                     0x00007fffd308448d objc_exception_throw + 48
	2   DVTFoundation                       0x000000010e82faad -[DVTExtensionParameter valueForKey:error:] + 0
	3   IDEInterfaceBuilderKit              0x000000010dfbcb4d -[IBScopedSingletonRegistry init] + 722
	4   IDEInterfaceBuilderKit              0x000000010dfbc861 __43+[IBScopedSingletonRegistry sharedInstance]_block_invoke + 41
	5   libdispatch.dylib                   0x00007fffd39348fc _dispatch_client_callout + 8
	6   libdispatch.dylib                   0x00007fffd39348b9 dispatch_once_f + 38
	7   IDEInterfaceBuilderKit              0x000000010dfbc835 +[IBScopedSingletonRegistry sharedInstance] + 45
	8   IDEInterfaceBuilderKit              0x000000010ddd6689 -[IBInterfaceBuilderPlugin init] + 146
	9   IDEInterfaceBuilderKit              0x000000010ddd65dd +[IBInterfaceBuilderPlugin ide_initializeWithOptions:error:] + 34
	10  IDEFoundation                       0x000000010f161cce _IDEInitializeOnePlugInAndPrerequisites + 2324
	11  IDEFoundation                       0x000000010f1615d5 _IDEInitializeOnePlugInAndPrerequisites + 539
	12  IDEFoundation                       0x000000010f1615d5 _IDEInitializeOnePlugInAndPrerequisites + 539
	13  IDEFoundation                       0x000000010f15fcca _IDEInitializePlugIns + 1604
	14  IDEFoundation                       0x000000010f15f081 IDEInitialize + 8547
	15  ibtoold                             0x000000010dad55a9 ibtoold + 71081
	16  ibtoold                             0x000000010dad4724 ibtoold + 67364
	17  libdyld.dylib                       0x00007fffd396a235 start + 1
	18  ???                                 0x0000000000000007 0x0 + 7
)
libc++abi.dylib: terminating with uncaught exception of type NSException
thread 'main' panicked at 'ibtool failed', build.rs:42:8
note: Run with `RUST_BACKTRACE=1` for a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed
  • Complete build log:

servoshell-build.log.zip

Does it help if you do: xcode-select --install ?

xcode-select --install says:

% sudo xcode-select --install
Password:
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

I've updated xcode. But I can't seem to be able to reproduce.

What happens when you just type:

xcodebuild -project ./src/platform/cocoa/MMTabBarView/MMTabBarView/MMTabBarView.xcodeproj -configuration Release SYMROOT=../../../../../target/MMTabBarView/

I got build success.

% xcodebuild -project ./src/platform/cocoa/MMTabBarView/MMTabBarView/MMTabBarView.xcodeproj -configuration Release SYMROOT=../../../../../target/MMTabBarView/
Build settings from command line:
    SYMROOT = ../../../../../target/MMTabBarView/

=== BUILD TARGET MMTabBarView OF PROJECT MMTabBarView WITH CONFIGURATION Release ===

Check dependencies

<snip>
Touch /Users/cosmo/GitHub/servoshell/target/MMTabBarView/Release/MMTabBarView.framework
    cd /Users/cosmo/GitHub/servoshell/src/platform/cocoa/MMTabBarView/MMTabBarView
    /usr/bin/touch -c /Users/cosmo/GitHub/servoshell/target/MMTabBarView/Release/MMTabBarView.framework

** BUILD SUCCEEDED **

what about ibtool ./src/platform/cocoa/xib/App.xib --compile /tmp/foo.nib ?

Can you just open xcode to make sure all your components are up to date?

Oops, Xcode insists to install additional components.
Lack of Xcode components installation causes this issue.
Thanks for your support to my idiot mistake.