You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MacVim: Missing vim directory in MacVim.app/Contents/Resources #1335
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
which produces MacVim.app without vim directory in MacVim.app/Contents/Resources/ directory, so entire runtime 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
by running MacVim.app from GUI macOS interface
by running vim/gvim/etc installed by MacVim
by running other versions of vim (e.g. /usr/bin/vim)
Issue has been tested with no configuration
by running mvim --clean (or gvim, supplied by MacVim distribution)
by running vim --clean (in terminal, supplied by MacVim distribution)
by running vim --clean (in terminal, other suppliers, e.g. /usr/bin/vim)
Other conditions
The both Homebrew packages "vim" and "macvim" are installed
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)?
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:
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:
cd /Volumes/ramdisk/macvim.git/src/MacVim
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -strip-debug-symbols -strip-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -resolve-src-symlinks /Volumes/ramdisk/macvim.git/src/MacVim/build/Release/PSMTabBarControl.framework /Volumes/ramdisk/macvim.git/src/MacVim/build/Release/MacVim.app/Contents/Frameworks
warning: skipping copy phase strip, binary is code signed: /Volumes/ramdisk/macvim.git/src/MacVim/build/Release/PSMTabBarControl.framework/Versions/A/PSMTabBarControl (in target 'MacVim' from project 'MacVim')
CodeSign /Volumes/ramdisk/macvim.git/src/MacVim/build/Release/MacVim.app/Contents/Frameworks/PSMTabBarControl.framework/Versions/A (in target 'MacVim' from project 'MacVim')
cd /Volumes/ramdisk/macvim.git/src/MacVim
export CODESIGN_ALLOCATE\=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
Signing Identity: "-"
/usr/bin/codesign --force --sign - --timestamp\=none --preserve-metadata\=identifier,entitlements,flags /Volumes/ramdisk/macvim.git/src/MacVim/build/Release/MacVim.app/Contents/Frameworks/PSMTabBarControl.framework/Versions/A
/Volumes/ramdisk/macvim.git/src/MacVim/build/Release/MacVim.app/Contents/Frameworks/PSMTabBarControl.framework/Versions/A: replacing existing signature
CodeSign /Volumes/ramdisk/macvim.git/src/MacVim/build/Release/MacVim.app/Contents/Frameworks/Sparkle.framework/Versions/A (in target 'MacVim' from project 'MacVim')
cd /Volumes/ramdisk/macvim.git/src/MacVim
export CODESIGN_ALLOCATE\=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
Signing Identity: "-"
/usr/bin/codesign --force --sign - --timestamp\=none --preserve-metadata\=identifier,entitlements,flags /Volumes/ramdisk/macvim.git/src/MacVim/build/Release/MacVim.app/Contents/Frameworks/Sparkle.framework/Versions/A
/Volumes/ramdisk/macvim.git/src/MacVim/build/Release/MacVim.app/Contents/Frameworks/Sparkle.framework/Versions/A: bundle format unrecognized, invalid, or unsuitable
Command CodeSign failed with a nonzero exit code
warning: Traditional headermap style is no longer supported; please migrate to using separate headermaps and set 'ALWAYS_SEARCH_USER_PATHS' to NO. (in target 'QuickLookStephen' from project 'QuickLookStephen')
** BUILD FAILED **
and yes it is related to code signing.
I tried applying the patch, but get:
$ patch -p1 < /Volumes/ramdisk/macvim.patch
patching file src/MacVim/MacVim.xcodeproj/project.pbxproj
Hunk #1 FAILED at 65.
1 out of 1 hunk FAILED -- saving rejects to file src/MacVim/MacVim.xcodeproj/project.pbxproj.rej
$
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.
Activity
eirnym commentedon Nov 3, 2022
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.
ychin commentedon Nov 3, 2022
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.
ychin commentedon Nov 3, 2022
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:
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.
mario-grgic commentedon Nov 3, 2022
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:
ychin commentedon Nov 4, 2022
You can just open
src/MacVim/MacVim.xcodeproj/project.pbxprojand removeCodeSignOnCopy,from the Sparkle.framework line.mario-grgic commentedon Nov 4, 2022
Fixing the Xcode project to remove code signing step for sparkle framework works.
eirnym commentedon Nov 4, 2022
MacPorts removes Sparkle framework entirely
Fix Sparkle 2 build error on older Xcode / fix sign/notarize scripts
ychin commentedon Nov 4, 2022
Cool thanks for confirming. #1336 will fix this. Feel free to try it out once it's merged.
ychin commentedon Nov 4, 2022
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.
ychin commentedon Nov 4, 2022
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.
mario-grgic commentedon Nov 4, 2022
@ychin Just to confirm, the issue is fixed. Thank you all for fast responses and speedy fix.