New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emacs 30 packages fail to build with native comp on some machines #318
Comments
Here is the relevant diff for emacs between the new commit and old for that version bump: |
Flymake stuff doesn't seem relevant so probably one of these two: emacs-mirror/emacs@c146bd8...9d025ea |
I encountered this the other day (with |
Works now after updating emacs-overlay to f86e396 |
Will close since fixed on master |
Reopening. I'd tested the above commit on a different machine. Tried on the machine I encountered the issue on, exact same derivation, and fails. Have done a bunch of full rebuilds of that same derivation; they keep failing on one machine and passing on the other. |
Build succeeds with emacsUnstable. Also passes with emacsPgtk/emacsGit with nativeComp turned off. So likely an issue with native comp with one of the mentioned commits. emacsUnstable building with nativeComp makes it seem unlikely to be a libgccjit bug? |
Ok so its definitely emacs-mirror/emacs@ea9831b. However even without that revert, running emacs without emacsWithPackages, and installing packages from inside emacs works, so not a compilation issue. Either that emacs commit is buggy or part of the package native compilation machinery in nixpkgs needs to be updated. Well, still can't rule out a libgccjit bug that is only exposed by the aforementioned commit. That might actually make the most sense since it works on my intel laptop but not my amd desktop. |
The build line that hits the error seems to be https://github.com/NixOS/nixpkgs/blob/b75b059c747da4e2cd213c23895f49db94b57290/pkgs/build-support/emacs/melpa.nix#L82-L86 |
For now, I'm patching emacs as seen here: accelbread/config-flake@8e5e3ad Still don't have a root cause, but likely wont have time to investigate further for a bit. If someone else is facing this issue, feel free to chime in or take over. |
On your AMD machine, are you able to install and natively compile external packages outside of Nix (for example, with the default |
Yes, packages successfully native compile when using |
I meet this today as well. Packages cannot be natively compile with emacsGit. However, emacs unstable (29) can work. |
@Vonfry What CPU do you have? Maybe that can help narrow it down. |
@accelbread the following print is from lscpu
|
The cpu I am having the issue on is a 5950x. lscpu output:
|
Might be related to core count. Tried building with Works: nix-collect-garbage
nix build github:nix-community/emacs-overlay#emacsPgtk.pkgs.emacs --no-link --cores 1
nix build github:nix-community/emacs-overlay#emacsPgtk.pkgs.dash --no-link Fails: nix-collect-garbage
nix build github:nix-community/emacs-overlay#emacsPgtk.pkgs.emacs --no-link
nix build github:nix-community/emacs-overlay#emacsPgtk.pkgs.dash --no-link |
Reproduce with: let
f = builtins.getFlake "github:nix-community/emacs-overlay";
nixpkgs = f.packages.${builtins.currentSystem};
lib = f.lib.${builtins.currentSystem};
in
rec {
origEmacs = nixpkgs.emacsPgtk;
emacs = nixpkgs.emacsPgtk.overrideAttrs (o: {
enableParallelBuilding = false;
GNUMAKEFLAGS = "--shuffle=12346 " + o.GNUMAKEFLAGS or "";
});
epkgs = lib.emacsPackagesFor emacs;
dash = epkgs.dash;
} nix build -f . 'dash' |
I forwarded this report upstream: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=63288 Hopefully they might have some insight. |
So since it might be a core count thing, and I have 32 cores, I've tried building with all the values of the The failing values are: 20, 22, and 25 through 32. (Have not tested past 32) Odd that 21, 23, and 24 work. It consistently works with the working core counts, and fails with the failing core counts. |
I've pushed a commit removing the patch; without any knowledge of the byte-compiler, the best I can do is to guess and check. |
Never mind, I reverted since I encountered the error described in this issue immediately after removing the patch, whereas adding back the patch fixed it for me.
Hmm, b47e82d is working for me. It doesn't seem to be a matter of the overlay revision; different people in this thread seem to be encountering the issue at different revisions. I showed Mattias Engdegard this thread a while ago, but he doesn't believe that it was caused by his changes to the byte-compiler. Again, I'm not familiar with the details of the byte-compiler, so I won't be able to look into this for a while, if ever. |
Thanks @leungbk, things seem to be building now. |
Since 00f31a3, packages fail to build for emacsGit and emacsPgtk.
Since this is an automated version bump, seems it was triggered by an upstream change. Though the error log makes it seem the nix build stuff might need to be updated to accommodate it?
As a workaround, can use commit 3655d15.
To reproduce, run
'github:nix-community/emacs-overlay#emacsGit.pkgs.dash'
Log output:
The text was updated successfully, but these errors were encountered: