|# Build latest version of Emacs, version management with stow|
|# OS: Ubuntu 14.04 LTS|
|# version: 24.5|
|# Toolkit: lucid|
|# Warning, use updated version of this script in: https://github.com/favadi/build-emacs|
|# install dependencies|
|sudo apt-get install -y stow build-essential libx11-dev xaw3dg-dev \|
|libjpeg-dev libpng12-dev libgif-dev libtiff4-dev libncurses5-dev \|
|libxft-dev librsvg2-dev libmagickcore-dev libmagick++-dev \|
|libxml2-dev libgpm-dev libghc-gconf-dev libotf-dev libm17n-dev \|
|# download source package|
|if [[ ! -d emacs-"$version" ]]; then|
|tar xvf emacs-"$version".tar.xz|
|# buil and install|
|sudo mkdir /usr/local/stow|
|sudo make install prefix=/usr/local/stow/emacs-"$version"|
|sudo stow emacs-"$version"|
hi! thank you for this. i am trying to get it running but it bombs out. i have ubuntu (KXStudio) 14.04.3 LTS. For some reason, github won't let me attach a file here, so here is a link to the output of running this script:
And here are the first few lines of the contents of /usr/local/stow/emacs24.5/share/info/dir -- in case that helps -- tho' i'm not sure if that's what's really causing the abort.
okay, i don't have the complete answer, but stow was bombing out at the end:
(a clearer error message from stow would have saved me - a first time user of stow - a lot of time)
i had to learn about targets. the target was not "share/info/dir" but "/usr/local/share/info/dir". This dir file did already exist on the system.
so the problem is that stow wanted to symlink /usr/local/share/info/dir --> /usr/local/stow/emacs-24.5/share/info/dir but it couldn't do that because the /usr/local/share/info/dir file already existed.
to rectify the problem, i had to move the previously-existing /usr/local/share/info/dir file. Now I was able to run stow without error.
The previously-existing /usr/local/share/info/dir file had very little in it, so merging it with the new dir file coming in from stow was not a problem.
Still, this became a hand-editing/manual problem. I wonder if there should be a fix done, so that scripts can work still?
Also, similar information about compiling emacs and installing with stow is
This problem would only happen if you have a dir file already existing there (which I did).
How to merge two dir files gracefully?
Okay, I've made a fork which gets around the stow dir conflict mentioned above. The fork also fixes a couple of other minor issues that can come up: mkdir now has "-p" and libtiff4-dev changed to libtiff5-dev (for some newer Ubuntu systems), etc.
Apparently we can't (yet) submit Pull-requests on gists, so you are welcome to pull changes from my fork, if you like.
Thanks for the script, Diep!
Comment on line #13-17. It would be a bit more robust to do this for dependencies instead:
Builds pass for trusty, vivid and wily. I don't see /usr/local/share/info/dir exists in fresh install of Ubuntu, so I remove the code to handle conflict.
@biocyberman: build-dep emacs24 will pull some unnecessary development packages, like gtk things.
@favadi While I can see the value in testing with travis against vanilla/fresh environments, I can also see that this is not the case under which folks would want to install emacs-via-stow. Are you expecting this script to be run only on fresh-installed systems?
Also, in the revisions of the above script, I don't see any changes since April. (?)
Hi Thanks for sharing. However, this is version is not what I need. How should I uninstall this, after I installed using your script?
Hi, trying to compile emacs 25.1 on Ubuntu 16.04. The installed packages gives me a lot, except for:
Should Emacs use a relocating allocator for buffers? no
Especially the last one would be useful to have, I think. For some reason the mouse still behaves a little weirdly inside the emacs window.
Hello. Thanks for the script.
On a fresh install of
I'm not adept enough at scripting to pose a change, but hope this helps others.