-
-
Notifications
You must be signed in to change notification settings - Fork 686
MacVim: Missing vim directory in MacVim.app/Contents/Resources #1335
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
Comments
It's important, that if you need both python3 and python2, dynamic option is required. It's neither possible to build Vim with both versions of Python statically, nor use both Python versions in the same Vim session. |
Do you see any error messages @mario-grgic? Your issue report seems to suggest it completed building but didn't include the "vim" folder but I'm guessing that the build just failed? I have seen that Sparkle 2's framework doesn't really work well with older versions of Xcode before. I have been wondering about filing a bug report on Sparkle. Can you try this and see if it fixes the issue locally (run it from repo root folder)?
If it does fix the issue, you can just use that for now. I'll think about if there's a way to handle this better. |
Actually, I think this may be related to a code signing bug in older Xcode versions (sparkle-project/Sparkle#2069). Can you try the following @mario-grgic (apply the patch) instead of what I mentioned above? You didn't include an error message so I'm guessing that you are failing at the code signing stage, but if it's something else then we have to debug further: diff --git a/src/MacVim/MacVim.xcodeproj/project.pbxproj b/src/MacVim/MacVim.xcodeproj/project.pbxproj
index 010838316e..0ca1b98705 100644
--- a/src/MacVim/MacVim.xcodeproj/project.pbxproj
+++ b/src/MacVim/MacVim.xcodeproj/project.pbxproj
@@ -65,7 +65,7 @@
52818B031C1C08CE00F59085 /* QLStephen.qlgenerator in Copy QuickLookPlugin */ = {isa = PBXBuildFile; fileRef = 52818AFF1C1C075300F59085 /* QLStephen.qlgenerator */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
528DA66A1426D4F9003380F1 /* macvim-askpass in Copy Scripts */ = {isa = PBXBuildFile; fileRef = 528DA6691426D4EB003380F1 /* macvim-askpass */; };
52A364731C4A5789005757EC /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52A364721C4A5789005757EC /* Sparkle.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
- 52A364761C4A57C1005757EC /* Sparkle.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 52A364721C4A5789005757EC /* Sparkle.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+ 52A364761C4A57C1005757EC /* Sparkle.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 52A364721C4A5789005757EC /* Sparkle.framework */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; If you don't want to apply the patch you can just go to Xcode, select MacVim.xcodeproj, go to Build Phases -> Copy Framework, and then turn off Code Sign On Copy for Sparkle.framework. |
This is a build failure, which I didn't originally notice since post build I run a few scripts to copy over custom MacVim icons, etc. But here is build failure:
and yes it is related to code signing. I tried applying the patch, but get:
And here is the rejects file:
|
You can just open |
Fixing the Xcode project to remove code signing step for sparkle framework works. |
MacPorts removes Sparkle framework entirely |
Sparkle 2: Seems like older Xcode versions (before 12.5) have problems signing frameworks that only have a Versions/B but not a Versions/A folder. Sparkle 2 moved to only having Versions/B which is causing code sign to fail on build step. Just fix this issue by disabling Sign on Copy for Sparkle.framework. We don't really need it because it already comes with an ad-hoc signature anyway, and for publish we have a custom signing script (sign-developer-id) to do manual signing. Also, fix CI to use Sparkle 2 again for old Xcode (11.7) builds to test this working. Previously we made it use Sparkle 1 because we didn't work around this issue, which was kind of a hack. For Sparkle 2, also add a `cleanup-after-build` script to remove the XPC Services folder in the framework. Sparkle dev added this to the bundle for sandboxed apps but non-sandbox apps don't really need it and it's recommended by Sparkle to remove them, so we unfortunately need to manually do it as a post-build step. Fix macvim-dev#1335 Signing / notarization scripts: Make sure to sign Sparkle 2 binaries in `sign-developer-id`. Also, seems like the "--deep" flag in codesign is now deprecated as of macOS 13, so just stop using it and manually sign all the relevant binaries explicitly. For notarization script, the current behavior doesn't correctly detect failure as `xcrun notarytool submit` always exits with 0 even if the submission failed. Add logic to manually query whether the submission succeeded. If failed, print out the logs for easier diagnosis, and exits with -1 so it will block progress.
Cool thanks for confirming. #1336 will fix this. Feel free to try it out once it's merged. |
Yes but it requires a custom patch to manually strip it. Homebrew also disables Sparkle but it only removes Sparkle after the build is done. During build phase it still links against Sparkle. |
Alright this is merged. @mario-grgic you can revert the change and just pull the latest. Let me know if you see more issues with building/running. |
@ychin Just to confirm, the issue is fixed. Thank you all for fast responses and speedy fix. |
Steps to reproduce
I am building macvim from source (I do this couple of times a week to keep up to date). Today I am building as of commit d311aae, using the following configure options
./configure --with-features=huge --enable-rubyinterp --enable-pythoninterp --enable-python3interp --enable-perlinterp --enable-luainterp=yes --with-lua-prefix=/usr/local --enable-cscope --enable-terminal
which produces MacVim.app without
vim
directory inMacVim.app/Contents/Resources/
directory, so entireruntime
directory is not available. This is a recent regression.By the way I am building on macOS 10.15 Catalina, with Xcode 12.1.
This does not happen on macOS 13.0 Ventura and Xcode 14.1.
Expected behaviour
vim and runtime directories should be installed in Runtime.
Version of Vim and architecture
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Nov 3 2022 13:19:30) macOS version - x86_64 Included patches: 1-827
Environment
macOS 10.15.7 Catalina
Built in Terminal.app
echo $TERM
xterm-256color
shell: GNU bash, version 5.2.0(1)-release (x86_64-apple-darwin19.6.0)
How MacVim was installed
Built from git
Logs and stack traces
No response
Vim configuration where issue is reproducable
No response
Issue has been tested with given configuration
Issue has been tested with no configuration
mvim --clean
(orgvim
, supplied by MacVim distribution)vim --clean
(in terminal, supplied by MacVim distribution)vim --clean
(in terminal, other suppliers, e.g. /usr/bin/vim)Other conditions
The text was updated successfully, but these errors were encountered: