macvim-dev / macvim

Vim - the text editor - for macOS
https://macvim.org
Vim License
7.51k stars 683 forks source link

Macvim compile failed under 11.7.4-x86_64 with homebrew #1400

Closed markwu closed 1 year ago

markwu commented 1 year ago

Steps to reproduce

  1. brew install --HEAD macvim
brew install --HEAD macvim
Warning: Treating macvim as a formula. For the cask, use homebrew/cask/macvim
==> Fetching macvim
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-core/e5ee8cd469f74c7e72c5c04cb30b5929229ecfe1/Formula/macvim.rb
######################################################################## 100.0%
==> Cloning https://github.com/macvim-dev/macvim.git
Updating /Users/xxxxxx/Library/Caches/Homebrew/macvim--git
==> Checking out branch master
Already on 'master'
Your branch is up to date with 'origin/master'.
HEAD is now at 4204e69cd Merge remote-tracking branch 'vim/master'
==> ./configure --with-features=huge --enable-multibyte --enable-perlinterp --enable-rubyinterp --enable-tclinterp --enable-terminal --with-tlib=ncurses --with-compiledby=
==> make
Error: An exception occurred within a child process:
  Errno::ENOENT: No such file or directory @ apply2files - /usr/local/Cellar/macvim/HEAD-4204e69/MacVim.app/Contents/Frameworks/Sparkle.framework

Expected behaviour

Successful compiled macvim without any problems.

Version of Vim and architecture

HEAD of macvim

Environment

brew config HOMEBREW_VERSION: 4.0.10-34-gb753315 ORIGIN: https://github.com/Homebrew/brew.git HEAD: b753315b0b1e78b361612bf4985502bf9dca5582 Last commit: 4 hours ago Core tap origin: https://github.com/Homebrew/homebrew-core Core tap HEAD: cd96f13c0adb03e8aeeedab9e97e901ec12f6e15 Core tap last commit: 6 weeks ago Core tap branch: master Core tap JSON: 28 Mar 11:58 UTC HOMEBREW_PREFIX: /usr/local HOMEBREW_CASK_OPTS: [] HOMEBREW_EDITOR: vim HOMEBREW_MAKE_JOBS: 8 Homebrew Ruby: 2.6.8 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.8_1/bin/ruby CPU: octa-core 64-bit haswell Clang: 13.0.0 build 1300 Git: 2.40.0 => /usr/local/bin/git Curl: 7.64.1 => /usr/bin/curl macOS: 11.7.4-x86_64 CLT: 13.2.0.0.1.1638488800 Xcode: 13.2.1

How MacVim was installed

Using homebrew

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

Other conditions

ychin commented 1 year ago

The formula needs to be updated because the semantics for the --disable-sparkle flag has changed. It now deletes the Sparkle.framework for you, so when Homebrew tries to delete it after the fact it's already gone. You probably want to file an issue with Homebrew because I'm not sure how this could work, since the formula is building against the official release (r176) which doesn't have this change yet (since you are building against HEAD).

markwu commented 1 year ago

Okay, I just remove --disable-sparkle option to make it work. I'll report this issue to homebrew.

markwu commented 1 year ago

Remove the following two lines can make it work, too.

    # Remove autoupdating universal binaries
    (prefix/"MacVim.app/Contents/Frameworks/Sparkle.framework").rmtree
ychin commented 1 year ago

Remove the following two lines can make it work, too.

    # Remove autoupdating universal binaries
    (prefix/"MacVim.app/Contents/Frameworks/Sparkle.framework").rmtree

Yeah this is the right fix. Don't remove --disable-sparkle. If you are using Homebrew, you are trying to rely it to manage versions for you and hence there is no point in enabling Sparkle.

Edit: I was going to file the issue or PR to fix up the formula when I make a new release (since that's when they would bump the formula), so if you don't feel like doing it, that's fine too.

ychin commented 1 year ago

Just going to close this for now. When the next release comes out, Homebrew will fix up their formula but for now you probably need a local mod like this because Homebrew formulas are tied to releases, not HEAD.

markwu commented 1 year ago

Just going to close this for now. When the next release comes out, Homebrew will fix up their formula but for now you probably need a local mod like this because Homebrew formulas are tied to releases, not HEAD.

Thank you!