reddit / emacs

Emacs on RHEL8

IamGROD · 2022-12-21 17:27
At work we are using RHEL 8. I do not have root access. I have asked and will not be given root access. RHEL 8 has emacs 26.1 installed and I want to use a more up to date version. The platform does not have most of the source libraries installed. The configure step of compiling emacs from source fails due to a variety of missing dependencies. Each time I try to build one of them, another one is missing. This seems like a deep rabbit hole to go down that will take a lot of time. Is there a way to statically link the emacs binary when building on another machine and move it over to the RHEL8 machines? Is there any other way to get a more modern version of emacs on these machines?
shassard · 2022-12-21 18:35
I’d be tempted to try an AppImage in your case. I haven’t tried this though. https://appimage.github.io/Emacs/
kombac · 2022-12-21 19:04
You have several options 1. If you use toolbox/distrobox, you can use those 2. If you have docker/podman privs you can install or build using those (though you have to pass X variables and mount directories) 3. You can use the rootless installation of nix or guix 4. You can `nix bundle` emacs on another machine and upload it to your work machine. It will bundle all the deps 5. Flatpak 6. AppImage 7. Snap 8. Install emacs on your personal machine and ssh into your work machine with tramp 🙂
IceOleg · 2022-12-21 19:16
I'm using Emacs as Flatpak, which works just fine for my usage. I did end up creating a quick a Flatpak extension to provide Ripgrep inside the sandbox (for full text org search). I'd be happy to share a manifest for that. Edit: The Flatpak from Flathub is Emacs 28.2
IamGROD · 2022-12-22 00:07
I tried running this one and I am missing libgnutls.so.30, GNUTLS\_3\_6\_9 not found. I tried to build this gnutls from source but this turned into an un-ending number of other libraries and tools I needed to build. Any thoughts on getting around this issue?
IamGROD · 2022-12-22 00:07
Flatpack is not installed on our system. Is there a way to do this without being root?
IamGROD · 2022-12-22 00:15
I tried to use nix bundle and it created a huge 275mB image of emacs. I copied it over but it failed to run. It gave the message execvp (some long path I don't recognize) No such file or directory. Any ideas on this issue?
sebhoagie · 2022-12-22 00:36
I use Fedora Silverblue and work inside a container where I compile Emacs. Sounds like the best option. Then I have a desktop shortcut that does "toolbox run container-name emacs" so it runs as a UI application.
phr46 · 2022-12-22 01:27
If CentOS 8 has the same packages as a RHEL 8 install, you should be able to build Emacs on a CentOS 8 VM and move the built files to RHEL. The libraries installed should match in both envs. But then there was the whole CentOS Stream thing with CentOS moving to "just ahead" of RHEL instead of matching it, so I don't know.
thetemp_ · 2022-12-22 01:45
There's also a way to download RHEL from Red Hat for free as an individual. I don't recall the exact terms, but there's a sign-up on their website.
Different-Staff-4639 · 2022-12-22 01:59
I use it as a snap package on my work laptop and I haven't had any problem running doom emacs
kombac · 2022-12-22 03:45
I'm curious how you built it. If you use nixos-22.11 it should *ideally* work, but I moreso agree with the other comment; podman is much more fit for the rhel ecosystem and nix might not fit well (take selinux for instance). I'd suggest going the container route: * https://docs.fedoraproject.org/en-US/fedora-silverblue/toolbox * https://github.com/89luca89/distrobox * https://hub.docker.com/r/silex/emacs/#!
IceOleg · 2022-12-22 08:52
Flatpak needs a bunch of infrastructure, I doubt it.
National_Pressure · 2022-12-22 16:38
Use podman to start a container within that you can be root and do what you will. [This](https://unix.stackexchange.com/questions/472989/how-to-build-instance-of-emacs-to-run-on-an-x86-64-system-different-from-the-one) might give some clues as well.