Installing Emacs 23 from CVSBazaar source on Ubuntu HardyKarmic
I have been using the emacs-snapshot
package in Ubuntu Hardy. However, when I tried to use Tramp, I got an error message: Variable binding depth exceeds max-specpdl-size
. I couldn't find out how to fix this, and I didn't want to use Emacs 22.3 because it doesn't have Xft (anti-aliased fonts), so I decided to live on the bleeding edge and install Emacs 23 from CVS. Besides the INSTALL and INSTALL.CVS files, I also used theBlackDragon's article for reference.
Update 2008-10-09: I just found that Romain Francoise maintains an emacs-snapshot Debian package and it has been adapted for Ubuntu. This is an alternative to installing from source.
Update 2010-01-09: Since Emacs has switched from CVS to Bazaar, I've updated these instructions to use Bazaar. Also, I'm now running on Ubuntu 9.10 Karmic Koala instead of Ubuntu Hardy.
Update 2012-09-19: Here are some additional Ubuntu 12.04 packages I needed to install Emacs 24.2.
$ sudo apt-get install libgif-dev
$ sudo apt-get install libtiff4-dev
$ sudo apt-get install xaw3dg-dev
$ sudo apt-get install librsvg2-dev
$ sudo apt-get install libmagick++-dev
$ sudo apt-get install libgpm-dev
$ sudo apt-get install libgconf2-dev
$ sudo apt-get install libselinux1-dev
$ sudo apt-get install libm17n-dev
$ sudo apt-get install libotf-dev
- Install Bazaar
$ sudo apt-get install bzr
- Get the source code from the Bazaar repository
$ cd ~/incoming $ bzr branch http://bzr.savannah.gnu.org/r/emacs/trunk emacs_trunk
Read the INSTALL and INSTALL.BZR files in
~/incoming/emacs_trunk
- Install prerequisites:
$ sudo apt-get install build-essential $ sudo apt-get build-dep emacs23
To see what is installed by
build-dep
, see the emacs23 karmic package page - Configure. The argument
--prefix=/home/saltycrane/lib/emacs-bzr-20100210
means I am installing Emacs in/home/saltycrane/lib/emacs-bzr-20100210
.$ cd ~/incoming/emacs_trunk $ ./configure --prefix=/home/saltycrane/lib/emacs-bzr-20100210
- Per the INSTALL.BZR file, I needed to do a
make bootstrap
instead ofmake
because some files, such as byte-compiled lisp files are not stored in Bazaar. Note, this takes a long time (over 10 min for me).$ make bootstrap
- Make (Optional)
$ make
- Test it (Optional)
$ src/emacs -q
- Install
$ make install
- Create symlinks (~/bin is already on my
PATH
)$ ln -s ~/lib/emacs-bzr-20100210 ~/lib/emacs $ cd ~/bin $ ln -s ../lib/emacs/bin/* .
Alternatively, I could add
~/lib/emacs-bzr-20100210/bin
to myPATH
.
Now I have "Pretty Emacs" with working Tramp for remote file access. It also has multi-tty support which is supposed to be very cool (but I haven't tried it yet) is very cool (e.g. for displaying my running desktop emacs process on my Android phone.)
Error messages
- Solution:
configure: error: You do not seem to have makeinfo >= 4.6, and your source tree does not seem to have pre-built manuals in the `info' directory. Either install a suitable version of makeinfo, or re-run configure with the `--without-makeinfo' option to build without the manuals.
$ sudo apt-get install texinfo
- Solution:
configure: error: The following required libraries were not found: libjpeg libgif/libungif libtiff Maybe some development libraries/packages are missing? If you don't want to link with them give --with-jpeg=no --with-gif=no --with-tiff=no as options to configure
$ sudo apt-get install libjpeg-dev libgif-dev libtiff4-dev
Warning: arch-dependent data dir (/home/saltycrane/lib/emacs-bzr/libexec/emacs/23.1.92/i686-pc-linux-gnu/) does not exist. Warning: Lisp directory `/home/saltycrane/lib/emacs-bzr/share/emacs/23.1.92/site-lisp' does not exist. Warning: Lisp directory `/home/saltycrane/lib/emacs-bzr/share/emacs/site-lisp' does not exist. Warning: Lisp directory `/home/saltycrane/lib/emacs-bzr/share/emacs/23.1.92/lisp' does not exist. Warning: Lisp directory `/home/saltycrane/lib/emacs-bzr/share/emacs/23.1.92/leim' does not exist. Warning: Could not find simple.el nor simple.elc
This happened because I originally used
./configure --prefix=/home/saltycrane/lib/emacs-bzr
and then renamed~/lib/emacs-bzr
to~/lib/emacs-bzr-20100210
. Solution: don't rename the directory.
Related posts
- Magit in Spacemacs (evil-magit) notes — posted 2018-11-02
- Switching from Emacs to Vim (actually Spacemacs) — posted 2015-12-31
- Colorized, interactive "git blame" in Emacs: vc-annotate — posted 2011-05-28
- My Emacs Python environment — posted 2010-05-10
- Emacs espresso-mode for jQuery — posted 2010-03-10
- Notes on C++ development with Emacs on Ubuntu Linux — posted 2009-07-08
Comments
Just giving you a thumbs up for this article :). Used it to successfully set-up the cvs version of emacs. Thanks!
Thanks for this post! Steps work perfectly -- just did this on 9.04 (Jaunty Jackalope).
really nice. Thank you!
I ran into the same max-specpdl-size error message. It turned out that it was caused by elisp libraries that i load from .emacs that i have compiled in emacs22. The byte-code format seem to have changed. When i removed those elc files the error disappeared.
Johan, Thanks very much for explaining the cause of the max-specpdl-size error. I had googled it and couldn't find a solution.
I've encountered the error before, while debugging my own elisp codes.
I don't know whether this would ideally solve the issue, but the max can be actually increased to a higher value, for eg, 4000 . (setq max-specpdl-size 4000)
Perhaps current max value should be initially checked first: M-x describe-variable RET max-specpdl-size RET
Test comment. Comments on this site seem to be giving me problems. Should I switch to Disqus?
Thanks....
Used
$ sudo apt-get install build-essential
$ sudo apt-get build-dep emacs23
when installing the emacs24 source.