Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#54889 closed defect (worksforme)

MacVim @8.0.snapshot137_1+huge: Failed to patch on macOS 10.13 (build failed)

Reported by: vovinacci (Volodymyr 'vovin' Shcherbinin) Owned by: raimue (Rainer Müller)
Priority: Normal Milestone:
Component: ports Version: 2.4.99
Keywords: highsierra Cc: skymoo (Adam Mercer)
Port: MacVim

Description

MacVim @8.0.snapshot137_1+huge: Failed to patch on macOS 10.13 (build failed)

:notice:patch --->  Applying patches to MacVim
:info:patch --->  Applying patch-MacVim-GCC-VERSION.diff
:debug:patch Environment:
:debug:patch CC_PRINT_OPTIONS='YES'
:debug:patch CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_editors_MacVim/MacVim/work/.CC_PRINT_OPTIONS'
:debug:patch CPATH='/opt/local/include'
:debug:patch LIBRARY_PATH='/opt/local/lib'
:debug:patch MACOSX_DEPLOYMENT_TARGET='10.13'
:info:patch Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_editors_MacVim/MacVim/work/macvim-137" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/editors/MacVim/files/patch-MacVim-GCC-VERSION.diff'
:debug:patch system:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_editors_MacVim/MacVim/work/macvim-137" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/editors/MacVim/files/patch-MacVim-GCC-VERSION.diff'
:info:patch patching file src/MacVim/MacVim.xcodeproj/project.pbxproj
:info:patch Reversed (or previously applied) patch detected!  Assume -R? [n]
:info:patch Apply anyway? [n]
:info:patch Skipping patch.
:info:patch 2 out of 2 hunks ignored -- saving rejects to file src/MacVim/MacVim.xcodeproj/project.pbxproj.rej
:info:patch Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_editors_MacVim/MacVim/work/macvim-137" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/editors/MacVim/files/patch-MacVim-GCC-VERSION.diff'
:info:patch Exit code: 1
:error:patch Failed to patch MacVim: command execution failed
:debug:patch Error code: CHILDSTATUS 1748 1
:debug:patch Backtrace: command execution failed
:debug:patch     while executing
:debug:patch "system {*}$notty {*}$nice $fullcmdstring"
:debug:patch     invoked from within
:debug:patch "command_exec patch "" "< '$patch'""
:debug:patch     (procedure "portpatch::patch_main" line 33)
:debug:patch     invoked from within
:debug:patch "$procedure $targetname"
:error:patch See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_editors_MacVim/MacVim/main.log for details.

Attachments (2)

main.log (31.5 KB) - added by vovinacci (Volodymyr 'vovin' Shcherbinin) 7 years ago.
after-patch-removed-main.log (51.8 KB) - added by vovinacci (Volodymyr 'vovin' Shcherbinin) 7 years ago.

Download all attachments as: .zip

Change History (14)

Changed 7 years ago by vovinacci (Volodymyr 'vovin' Shcherbinin)

Attachment: main.log added

comment:1 Changed 7 years ago by vovinacci (Volodymyr 'vovin' Shcherbinin)

Could this patch be skipped? It's about removing explicit requirement for gcc 4.2

As taking a look on src/MacVim/MacVim.xcodeproj/project.pbxproj , it seems that it's nor required anymore

% grep GCC_VERSION /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/editors/MacVim/work/macvim-137/src/MacVim/MacVim.xcodeproj/project.pbxproj
				GCC_VERSION = "";
				GCC_VERSION = "";
				GCC_VERSION = "";
				GCC_VERSION = "";

but it doesn't compile after removal as well due to different reason

:info:patch --->  Running ibtool for Preferences.nib
:debug:patch system -W /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_editors_MacVim/MacVim/work/macvim-137: ibtool --compile src/MacVim/English.lproj/Preferences.nib/keyedobjects.nib src/MacVim/English.lproj/Preferences.nib
:info:patch 2017-09-22 13:32:01.118 ibtoold[52761:940311] [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
:info:patch   Referenced from: /Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/SimulatorKit.framework/Versions/A/SimulatorKit
:info:patch   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
:info:patch   Referenced from: /Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/SimulatorKit.framework/Versions/A/SimulatorKit
:info:patch   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
:info:patch   Referenced from: /Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/SimulatorKit.framework/Versions/A/SimulatorKit
:info:patch   Reason: image not found
:info:patch 2017-09-22 13:32:01.119 ibtoold[52761:940311] [MT] DVTPlugInExtensionFaulting: Failed to fire fault for extension Xcode.InterfaceBuilderKit.PepperIntegration.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
:info:patch   Referenced from: /Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/SimulatorKit.framework/Versions/A/SimulatorKit
:info:patch   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=0x7f876b6770f0 {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
:info:patch   Referenced from: /Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/SimulatorKit.framework/Versions/A/SimulatorKit
:info:patch   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
:info:patch   Referenced from: /Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/SimulatorKit.framework/Versions/A/SimulatorKit
:info:patch   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.}}}
:info:patch 2017-09-22 13:32:01.121 ibtoold[52761:940311] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error getting value for parameter key 'name' of extension 'Xcode.InterfaceBuilderKit.PepperIntegration.Singletons' in plug-in 'com.apple.dt.IDE.IDEInterfaceBuilderWatchKitIntegration''
:info:patch *** First throw call stack:
:info:patch (
:info:patch     0   CoreFoundation                      0x00007fff43be132b __exceptionPreprocess + 171
:info:patch     1   libobjc.A.dylib                     0x00007fff6a507942 objc_exception_throw + 48
:info:patch     2   DVTFoundation                       0x0000000109ef3aad -[DVTExtensionParameter valueForKey:error:] + 0
:info:patch     3   IDEInterfaceBuilderKit              0x0000000109685b4d -[IBScopedSingletonRegistry init] + 722
:info:patch     4   IDEInterfaceBuilderKit              0x0000000109685861 __43+[IBScopedSingletonRegistry sharedInstance]_block_invoke + 41
:info:patch     5   libdispatch.dylib                   0x00007fff6b0baf64 _dispatch_client_callout + 8
:info:patch     6   libdispatch.dylib                   0x00007fff6b0baf17 dispatch_once_f + 41
:info:patch     7   IDEInterfaceBuilderKit              0x0000000109685835 +[IBScopedSingletonRegistry sharedInstance] + 45
:info:patch     8   IDEInterfaceBuilderKit              0x000000010949f689 -[IBInterfaceBuilderPlugin init] + 146
:info:patch     9   IDEInterfaceBuilderKit              0x000000010949f5dd +[IBInterfaceBuilderPlugin ide_initializeWithOptions:error:] + 34
:info:patch     10  IDEFoundation                       0x000000010a816cce _IDEInitializeOnePlugInAndPrerequisites + 2324
:info:patch     11  IDEFoundation                       0x000000010a8165d5 _IDEInitializeOnePlugInAndPrerequisites + 539
:info:patch     12  IDEFoundation                       0x000000010a8165d5 _IDEInitializeOnePlugInAndPrerequisites + 539
:info:patch     13  IDEFoundation                       0x000000010a814cca _IDEInitializePlugIns + 1604
:info:patch     14  IDEFoundation                       0x000000010a814081 IDEInitialize + 8547
:info:patch     15  ibtoold                             0x000000010919d5a9 ibtoold + 71081
:info:patch     16  ibtoold                             0x000000010919c724 ibtoold + 67364
:info:patch     17  libdyld.dylib                       0x00007fff6b0f4145 start + 1
:info:patch )
:info:patch libc++abi.dylib: terminating with uncaught exception of type NSException
:info:patch Command failed: ibtool --compile src/MacVim/English.lproj/Preferences.nib/keyedobjects.nib src/MacVim/English.lproj/Preferences.nib
:info:patch Killed by signal: 6
:error:patch Failed to patch MacVim: command execution failed
:debug:patch Error code: NONE
:debug:patch Backtrace: command execution failed
:debug:patch     while executing
:debug:patch "$post $targetname"
:error:patch See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_editors_MacVim/MacVim/main.log for details.
Version 0, edited 7 years ago by vovinacci (Volodymyr 'vovin' Shcherbinin) (next)

Changed 7 years ago by vovinacci (Volodymyr 'vovin' Shcherbinin)

comment:2 Changed 7 years ago by mf2k (Frank Schima)

Cc: raimue removed
Owner: set to raimue
Status: newassigned

comment:3 Changed 7 years ago by skymoo (Adam Mercer)

Seeing the second failure on a 10.12 machine with Xcode-9.0 as well.

comment:4 Changed 7 years ago by skymoo (Adam Mercer)

Cc: skymoo added

comment:5 Changed 7 years ago by raimue (Rainer Müller)

I cannot reproduce your problem with the patch. This is caused because post-patch failed, so the next time you want to build, MacPorts will try to apply the patch again. Please run sudo port clean MacVim before trying again.

I cannot reproduce the issue with Xcode 9 on my macOS 10.12. Do you have a full installation of Xcode 9? Try reinstalling "Command Line Tools (macOS 10.12) for Xcode 9" from the .dmg provided at developer.apple.com.

As something like this has also happened in the past, do not delete anything from /Applications/Xcode.app/Contents/Developer/Platforms/ and leave all of iPhoneOS/watchOS/etc. in place, even if you do not develop for such devices. The macOS platform appears to have cross-dependencies to these other platforms.

comment:6 Changed 7 years ago by vovinacci (Volodymyr 'vovin' Shcherbinin)

I would do full 10.13 re-install, install Xcode 9 with 'Command Line Tools' and try to build it again.

comment:7 Changed 7 years ago by vovinacci (Volodymyr 'vovin' Shcherbinin)

On clean install, everything builds just fine. Issue with Python support is still there, but I guess it's out of scope for this ticket as it involves different variant. So, I guess that we can close this ticket and I'll open new one for the python variant.

P.S. Many thanks for the explanation of the patch usage that depends on OS version!

comment:8 Changed 7 years ago by skymoo (Adam Mercer)

Running the following seems to have got MacVim building for me on my High Sierra machine:

sudo xcodebuild -runFirstLaunch

comment:9 Changed 7 years ago by vovinacci (Volodymyr 'vovin' Shcherbinin)

Same for me and +python27 variant as well. Thanks for the hint! So, it seems that this ticket could be closed and there's no need to open a new one at all.

comment:10 Changed 7 years ago by raimue (Rainer Müller)

Resolution: worksforme
Status: assignedclosed

comment:11 Changed 7 years ago by neverpanic (Clemens Lang)

FWIW, sudo xcodebuild -runFirstLaunch also fixes the same problem on my 10.12/Xcode 9 system. We should probably add a check to base…

comment:12 Changed 7 years ago by gthb (Gunnlaugur Thor Briem)

Same here, sudo xcodebuild -runFirstLaunch followed by sudo port clean MacVim made a subsequent sudo port upgrade MacVim work for me on 10.12.6/Xcode 9.0. (The port clean was required.)

Note: See TracTickets for help on using tickets.