unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Artem Loenko via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Philipp Stephani <p.stephani2@gmail.com>
Cc: 45455@debbugs.gnu.org
Subject: bug#45455: [nextstep]: Emacs master does not compile on Apple Silicon (arm64)
Date: Sun, 27 Dec 2020 21:37:23 +0000	[thread overview]
Message-ID: <7CA99D96-DBD2-4E28-9B62-CCA1A2DD025A@mac.com> (raw)
In-Reply-To: <CAArVCkQYxDzPnu6n3W+j=Nv7rtH_O4dDni7rHmS6kVAi7DFppA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2433 bytes --]

> DO_CODESIGN=$(patsubst arm-apple-darwin%,yes,arm-apple-darwin20.2.0)
> 
> indicating that at least here the architecture was detected as
> arm-apple-darwin20.2.0. On master it's aarch64-apple-darwin20.2.0 for
> me as well.

I believe that you see `arm-apple-darwin` in the emacs-27 branch because aarch64 support was incorporated only for Emacs master branch and was not backported. There is a commit – https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=5d89a9c2846d32b4726faaf5c8652f3f23dc7d73 <https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=5d89a9c2846d32b4726faaf5c8652f3f23dc7d73> with the following changes in the master:

diff --git a/build-aux/config.guess b/build-aux/config.guess
index 92bfc33e29..e94095c5fb 100755
--- a/build-aux/config.guess
+++ b/build-aux/config.guess
@@ -2,7 +2,7 @@
 # Attempt to guess a canonical system name.
 #   Copyright 1992-2020 Free Software Foundation, Inc.
 
-timestamp='2020-04-26'
+timestamp='2020-07-12'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -1342,6 +1342,9 @@ EOF
     *:Rhapsody:*:*)
 	echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
 	exit ;;
+    arm64:Darwin:*:*)
+	echo aarch64-apple-darwin"$UNAME_RELEASE"
+	exit ;;
     *:Darwin:*:*)
 	UNAME_PROCESSOR=`uname -p`
 	case $UNAME_PROCESSOR in

But in the `emacs-27` branch it calculates with a simple `uname -r` – to the `arm-apple-darwin` (I was able to reproduce it locally on the `emacs-27` branch).

> IIUC the only thing that this line does is to check whether to
> codesign the resulting binary. That's necessary on Apple Silicon.
> Maybe we should codesign on all macOS installations? It shouldn't hurt
> even if it's not needed.

Yes, you are right. The problem has nothing to do with `temacs`; it is about signing. I tried to call `codesign` explicitly, and everything works fine in this case. About codesigning for all macOS installations, I am not sure. Such change can break things in many unexpected ways from my point of view. It is better to stay on the safe side.

I see two options:

- Backport `arm64:Darwin:*:*)` support within `config.guess` to emacs-27 branch and switch to `aarch64-apple-darwin` everywhere
- Do not backport, but switch to `aarch64-apple-darwin` everywhere anyway :)

What do you think?

Regards,
Artem Loenko


[-- Attachment #2: Type: text/html, Size: 5267 bytes --]

  reply	other threads:[~2020-12-27 21:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-27 11:53 bug#45455: [nextstep]: Emacs master does not compile on Apple Silicon (arm64) Artem Loenko via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-12-27 14:12 ` Philipp Stephani
2020-12-27 20:12   ` Artem Loenko via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-12-27 20:30     ` Philipp Stephani
2020-12-27 21:37       ` Artem Loenko via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2020-12-28  3:27         ` Eli Zaretskii
2020-12-28 11:06           ` Artem Loenko via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-12-28 11:11             ` Philipp Stephani
2020-12-28 11:42               ` Artem Loenko via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-12-28 11:44                 ` Philipp Stephani
2020-12-29 19:26                   ` Artem Loenko via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-12-29 19:45                     ` Philipp Stephani
2020-12-29 20:41                       ` Artem Loenko via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-12-30  2:38                         ` Lars Ingebrigtsen
2020-12-28 11:08         ` Philipp Stephani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7CA99D96-DBD2-4E28-9B62-CCA1A2DD025A@mac.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=45455@debbugs.gnu.org \
    --cc=artyom.loenko@mac.com \
    --cc=p.stephani2@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).