From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Artem Loenko via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#45455: [nextstep]: Emacs master does not compile on Apple Silicon (arm64) Date: Sun, 27 Dec 2020 21:37:23 +0000 Message-ID: <7CA99D96-DBD2-4E28-9B62-CCA1A2DD025A@mac.com> References: <4F964265-C862-43DE-A1BB-252C0649167D@mac.com> Reply-To: Artem Loenko Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.40.0.2.32\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_5AA792E2-A750-4DDE-A69C-DA8E5089C514" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4431"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 45455@debbugs.gnu.org To: Philipp Stephani Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 27 22:38:12 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ktdjw-00013o-6D for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 27 Dec 2020 22:38:12 +0100 Original-Received: from localhost ([::1]:53002 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ktdjv-0005d0-28 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 27 Dec 2020 16:38:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktdjn-0005co-Vo for bug-gnu-emacs@gnu.org; Sun, 27 Dec 2020 16:38:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50378) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ktdjm-0000mG-Dq for bug-gnu-emacs@gnu.org; Sun, 27 Dec 2020 16:38:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ktdjm-0006l3-AV for bug-gnu-emacs@gnu.org; Sun, 27 Dec 2020 16:38:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Artem Loenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Dec 2020 21:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45455 X-GNU-PR-Package: emacs Original-Received: via spool by 45455-submit@debbugs.gnu.org id=B45455.160910505425942 (code B ref 45455); Sun, 27 Dec 2020 21:38:02 +0000 Original-Received: (at 45455) by debbugs.gnu.org; 27 Dec 2020 21:37:34 +0000 Original-Received: from localhost ([127.0.0.1]:33691 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktdjK-0006kM-0B for submit@debbugs.gnu.org; Sun, 27 Dec 2020 16:37:34 -0500 Original-Received: from st43p00im-zteg10071901.me.com ([17.58.63.169]:46987) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktdjH-0006k8-S9 for 45455@debbugs.gnu.org; Sun, 27 Dec 2020 16:37:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=1a1hai; t=1609105045; bh=Jw3X1DdpQlvxs+MtSSyJB/rlzHtsblrZ+cwa8/rugz4=; h=From:Message-Id:Content-Type:Mime-Version:Subject:Date:To; b=IpzMWf3GLhkuedEjC+Bjw8QRe0KJ9Fr/M32PsoUMnXFFkOn5ZqI9PAauIAHLbzNEC Y5gKK2qp9850lpucpLUsiC0CcMYb9vp6AoC+2ysi/F6BlAOL+03G1ebZblrvij5ZSJ kYsJbztc62I9n+6a/stjaZGErnZ4d+hHhtz4xPAXIoQStXm/Xr0Q9RtAXfA0qR/MDB fDV6s4bbHYJscxWk8AEDJ50UC1OybzumqqnDkJAevgft/Tnrc+ps3gM/AihW/6rMPd 0ohd/xZNa+7UqR74qy9WVcfpz+DvQ+ZJGh54UTauGFZdwEEZRYCvL7GQrU1GDeQAbF TWYveE/R8VPGQ== Original-Received: from [192.168.1.21] (cpc157823-brnt5-2-0-cust20.4-2.cable.virginm.net [86.25.108.21]) by st43p00im-zteg10071901.me.com (Postfix) with ESMTPSA id 7838CD80E19; Sun, 27 Dec 2020 21:37:25 +0000 (UTC) In-Reply-To: X-Mailer: Apple Mail (2.3654.40.0.2.32) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343, 18.0.737 definitions=2020-12-27_18:2020-12-24, 2020-12-27 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2006250000 definitions=main-2012270137 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:196830 Archived-At: --Apple-Mail=_5AA792E2-A750-4DDE-A69C-DA8E5089C514 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > DO_CODESIGN=3D$(patsubst arm-apple-darwin%,yes,arm-apple-darwin20.2.0) >=20 > 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 =E2=80=93 = https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=3D5d89a9c2846d32b47= 26faaf5c8652f3f23dc7d73 = 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. =20 -timestamp=3D'2020-04-26' +timestamp=3D'2020-07-12' =20 # 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=3D`uname -p` case $UNAME_PROCESSOR in But in the `emacs-27` branch it calculates with a simple `uname -r` =E2=80= =93 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 --Apple-Mail=_5AA792E2-A750-4DDE-A69C-DA8E5089C514 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
DO_CODESIGN=3D$(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 =E2=80=93 https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=3D5d89a9= c2846d32b4726faaf5c8652f3f23dc7d73 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=3D'2020-04-26'
+timestamp=3D'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=3D`uname -p`
  case = $UNAME_PROCESSOR in

But in the `emacs-27` branch it calculates with a simple = `uname -r` =E2=80=93 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

= --Apple-Mail=_5AA792E2-A750-4DDE-A69C-DA8E5089C514--