GNU bug report logs - #45455
[nextstep]: Emacs master does not compile on Apple Silicon (arm64)

Previous Next

Package: emacs;

Reported by: Artem Loenko <artyom.loenko <at> mac.com>

Date: Sun, 27 Dec 2020 11:54:02 UTC

Severity: normal

Tags: fixed

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Artem Loenko <artyom.loenko <at> mac.com>
To: 45455 <at> debbugs.gnu.org
Subject: bug#45455: [nextstep]: Emacs master does not compile on Apple Silicon (arm64)
Date: Sun, 27 Dec 2020 11:53:26 +0000
[Message part 1 (text/plain, inline)]
Hello there,

Emacs master (as of 8bc727d0b4 "Fix the recent `length' doc string addition" commit) does not compile on Apple Silicon (M1) anymore. Compilation fails with the following error:

./temacs --batch  -l loadup --temacs=pbootstrap
make[1]: *** [bootstrap-emacs.pdmp] Killed: 9
make: *** [src] Error 2

When you try to run the `temacs` under lldb, it shows the following problem:

(lldb) process launch
Process 75320 launched: '/Users/dive/Projects/emacs/src/temacs' (arm64)
Loading loadup.el (source)...
...
Eager macro-expansion failure: (void-variable search-slow-speed)
Eager macro-expansion failure: (void-variable search-slow-speed)
Symbol’s value as variable is void: search-slow-speed
Process 75320 exited with status = 255 (0x000000ff) 

The problem was introduced in the "Merge from origin/emacs-27” commit – https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=90ec81f5b243b6b7b3ebe2de394b20e8078ebc96 and I believe it was unintentional revert of DO_CODESIGN within src/Makefile.in:

diff --git a/src/Makefile.in b/src/Makefile.in
index 39c0f12fe6..19304cca04 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -338,7 +338,7 @@ HAVE_PDUMPER = @HAVE_PDUMPER@
 
 ## ARM Macs require that all code have a valid signature.  Since pump
 ## invalidates the signature, we must re-sign to fix it.
-DO_CODESIGN=$(patsubst aarch64-apple-darwin%,yes,@configuration@)
+DO_CODESIGN=$(patsubst arm-apple-darwin%,yes,@configuration@)

The following patch reverts the change and fixes the problem:

diff --git a/src/Makefile.in b/src/Makefile.in
index 19304cca04..39c0f12fe6 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -338,7 +338,7 @@ HAVE_PDUMPER =
 
 ## ARM Macs require that all code have a valid signature.  Since pump
 ## invalidates the signature, we must re-sign to fix it.
-DO_CODESIGN=$(patsubst arm-apple-darwin%,yes,@configuration@)
+DO_CODESIGN=$(patsubst aarch64-apple-darwin%,yes,@configuration@)
 
 # 'make' verbosity.
 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@

Regards,
Artem Loenko

[path_do_codesign.patch (application/octet-stream, attachment)]

This bug report was last modified 4 years and 207 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.