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 not 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 = "";

I've submitted PR for this https://github.com/macports/macports-ports/pull/817

There was one more failed build if_python.c:68:11: fatal error: 'Python/Python.h' file not found

This could be fixed with

% cd /opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/
% sudo -s
% mkdir -p Python
% cd Python
% ln -s ../Python.h Python.h

Do we need to introduce patch to fix it as well?

P.S. Previously specified issue in this comment was related to local Xcode installation, please disregard it.

Last edited 7 years ago by vovinacci (Volodymyr 'vovin' Shcherbinin) (previous) (diff)

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.