Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Emacs HEAD won't install #41630

Closed
creack opened this issue Jul 12, 2015 · 6 comments
Closed

Emacs HEAD won't install #41630

creack opened this issue Jul 12, 2015 · 6 comments

Comments

@creack
Copy link
Contributor

creack commented Jul 12, 2015

brew install emacs --HEAD used to work fine. It does not anymore.

  • ctags failure. Even if I install ctags (brew install ctags), brew install emacs --HEAD will fail because the emacs' ctags bin gets removed. There is no choice but to do brew install emacs --HEAD --with-ctags. Error: No such file or directory - /usr/local/Cellar/emacs/HEAD/bin/ctags
  • emacs install failure. brew install emacs --HEAD --with-ctags works just fine with no error, however, it does not yield any binary:
(guillaume@Guillaume-SR-MBP):<~>
[09:47:38 AM]% brew install emacs --HEAD --with-ctags ==> Cloning http://git.sv.gnu.org/r/emacs.git
Updating /Library/Caches/Homebrew/emacs--git
==> Checking out branch master
==> ./autogen.sh
==> ./configure --prefix=/usr/local/Cellar/emacs/HEAD --enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Cellar/emacs/HEAD/share/info/emacs --without-dbus --without-gnutls --without-x
==> make
==> make install
==> Caveats

To have launchd start emacs at login:
    ln -sfv /usr/local/opt/emacs/*.plist ~/Library/LaunchAgents
Then to load emacs now:
    launchctl load ~/Library/LaunchAgents/homebrew.mxcl.emacs.plist

WARNING: launchctl will fail when run under tmux.
==> Summary
🍺  /usr/local/Cellar/emacs/HEAD: 4 files, 52K, built in 4.6 minutes

(guillaume@Guillaume-SR-MBP):<~>
[09:52:29 AM]% emacs
 zsh: command not found: emacs

(guillaume@Guillaume-SR-MBP):<~>
[09:52:52 AM]% tree /usr/local/Cellar/emacs
/usr/local/Cellar/emacs
└── HEAD
    ├── COPYING
    ├── INSTALL_RECEIPT.json
    ├── README
    └── homebrew.mxcl.emacs.plist

1 directory, 4 files

(guillaume@Guillaume-SR-MBP):<~>
[09:52:29 AM]% brew unlink -f emacs && brew link emacs
Unlinking /usr/local/Cellar/emacs/HEAD... 0 symlinks removed
Linking /usr/local/Cellar/emacs/HEAD... 0 symlinks created
@bfontaine
Copy link
Contributor

Is it an issue with the way Hombrew install Emacs, or with Emacs itself? In the latter case, you should report it upstream.

@creack
Copy link
Contributor Author

creack commented Jul 12, 2015

I suspect it is an issue from the way Homebrew installs Emacs.

  1. Even when ctags is installed, it still tries to copy the deleted ctags binary from emacs (no choice but to use --with-ctags)
  2. the make and make install works fine
  3. Nothing gets copied in /usr/local/Cellar/emacs/HEAD

@tdsmith
Copy link
Contributor

tdsmith commented Jul 12, 2015

  1. Nothing gets copied in /usr/local/Cellar/emacs/HEAD

This seems like an emacs bug, if make install isn't installing to the prefix passed to configure.

@creack
Copy link
Contributor Author

creack commented Jul 13, 2015

Answer from upstream:

A default build on OS X is now a self-contained Cocoa app.
'make install' assembles the app in nextstep/Emacs.app.
Copy that wherever you like. --prefix is ignored.

If you prefer the old default X11 build, which treats --prefix in the
standard way, configure --without-ns.

This is all explained in NEWS and nextstep/INSTALL, AFAICS.

However, brew does not forward --without-ns to ./configure so I patched the formula and now it works fine:

diff --git a/Library/Formula/emacs.rb b/Library/Formula/emacs.rb
index 2af96ec..e52d466 100644
--- a/Library/Formula/emacs.rb
+++ b/Library/Formula/emacs.rb
@@ -98,7 +98,7 @@ class Emacs < Formula
         args << "--with-x"
         args << "--with-gif=no" << "--with-tiff=no" << "--with-jpeg=no"
       else
-        args << "--without-x"
+        args << "--without-x" << "--without-ns"
       end

       system "./configure", *args

@bfontaine
Copy link
Contributor

@creack Could you make a pull-request? Thanks!

@creack
Copy link
Contributor Author

creack commented Jul 13, 2015

cf #41672

@DomT4 DomT4 closed this as completed in f2ec744 Jul 14, 2015
woodruffw pushed a commit to woodruffw-forks/homebrew that referenced this issue Jul 22, 2015
Closes Homebrew#41672.
Closes Homebrew#41630.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
@Homebrew Homebrew locked and limited conversation to collaborators Jul 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants