Homebrew-emacs-plus: Broken by upgrade to imagemagick@6 till manual reinstall

Created on 24 Jul 2017  路  6Comments  路  Source: d12frosted/homebrew-emacs-plus

Symptoms: after doing a Spacemacs upgrade, clicking on the Spacemacs icon stopped working.

Thankfully, I soon ran emacs from commandline and figured out what actually happened. I just upgraded homebrew, that upgraded Imagemagick@6, and that broke the existing bottle for emacs-plus鈥攔equired file libMagickWand-6.Q16.4.dylib was removed, now they offer libMagickWand-6.Q16.5.dylib or libMagickWand-6.Q16.8.dylib.

Removing and reinstalling fixed the issue鈥攎aybe due to https://github.com/d12frosted/homebrew-emacs-plus/commit/541ae757ec283dfe556e23d44e78158a3a1e4de7?

But having to do that seems bad*鈥擨've never had to do that after brew upgrade, so I suspect (or hope!) there's some mechanism to automate such upgrades (maybe bumping the formula version?).

Anyway, thanks for already fixing the bottle at least!

*This seems annoying especially for those who might not guess this would be a fix, including me鈥攎y best hope was that the reinstall would figure it could not use the bottle. I didn't consider a bottle upgrade possible.

$ ls '/usr/local/opt/imagemagick@6/lib/'
ImageMagick                libMagick++-6.Q16.a      libMagick++-6.Q16.la         libMagickCore-6.Q16.a      libMagickCore-6.Q16.la       libMagickWand-6.Q16.a      libMagickWand-6.Q16.la
libMagick++-6.Q16.8.dylib  libMagick++-6.Q16.dylib  libMagickCore-6.Q16.5.dylib  libMagickCore-6.Q16.dylib  libMagickWand-6.Q16.5.dylib  libMagickWand-6.Q16.dylib  pkgconfig
$ emacs
dyld: Library not loaded: /usr/local/opt/imagemagick@6/lib/libMagickWand-6.Q16.4.dylib
  Referenced from: /usr/local/Cellar/emacs-plus/25.2/Emacs.app/Contents/MacOS/Emacs
  Reason: image not found
Trace/BPT trap: 5
other

Most helpful comment

I have done brew update and brew upgrade, and brew outdated is empty and brew doctor doesn't report anything. I'm on macOS Sierra 10.12.6.

brew uninstall emacs-plus and brew install emacs-plus fixed it for me too (thanks @Blaisorblade for the troubleshooting), but this shouldn't have been necessary!

I assume you have to update the version and not just the bottles!

All 6 comments

Yeah, I understand your pain. Sorry about that. Thankfully ilovezfs has notified me that latest update to imagemagick has broken existing builds.

Though it's strange, I was expecting people to automatically 'upgrade' to a new bottle. I will investigate it a little bit in order to avoid such situations in future.

I have done brew update and brew upgrade, and brew outdated is empty and brew doctor doesn't report anything. I'm on macOS Sierra 10.12.6.

brew uninstall emacs-plus and brew install emacs-plus fixed it for me too (thanks @Blaisorblade for the troubleshooting), but this shouldn't have been necessary!

I assume you have to update the version and not just the bottles!

More precisely, my guess is that you need a revision (here, revision 1), like https://github.com/Homebrew/homebrew-core/blob/61767eba4806deaf882545e00c5ef1bf631976bf/Formula/gawk.rb#L7. The emacs version stays the same, but the package changed. The result will have "version" 25.2_1 which is greater than 25.2, triggering the update.

Documentation on https://github.com/Homebrew/brew/blob/master/docs/Formula-Cookbook.md#formulae-revisions, together with the examples (e.g. this comment from a linked example), seems to confirm that bumping the revision is the supported solution, though I'm just reading docs.

PR added, just to describe my conjecture more specifically.

@d12frosted Actually, #43 already said "so the formula will need a revision bump and new bottles."

Sorry folks. I just thought that 'rebuild' number bumping will take care of this stuff. Next time I'll update revision as well.

And thanks for the explanations!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

agzam picture agzam  路  6Comments

smallzhan picture smallzhan  路  7Comments

ilovezfs picture ilovezfs  路  3Comments

tshu-w picture tshu-w  路  6Comments

frankjonen picture frankjonen  路  3Comments