Package Details: emacs-pgtk-native-comp-git

Git Clone URL: (read-only, click to copy)
Package Base: emacs-pgtk-native-comp-git
Description: GNU Emacs. Development master branch.
Upstream URL:
Licenses: GPL3
Conflicts: emacs, emacs-27-git, emacs-git, emacs-nox, emacs-pretest, emacs-seq, emacs26-git, emacs28-git
Provides: emacs, emacs-27-git, emacs-git, emacs-nox, emacs-pretest, emacs-seq, emacs26-git, emacs28-git
Replaces: emacs, emacs-27-git, emacs-git, emacs-nox, emacs-pretest, emacs-seq, emacs26-git, emacs28-git
Submitter: flatwhatson
Maintainer: TomFryers
Last Packager: TomFryers
Votes: 15
Popularity: 0.012062
First Submitted: 2020-08-21 14:09 (UTC)
Last Updated: 2022-05-08 14:32 (UTC)

Pinned Comments

flatwhatson commented on 2020-09-22 00:05 (UTC)

Native-comp emacs can take a while to compile, especially if you're only using 1 core. Make sure you have customized MAKEFLAGS in /etc/makepkg.conf to use all your cores:

This package builds with make NATIVE_FULL_AOT=1 by default, which native-compiles all the built-in Elisp. Edit the PKGBUILD, search for FAST_BOOT= and make it FAST_BOOT="YES" to get a shorter build time, at the cost of lazily native-compiling core Elisp at runtime.

Latest Comments

tekato commented on 2022-06-05 17:03 (UTC)

Can we consider using the Github mirror instead? It's much faster to pull compared to Savanna.

TomFryers commented on 2022-06-02 19:50 (UTC)

@AlynxZhou I think you happened to build a dodgy commit. Should be fixed since 43b0210f.

AlynxZhou commented on 2022-06-02 08:12 (UTC)

Hello, I use this PKGBUILD to build emacs git yesterday, and I got some error while building, I put my building output here:

Another info is that I tried, it builds successfully, the difference is that this one disables XINPUT2 (should be useless for PGTK?), and uses mold to link (but the error happens in lisp complication).

TomFryers commented on 2022-02-22 19:56 (UTC)

I’ve updated this package. It now follows the Emacs master branch. In particular, this package now behaves quite similarly to emacs-git (since native-comp and PGTK were merged, and emacs-git enables both by default). The differences are:

  • xwidgets, GPM and ALSA are enabled by default, as they were previously.
  • Emacs is built with NATIVE_FULL_AOT=1. This is a change from the old behaviour, but it helps to justify this package’s (a) existence and (b) name.

Some options have been removed. I doubt anyone was using them, but if you were, then I may be able to add them back, provided Emacs 29 supports them.

Thaodan commented on 2021-12-19 22:00 (UTC)

Both features are now in master please, switch the branch.

chmouel commented on 2021-12-03 13:53 (UTC)

28.0.90 is out

haawda commented on 2021-11-03 23:05 (UTC)

I found a workaround for my problem in reddit: Put

(unless (fboundp 'x-select-font) 
  (defalias 'x-select-font 'pgtk-popup-font-panel "Pop up the font panel. This function has been overloaded in Nextstep."))

into your startup file.

haawda commented on 2021-09-05 12:55 (UTC) (edited on 2021-09-07 10:29 (UTC) by haawda)

Can someone please confirm, that the "Set default font"-dialog stopped to provide a gtk menu and provides the old fashioned emacs font choosing dialog now?

It worked in, but not in or

kaji-ryoji commented on 2021-06-22 14:48 (UTC)

When I'm opening emacs again, there is a flood of warnings along the lines of

Warning (comp): /usr/share/emacs/28.0.50/lisp/emacs-lisp/*.el: Error: File error Opening output file Disable showing Disable logging

Is that to be expected?

yin commented on 2021-05-18 13:30 (UTC)

@flatwhatson yes i can. my tmp is mounted with noexec which was why was failing... so i just mount -o remount,exec /tmp... i hate this

thanks for the support @flatwhatson

flatwhatson commented on 2021-05-18 13:22 (UTC)

@yin The relevant error there is: error: /tmp/libgccjit-EWQyzF/ failed to map segment from shared object

Is your /tmp working correctly? Can you touch /tmp/foo?

yin commented on 2021-05-18 12:54 (UTC)


flatwhatson commented on 2021-05-18 12:24 (UTC)

@yin Please upload src/emacs-git/config.log, this should include the actual error from the failing smoke test.

yin commented on 2021-05-18 12:16 (UTC)

this is coming from src/emacs-git/configure

  17631 if ac_fn_c_try_run "$LINENO"
  17632 then :
  17634 else $as_nop
  17636   as_fn_error $? "Installed libgccjit has failed passing the smoke test.

yin commented on 2021-05-18 12:08 (UTC)

@japhir i have everything at 11.1.0

$ pacman -Qs gcc
local/gcc 11.1.0-1 (base-devel)
    The GNU Compiler Collection - C and C++ frontends
local/gcc-ada 11.1.0-1
    Ada front-end for GCC (GNAT)
local/gcc-libs 11.1.0-1
    Runtime libraries shipped by GCC
local/lib32-gcc-libs 11.1.0-1 (multilib-devel)
    32-bit runtime libraries shipped by GCC
local/libgccjit 11.1.0-1
    Just-In-Time Compilation using GCC.

MithicSpirit commented on 2021-05-18 11:25 (UTC)

@yin @japhir gcc-libs 11.1.0 is in core: Maybe you the repos you are pulling from haven't updated yet? (note that since the previous version of libgccjit required version 10 and this one requires version 11 you may need to use the -d/--nodeps flag).

japhir commented on 2021-05-18 10:53 (UTC)

@yin: that's probably because libgccjit now requires gcc-libs=11.1.0, which is not in [core]. I've been trying to figure it out as well…

yin commented on 2021-05-18 02:31 (UTC)

issues installing this. full log:

Karrq commented on 2021-05-17 09:26 (UTC)

@miguelbernadi Since nativecomp has been merged into master, technically all packages that are based on emacs master will have native compilation now.

And reading the PKGBUILD you can see this package is based on a merge of both, and checking the source it's only 14 commits behind master at the time of writing, so this package is definitely not abandoned...

Maybe the PKGBUILD just needs some refactoring to explain the new status but other than that I think it's good to use...

miguelbernadi commented on 2021-05-03 12:16 (UTC)

The native-comp branch was merged to master on April 25th. Is this AUR package going to change or be abandoned like Is there going to be another way to get the pgtk branch until that is merged as well?

japhir commented on 2021-04-20 09:05 (UTC) (edited on 2021-04-29 09:39 (UTC) by japhir)

Hey I don't know where to post questions, so I thought I'd do it here. I love the package! It renders fonts much nicer, feels snappier, and restarts the client when it crashes (I make my emacsclient crash every now and then by running computationally expensive R code through ess).

My main question is: how can I get the clipboard sharing between other wayland apps and emacs working again? I'm on sway, and have wl-clipboard-git installed, but since switching copy/paste doesn't work anymore. When I select stuff in vusual-mode and yank, I also can no longer paste it outside of emacs.

EDIT: further debugging: this problem no longer persists after I restart the emacs daemon. I have no idea why, but if it works it works! systemctl --user restart emacs.service is all it takes.

ohhskar commented on 2021-04-20 08:03 (UTC)

@MithicSpirit @Thaodan Got it working now after rebuilding. Thanks for the help!

mintsoup commented on 2021-04-19 22:24 (UTC)

Thanks for the package! It compiles and runs fine, but it appears the native elisp modules can't be loaded. Emacs doesn't load my init file, and most of the builtin functionality is broken (dired, major and minor modes, everything). What could be wrong? I am using the exact same PKGBUILD, only enabled link-time optimization. This also happened with FAST_BOOT disabled.

MithicSpirit commented on 2021-04-19 14:12 (UTC)

@ohhskar btw the issue has been fixed; try rebuilding the package now.

Thaodan commented on 2021-04-18 23:42 (UTC)

Hey watch for The bug is fixed however the fix may be not the branch here atm. If you want you can grab the fix from my branch:

MithicSpirit commented on 2021-04-18 17:09 (UTC)

@ohhskar this is an issue with a recent change to the feature/native-comp branch. From looking at the source code, it appears to have already been fixed, though it has yet to be merged into git://

ohhskar commented on 2021-04-18 09:59 (UTC) (edited on 2021-04-18 10:00 (UTC) by ohhskar)

I'm getting an error when running emacs from any directory other than usr/bin. I'm getting emacs: could not resolve realpath of "emacs": No such file or directory. Running emacs in the /usr/bin does not produce this error, nor does inputting the whole location.

In addition, creating an emacs directory in the current directory removes the initial error, but produces another one: emacs: /home/ohhskar/../native-lisp/28.0.50-eb000c8e/preloaded/window-0d1b8b93-581f9fcd.eln: cannot open shared object file: No such file or directory.

I've tried rebuilding the package but the error still persists.

toshi_pp commented on 2021-03-25 15:10 (UTC)

Hi, I face a bug which compiles packages anytime. It is already reported to upstream and fixed. I test the fix locally and it works correctly. Would you update your repository?

memeplex commented on 2021-02-07 06:54 (UTC)

Hi, do you know if the GTK backend support rendering of pixmaps and other GUI elements at the appropriate scaling factor? Last time I checked Emacs code, some rendering routines were deeply buried into C/Lisp code, too custom and difficult to adapt to varying scaling factors.

flatwhatson commented on 2021-02-07 02:34 (UTC)

@kris7t I rolled the pgtk-nativecomp branch back to 146655 due to compilation errors, but I guess you managed to kick off a build in the few minutes while it was broken. Sorry about that!

kris7t commented on 2021-02-06 23:06 (UTC) (edited on 2021-02-06 23:14 (UTC) by kris7t)

Compilations seems to fail right after creating bootstrap-emacs.pdmp like this:

According to the backtrace, it seems Emacs is trying to funcall into a NULL pointer:

#0  0x0000000000000000 in  ()
#1  0x0000555f36d76f61 in Ffuncall (nargs=1, args=0x7ffe1526aaa8) at eval.c:3006
#2  0x0000555f36d76fe8 in call0 (fn=<optimized out>) at eval.c:2859
#3  0x0000555f36d25d8b in set_minibuffer_mode (buf=buf@entry=0x7f12592d3f9d, depth=depth@entry=0)
    at minibuf.c:947
#4  0x0000555f36d27730 in get_minibuffer (depth=0) at minibuf.c:976
#5  0x0000555f36c41e76 in make_frame (mini_p=mini_p@entry=true) at frame.c:981
#6  0x0000555f36c41eca in make_initial_frame () at frame.c:1106
#7  0x0000555f36c8e9b8 in init_window_once_for_pdumper () at window.c:8168
#8  0x0000555f36d60973 in pdumper_load
    (dump_filename=<optimized out>, argv0=<optimized out>, original_pwd=original_pwd@entry=0x555f383b2d80 "/home/kris/.cache/paru/clone/emacs-pgtk-native-comp-git/src/emacs-git/lisp") at pdumper.c:5592
#9  0x0000555f36c32003 in load_pdump
    (original_pwd=0x555f383b2d80 "/home/kris/.cache/paru/clone/emacs-pgtk-native-comp-git/src/emacs-git/lisp", argv=<optimized out>, argc=<optimized out>) at emacs.c:886
#10 main (argc=<optimized out>, argv=<optimized out>) at emacs.c:1094

I'm not sure whether upstream is broken currently, or the fault is due to running glibc 2.33-3. Nevertheless, the previous emacs-pgtk-native-comp-git I compiled runs fine even with the new glibc. I'm using NATIVE_FULL_AOT=1 (i.e., FAST_BOOT=).

flatwhatson commented on 2021-01-20 11:07 (UTC)

@leejuyuu autoconf is part of the base-devel group which is assumed to be installed when building with makepkg and should not be included in dependencies.


leejuyuu commented on 2021-01-20 09:59 (UTC)

Hello, I've read the PKGBUILD, and it seems to depend on autoconf. Is it possible to add this package in the dependencies? Thanks!

philippe commented on 2021-01-11 22:12 (UTC) (edited on 2021-01-11 22:12 (UTC) by philippe)

@memeplex this is a feature branch and there's a lot of interest in it becoming mainline at some point. For now, users can checkout the branch and test it. See [1] mailing list for last reported bug and [2] correction.



memeplex commented on 2021-01-11 21:44 (UTC)

@flatwhatson great to know, thanks! Maybe not the best place to discuss this, but very briefly how are you seeing upstream regarding a merge to master? Is it way too early or just early?

flatwhatson commented on 2021-01-11 21:39 (UTC)

@Rucikir @memeplex The pgtk-nativecomp branch built by this package has been tracking feature/pgtk since it moved to savannah.

You can see the combined commit history here:

memeplex commented on 2021-01-11 20:39 (UTC) (edited on 2021-01-11 20:40 (UTC) by memeplex)

Is flatwhatson's pgtk-nativecomp branch still updated? AFAICS the gtk work has been already merged upstream to a topic branch I understand this is native+gtk, not only gtk, but says "720 commits behind masm11:pgtk" while masm11's is "899 commits behind emacs-mirror:master".

Rucikir commented on 2020-12-13 15:50 (UTC)

Hi! Should this fetch feature/pgtk now that the branch is part of the upstream repo?

flatwhatson commented on 2020-11-17 06:50 (UTC)

@Thaodan I don't agree that regularly rebasing is "cleaner" when it comes to packaging software. How will someone work out what changed since their last build, if you've re-numbered everything with a rebase?

I maintain the branch which is used by this package, merge from the official native-comp branch on savannah frequently, and intentionally use merge-commits to ensure long-term stability of commit references.

Thaodan commented on 2020-11-17 06:23 (UTC)

If you want a cleaner branch you can grab mine, I rebase the upstream rebase of pgtk regulary against feature/native-comp from savanna:

flatwhatson commented on 2020-10-17 04:04 (UTC)

@titaniumbones Done, thanks for the heads-up!

titaniumbones commented on 2020-10-16 19:14 (UTC)

@flahtwatson, are you able to pull in recent changes to xwidget.c, which fix ? Would be really great to have them! Thanks.

johnhamelink commented on 2020-10-03 17:48 (UTC) (edited on 2020-10-03 17:49 (UTC) by johnhamelink)

Hi! The systemd unit file (mentioned here in the wiki) at /usr/lib/systemd/user/emacs.service is incorrect or otherwise does not work for me:

ExecStart=@/usr/bin/emacs emacsd --fg-daemon

Removing the @ symbol fixes things:

ExecStart=/usr/bin/emacs emacsd --fg-daemon

Crandel commented on 2020-09-24 11:04 (UTC) (edited on 2020-09-24 17:37 (UTC) by Crandel)

I got this error during compilation

 ELC+ELN   progmodes/inf-lisp.elc
 ELC+ELN   progmodes/js.elc
Symbol’s function definition is void: cc-bytecomp-is-compiling
make[2]: *** [Makefile:314: progmodes/js.elc] Error 255
make[2]: Leaving directory '/data/linux/bb/emacs-pgtk-native-comp-git/src/emacs-git/lisp'
make[1]: *** [Makefile:348: compile-main] Error 2
make[1]: Leaving directory '/data/linux/bb/emacs-pgtk-native-comp-git/src/emacs-git/lisp'
make: *** [Makefile:422: lisp] Error 2
==> ERROR: A failure occurred in build().

P.S. Was fixed by editing PKGBUILD


flatwhatson commented on 2020-09-22 00:05 (UTC)

Native-comp emacs can take a while to compile, especially if you're only using 1 core. Make sure you have customized MAKEFLAGS in /etc/makepkg.conf to use all your cores:

This package builds with make NATIVE_FULL_AOT=1 by default, which native-compiles all the built-in Elisp. Edit the PKGBUILD, search for FAST_BOOT= and make it FAST_BOOT="YES" to get a shorter build time, at the cost of lazily native-compiling core Elisp at runtime.