DocInLA · 2022-02-23 08:46
Hi all,
Sorry for the basic question. I was reading that both native compilation and pure gtk were both merged. I'm on fedora 35. What is the best way to install emacs with these features? Do I have to build it from source? And if so are there specific flags or options that need to be enabled for it to be compiled with those options enabled? or are they enabled by default now?
Thanks!
EDIT: I managed to build it from source using the following and it (mostly) works:
Into a directory: `git clone` [`https://git.savannah.gnu.org/git/emacs.git`](https://git.savannah.gnu.org/git/emacs.git)
Then ran: `./autogen.sh` in that directory
Then ran: `./configure --with-pgtk --with-native-compilation --with-mailutils`
It kept failing until I installed all the following additional packages with `sudo dnf install`:
* autoconf (to run the ./autogen.sh command)
* texinfo (for the makeinfo requirement)
* gtk3-devel (for the pgtk requirement)
* libgccjit-devel (for the native-comp requirement)
* gnutls-devel (because it needed gnutls-devel)
* ncurses-devel (it needed something in this package but I forget what)
Then ran `make` (took a while) then `sudo make install` in the directory and it installed! Emacs 29 I believe to `/usr/local/bin`
​
cathedral_mistreat · 2022-02-23 10:24
Try
sudo dnf copr enable bhavin192/emacs-pretest
sudo dnf update emacs # or sudo dnf install emacs
https://www.reddit.com/r/emacs/comments/rzxtv4/emacs_pretest_2809x_build_for_fedora_with_native/
DocInLA · 2022-02-23 17:09
Ah thanks for this, I ended up building it from source after much trial and error I have it (mostly) installed.
jimehgeek · 2022-02-24 03:43
If it helps, I started putting together a little script for Linux the other day that’ll build, install and allows switching between installed versions.
It’s just in my dotfiles repo for now: https://github.com/jimeh/dotfiles/blob/main/bin/evm
I’m on Ubuntu 20.04, but I think it should work on Fedora too, except the build-deps command as it attempts to install Ubuntu packages.
The version switching is cause I tend to build from master every now and then, and might want to easily roll back to a previous build.
As far as I know the only Ubuntu specific stuff is the command that installs system deps, but the list of Ubuntu packages might be handy for you to cross reference against Fedora packages. Oh, and the list of packages probably has things that aren’t needed, but it’s a quick and hacky script for now.
My primary platform is macOS, and I have a whole slew of stuff setup to automate nightly builds for macOS. But I do also want and need nightly builds for Linux on a regular basis, so I expect to maintain and improve that script for a while at least.
DocInLA · 2022-02-25 04:46
Quick question for you if you happen to know the answer. After building emacs from source and doing a "make install" the only desktop file that seems to show up in gnome is "emacsclient" which opens a blank window to a scratch buffer. Is there any easy way to also get it to install an emacs link to the main emacs instance? Right now I have to type emacs into a terminal to get it to launch the proper version
jimehgeek · 2022-02-25 08:06
Ah, yes I forgot to handle the Gnome integration. I launch the Emacs GUI via a global keyboard shortcut I’ve set up in Gnome, so I didn’t even think to check if proper Gnome integration was working.
I’ll have a look at getting that working in the next day or two.
For right now though, this stackoverflow answer should hopefully let you create your own `.desktop` file: https://unix.stackexchange.com/a/103222