reddit / emacs
Are there any official/unofficial Debian packages for Emacs 28.2?
vfclists · 2022-10-19 18:49
I have compiled it a few times and it is a bit of a beast to compile.
I'd rather install from an existing package.
Emacs should be like PostgreSQL. As soon as there is a new release the packages arrive immediately, perhaps Emacs devel can do the same?
**Explanation** The PostgreSQL group create new packages for their latest releases even Debian is behind, so do a lot of other software development groups.
I swear I'm going to switch to Arch 😼😼
okeefe · 2022-10-19 20:06
> As soon as there is a new release the packages arrive immediately.
That is not how Debian stable works.
[Debian unstable](https://packages.debian.org/unstable/emacs) has 28.2 whereas [testing](https://packages.debian.org/testing/emacs) is still on 27.1.
With [apt pinning](https://wiki.debian.org/AptConfiguration) it's possible to mix-and-match releases (versus "upgrading" to unstable), but it can be a bit to juggle.
My personal recommendation is to build it yourself using `apt-get build-dep` to pull in the current emacs's dependencies assuming they're a close enough match for what 28.2 needs.
vfclists · 2022-10-19 20:21
I already did that to compile, but `libgccjit-10-dev` needs to be added if you want native compilation because Bullseye is still on Emacs 27.
Will I be able to install safely from Sid if I used apt pinning?
Some of these techniques have a nasty habit of pulling in additional packages that cause conflicts.
02d5df8e7f · 2022-10-19 23:39
>safely from Sid
never
c256 · 2022-10-20 02:04
The Debian people are talking with emacs-devel right now about how to integrate native-comp with the Debian infrastructure. It’s not rocket-science difficult, but there are a number of new requirements that have to be taken into account. It’ll get worked out soon, although that could easily be a month-long ‘soon’.
In the meantime, it’s not hard to build yourself, if you’re familiar with building C-based software. I’m suggest putting it somewhere distinct from the system emacs (I use /opt/emacs myself), so you can just nuke the entire tree when/if you move to the Debian version.
For those interested in details: if you want native-comp, you need to depend on libgccjit. Debian runs emacs for installing elisp packages (to byte-compile them, and to run tests, etc.), and the native-comp feature generally works by kicking off an asynchronous background process to compile to native code triggered by byte-compilation, so there’s some coordination involved to make sure the async native-comp jig processes interact correctly with makefioes that run emacs in batch mode. **Plus**, there are some extra refinements involved in making sure that the emacs invocations from apt (which run as root) don’t accidentally litter either root’s homedir with the jit cache, or do the same as root in the user homedir, or similar. **Then**, there’s a real unresolved question about when native-compiled elisp should be shared between users and when it should not (imagine “apt-get elpa-magit”). Since this is a brand new feature, there are a bunch of these sort of kinks to work out. It’ll get there, but it’ll take a little time.
holgerschurig · 2022-10-20 05:08
> is a beast to compile
Nah, not really.
I made myself a Makefile with pseudo-targets to ease this repetitive thing, and as a keepsake for the knowledge:
https://github.com/holgerschurig/emacs-doom-config/blob/master/Makefile#L12
You can then do things like "make confemacs" (configure) or make make compemacs". Or even just type "make" to see a bit of help text.
I use this regularly on Debian Sid (at home) and Debian Stable (at work).
S_Nathan · 2022-10-20 07:02
Are you sure you need libgccjit-10? I’m pretty sure that I’ve built Emacs with native-compilation on debian stable before.
yapfff · 2022-10-20 07:16
libgccjit-10 is in Debian stable (Bullseye). I'm running a self compiled Emacs 28.2 on Bullseye with JIT compilation and no problem. All the dependencies are there.
S_Nathan · 2022-10-20 07:23
I just checked on my server, which runs stable and somehow missed that libgccjit-10 is available alongside libgccjit-9. Silly me. Anyway, my point stands: it should (still) be possible to compile and run Emacs with native-compilation on Debian stable.
vfclists · 2022-10-20 07:46
The problem is when you run `apt build-dep emacs` to get the Emacs dependencies libgccjit is not included because the build-dep is based on Debian Bullseyes Emacs which is 27.1.
So you have to install libgccjit or else `./configure` will report that native compilation is not supported.
S_Nathan · 2022-10-20 07:53
That’s probably because the Debian package for Emacs does not need libgccjit-10-dev, as it does not build with `--native-compilation`.
So just install libgccjit-10-dev as an extra and you should be good to go.
EDIT: I took a look at my old ansible files where I did exactly what you are attempting, and I additionally installed these packages, but don’t remember why: `aspell-de aspell-en libjansson-dev w3m`
vfclists · 2022-10-20 09:12
By this I mean that the PostgreSQL group create their own DEB packages which are always up to date and work fine.
Which means Emacs devel should be able to do the same, shouldn't they?
SlowValue · 2022-10-20 09:35
[emacswiki mentions two sources](https://www.emacswiki.org/emacs/EmacsSnapshotAndDebian).
I was able to install Emacs packages from the second source [emacs.ganeff.de](http://emacs.ganneff.de/pool/main/e/emacs-snapshot/). The packages are named `emacs-*-28.1.*_amd64.deb`
Emacs itself reports to be an 29.x version. I'm not using that installation, but it seems to work.
vfclists · 2022-10-21 05:59
The [emacs.ganeff.de](http://emacs.ganneff.de/pool/main/e/emacs-snapshot/) sources only go up to July 2022. Since then they've stopped.