I’m sitting on the carpet, the laptop on an Ikea stool in front of me, the music of Suzanne Ciani from 1975 playing on a tiny speaker.
Emacs 28.1 was recently released.
To build from source, I had to delete the current work tree. I don’t understand why.
git pull git checkout emacs-28.1 make distclean ./configure make Wrong type argument: fixnump, nil
I am guessing that those clean targets are missing stuff, I don’t know.
rm -rf * git reset --hard emacs-28.1 ./configure make
Once you have it built, it’s time to install it. I still use stow to install software I build myself into “/usr/local”.
The key is to use “-e”.
env prefix=/usr/local/stow/emacs make -e install cd /usr/local/stow sudo stow emacs
These are my notes for the next release. 😀
#Emacs
(Please contact me if you want to remove your comment.)
⁂
Perhaps `make bootstrap` would have been sufficient?
– Adam 2022-04-06 20:27 UTC
---
No, as far as I remember I used that multiple times to no avail.
– Alex 2022-04-06 20:36 UTC
---
In a discussion with @linm I mentioned the problem with using “--prefix” when calling “make”. I think the “problem” (which one would not notice for Emacs on its own) is that the emacs binary will load files from “/usr/local/stow/emacs/share” instead of “/usr/local/share” – in a way one only “needs” the link for the bin directory, not the others. In most cases, this is no problem.
A discussion of the difference is in the “stow” manual, however:
Why is this important? What’s wrong with Perl, for instance, looking for its files in “/usr/local/stow/perl” instead of in “/usr/local”? The answer is that there may be another package, e.g., “/usr/local/stow/perl-extras”, stowed under “/usr/local”. If Perl is configured to find its files in “/usr/local/stow/perl”, it will never find the extra files in the ‘perl-extras’ package, even though they’re intended to be found by Perl. On the other hand, if Perl looks for its files in “/usr/local”, then it will find the intermingled Perl and ‘perl-extras’ files. – 12 Compile-time vs Install-time
12 Compile-time vs Install-time
I guess I missed these instructions for Emacs, though:
If you try this with Emacs, then the new value for prefix in the ‘make install’ step will cause some files to get recompiled with the new value of prefix wired into them. In Emacs 19.23 and later,⁸ the way to work around this problem is: … “make install-arch-dep install-arch-indep prefix=/usr/local/stow/emacs” ⁸ As I write this, the current version of Emacs is 19.31. – 12.2 GNU Emacs
– Alex 2022-04-09 16:55 UTC
---
A year later… and “git pull && ./configure && make” runs into an error. Let’s try “make bootstrap” instead.
sudo mkdir /usr/local/stow/emacs sudo chown alex.alex /usr/local/stow/emacs make install-arch-dep install-arch-indep prefix=/usr/local/stow/emacs
It did a bunch of stuff, no recompiling, and ended with “make: Nothing to be done for ’install-arch-indep’.”
OK. Time to stow!
cd /usr/local/stow sudo stow emacs
Now, if like me, you didn’t use stow correctly before and you’re getting lots of error messages. In order to just trash the files and directories:
sudo stow emacs 2>&1 \ |sed --silent 's/ \* existing target is neither a link nor a directory: /trash ..\//p' \ |sudo sh sudo trash ../bin/emacs
And now it should work:
sudo stow emacs emacs --version
Yay! “GNU Emacs 30.0.50”! 😬
– Alex 2023-06-04 16:57 UTC
git checkout master git pull make bootstrap sudo chown -R alex.alex /usr/local/stow/emacs make install-arch-dep install-arch-indep prefix=/usr/local/stow/emacs cd /usr/local/stow sudo stow emacs
This seems to have worked!
alex@melanobombus /u/l/stow> emacs --version GNU Emacs 30.0.50 Development version f27dd1f954bc on master branch; build date 2023-12-29.
Sadly, this Emacs starts up in text mode!
The missing piece is "pure GTK". Use that, and run make again.
./configure --with-pgtk make install-arch-dep install-arch-indep prefix=/usr/local/stow/emacs