d12frosted / homebrew-emacs-plus

Emacs Plus formulae for the Homebrew package manager
MIT License
2.33k stars 182 forks source link

Emacs won't open(LSOpenURLsWithRole() failed) #223

Closed mrprofessor closed 4 years ago

mrprofessor commented 4 years ago

Please make sure to follow these steps (and mark the checkboxes):

What you were trying to do

Can't open emacs

λ matrix ~ → emacs
[1]    42048 killed     emacs

λ matrix ~ → emacs -nw
[1]    42082 killed     emacs -nw

λ matrix ~ → open -a emacs
LSOpenURLsWithRole() failed for the application /usr/local/Cellar/emacs-plus/26.3/Emacs.app with error -10810.

What happened (include command output)

$ brew install emacs-plus [OPTIONS]
Command output
λ matrix ~ → brew install emacs-plus --without-spacemacs-icon
Updating Homebrew...
==> Installing emacs-plus from d12frosted/emacs-plus
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/master/patches/multicolor-fonts.patch
Already downloaded: /Users/professor/Library/Caches/Homebrew/downloads/6e0bcfe5f86b21ca9f1bf349995832a6143baac4a74e000dff771b2839b6fa7d--multicolor-fonts.patch
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/master/patches/fix-window-role.patch
Already downloaded: /Users/professor/Library/Caches/Homebrew/downloads/b7046a273c114e23f734df97967f4016486f1d080bad1ba40dbd53a5c86a09e0--fix-window-role.patch
==> Downloading https://s3.amazonaws.com/emacs-mac-port/Emacs.icns.modern
Already downloaded: /Users/professor/Library/Caches/Homebrew/downloads/bbbdfd42b5362b97f4f87a83f40e55b5a82dc5a46b3942127308c924dd9d8760--Emacs.icns.modern
==> Downloading https://github.com/nashamri/spacemacs-logo/blob/master/spacemacs.icns?raw=true
Already downloaded: /Users/professor/Library/Caches/Homebrew/downloads/8012882bc66839266939eb427d278e4baa7019f4fa113e06e945f9f4892949ed--spacemacs.icns
==> Downloading https://raw.githubusercontent.com/emacsfodder/emacs-icons-project/master/EmacsIcon1.icns
Already downloaded: /Users/professor/Library/Caches/Homebrew/downloads/6435ba3a799135b0edca96a182e7cda1d539f2abf2fed2224a00bbe2e9c9dc2d--EmacsIcon1.icns
==> Downloading https://raw.githubusercontent.com/emacsfodder/emacs-icons-project/master/EmacsIcon2.icns
Already downloaded: /Users/professor/Library/Caches/Homebrew/downloads/f87ace30266dce8020d209339f0b349fc258e2bfdfcc09cb8ca7aa823babba77--EmacsIcon2.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/master/icons/modern-icon-sexy-v1.icns
Already downloaded: /Users/professor/Library/Caches/Homebrew/downloads/ed99db49479f5e13929a7a860c0db796fbe12f891c1a80edf4295bb24dd474d2--modern-icon-sexy-v1.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/master/icons/modern-icon-sexy-v2.icns
Already downloaded: /Users/professor/Library/Caches/Homebrew/downloads/e25ae91c9c162a001380103c786c88ba6c37d22aefdf898d66f4296622d8faf7--modern-icon-sexy-v2.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/master/icons/modern-icon-papirus.icns
Already downloaded: /Users/professor/Library/Caches/Homebrew/downloads/9ffc504004051a6b6bbb4822f445790f49df02a7c6d4eed7497536a990331a58--modern-icon-papirus.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/master/icons/modern-icon-pen.icns
Already downloaded: /Users/professor/Library/Caches/Homebrew/downloads/fdad46dfe355663be0ed4768f5aa3ae5992be6702934e4317a771b67158e64be--modern-icon-pen.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/master/icons/modern-icon-nuvola.icns
Already downloaded: /Users/professor/Library/Caches/Homebrew/downloads/df09c190471f5e652752b6583e2a6eb8e3e1bb28fd4a278e35cf4f66654da7ee--modern-icon-nuvola.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/master/icons/modern-icon-black-variant.icns
Already downloaded: /Users/professor/Library/Caches/Homebrew/downloads/0a41794c1aff33986b37c82d073628af44e5b68068456ab4f5f3cbb01c93e31b--modern-icon-black-variant.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/master/icons/retro-icon-sink-bw.icns
Already downloaded: /Users/professor/Library/Caches/Homebrew/downloads/ab7f78ca0547259802c13010579afc2cf1ad351c3c44c07a33bf32287f8a2e0f--retro-icon-sink-bw.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/master/icons/retro-icon-sink.icns
Already downloaded: /Users/professor/Library/Caches/Homebrew/downloads/2960f5261c2ca2dd70afd881325057fcc4c064f1b71ee53fd5d54505d010ef98--retro-icon-sink.icns
==> Downloading https://ftp.gnu.org/gnu/emacs/emacs-26.3.tar.xz
Already downloaded: /Users/professor/Library/Caches/Homebrew/downloads/35ddbf65249f3d4c38e087a1fa7606daaf8784b8445fa2c3b4d453ef9b92a18c--emacs-26.3.tar.xz
Warning: Your Xcode (11.3.1) is outdated.
Please update to Xcode 11.4.1 (or delete it).
Xcode can be updated from the App Store.

Warning: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences or run:
  softwareupdate --all --install --force

If that doesn't show you an update run:
  sudo rm -rf /Library/Developer/CommandLineTools
  sudo xcode-select --install

  Alternatively, manually download them from:
  https://developer.apple.com/download/more/.

==> Patching
==> Applying multicolor-fonts.patch
patching file src/macfont.m
Hunk #1 succeeded at 2346 with fuzz 2 (offset -27 lines).
==> Applying fix-window-role.patch
patching file src/nsterm.m
Hunk #1 succeeded at 8368 (offset -400 lines).
==> ImageMagick PKG_CONFIG_PATH:
/usr/local/opt/imagemagick@6/lib/pkgconfig
==> ./configure --enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Cellar/emacs-plus/26.3/share/info/em
==> make
==> make install
==> Caveats
Emacs.app was installed to:
  /usr/local/opt/emacs-plus

To link the application to default Homebrew App location:
  ln -s /usr/local/opt/emacs-plus/Emacs.app /Applications

--natural-title-bar option was removed from this formula, in order to
  duplicate its effect add following line to your init.el file
  (add-to-list 'default-frame-alist '(ns-transparent-titlebar . t))
  (add-to-list 'default-frame-alist '(ns-appearance . dark))
or:
  (add-to-list 'default-frame-alist '(ns-transparent-titlebar . t))
  (add-to-list 'default-frame-alist '(ns-appearance . light))

To have launchd start d12frosted/emacs-plus/emacs-plus now and restart at login:
  brew services start d12frosted/emacs-plus/emacs-plus
Or, if you don't want/need a background service you can just run:
  emacs
==> Summary
🍺  /usr/local/Cellar/emacs-plus/26.3: 3,993 files, 123.3MB, built in 3 minutes 12 seconds

  

Output of brew config

$ brew config
HOMEBREW_VERSION: 2.2.17
ORIGIN: https://github.com/Homebrew/brew
HEAD: ca5eac845dc11e991d7d8f8c85aebb82dd454f37
Last commit: 3 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 57a75a24f25ec52fb36bfead34166f3fa307ff44
Core tap last commit: 3 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_MAKE_JOBS: 4
CPU: quad-core 64-bit kabylake
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
Clang: 11.0 build 1100
Git: 2.21.1 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 7.64.1 => /usr/bin/curl
Java: 1.8.0_222
macOS: 10.15.4-x86_64
CLT: 11.0.33.8
Xcode: 11.3.1

Output of brew doctor

$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences or run:
  softwareupdate --all --install --force

If that doesn't show you an update run:
  sudo rm -rf /Library/Developer/CommandLineTools
  sudo xcode-select --install

Alternatively, manually download them from:
  https://developer.apple.com/download/more/.

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and which additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following "config" scripts:
  /Users/professor/.pyenv/shims/python3.6m-config
  /Users/professor/.pyenv/shims/python-config
  /Users/professor/.pyenv/shims/python3-config
  /Users/professor/.pyenv/shims/python3.6-config

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  ctags
  kubernetes-cli

Warning: Homebrew's sbin was not found in your PATH but you have installed
formulae that put executables in /usr/local/sbin.
Consider setting the PATH for example like so:
  echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc

Warning: Your Xcode (11.3.1) is outdated.
Please update to Xcode 11.4.1 (or delete it).
Xcode can be updated from the App Store.
mrprofessor commented 4 years ago

Somehow the brew cask install emacs works

d12frosted commented 4 years ago

Hey, this is a known issue without known solution. Workaround is either avoid using ANY options or switch to Emacs 27 (--HEAD --with-emacs-27-branch) or Emacs 28 (--HEAD).

See #195 (closing your issue as duplicate)

P. S. bottled versions (cask as well) work. Installing with any custom options (e.g. other icon in you case) builds Emacs locally and you get into this state.