Skip to content

emacs: Build from git instead of tarball to fix native compilation#170467

Merged
adisbladis merged 1 commit intoNixOS:masterfrom
adisbladis:emacs-from-git
Apr 26, 2022
Merged

emacs: Build from git instead of tarball to fix native compilation#170467
adisbladis merged 1 commit intoNixOS:masterfrom
adisbladis:emacs-from-git

Conversation

@adisbladis
Copy link
Member

@adisbladis adisbladis commented Apr 26, 2022

Description of changes

Quoting @collares from #170426:

The difference between the two versions is that one is built from the
tarball, while the other is built from Git. The tarball includes
byte-compiled (.elc) files but not native-compiled (.eln)
files. The build notices the .elc files and does not rebuild them,
but native-compilation is a side-effect of byte-compilation and so
the .eln files aren't built either.

Closes #170426

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added the 6.topic: emacs Text editor label Apr 26, 2022
Quoting @collares from NixOS#170426:
> The difference between the two versions is that one is built from the
> tarball, while the other is built from Git. The tarball includes
> byte-compiled (.elc) files but not native-compiled (.eln)
> files. The build notices the .elc files and does not rebuild them,
> but native-compilation is a side-effect of byte-compilation and so
> the .eln files aren't built either.
@collares collares self-requested a review April 26, 2022 19:32
Copy link
Member

@collares collares left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

(I find it interesting that both https://git.savannah.gnu.org/cgit/emacs.git/snapshot/emacs-28.1.tar.gz and https://git.savannah.gnu.org/cgit/emacs.git/snapshot/emacs-emacs-28.1.tar.gz exist and extract to the same thing!)

@ofborg ofborg bot requested review from jwiegley and lovek323 April 26, 2022 19:37
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Apr 26, 2022
@adisbladis adisbladis merged commit 1651000 into NixOS:master Apr 26, 2022
@jian-lin
Copy link
Contributor

Seem to be late for the party. Just compiled emacsNativeComp with this patch, and it works well.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: emacs Text editor 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

emacsNativeComp: nearly half native-compiled eln files for builtin libs are missing

3 participants