From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.bugs Subject: bug#45455: [nextstep]: Emacs master does not compile on Apple Silicon (arm64) Date: Sun, 27 Dec 2020 21:30:34 +0100 Message-ID: References: <4F964265-C862-43DE-A1BB-252C0649167D@mac.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5751"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 45455@debbugs.gnu.org To: Artem Loenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 27 21:31:11 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 1ktch4-0001Oe-HV for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 27 Dec 2020 21:31:10 +0100 Original-Received: from localhost ([::1]:56402 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ktch3-0007a7-1c for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 27 Dec 2020 15:31:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47124) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktcgw-0007a0-Lw for bug-gnu-emacs@gnu.org; Sun, 27 Dec 2020 15:31:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50337) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ktcgw-0003dv-EX for bug-gnu-emacs@gnu.org; Sun, 27 Dec 2020 15:31:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ktcgw-0005BM-9t for bug-gnu-emacs@gnu.org; Sun, 27 Dec 2020 15:31:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Dec 2020 20:31: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.160910105319905 (code B ref 45455); Sun, 27 Dec 2020 20:31:02 +0000 Original-Received: (at 45455) by debbugs.gnu.org; 27 Dec 2020 20:30:53 +0000 Original-Received: from localhost ([127.0.0.1]:33650 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktcgm-0005Az-Ts for submit@debbugs.gnu.org; Sun, 27 Dec 2020 15:30:53 -0500 Original-Received: from mail-ot1-f53.google.com ([209.85.210.53]:35491) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktcgl-0005Al-7M for 45455@debbugs.gnu.org; Sun, 27 Dec 2020 15:30:51 -0500 Original-Received: by mail-ot1-f53.google.com with SMTP id i6so7710904otr.2 for <45455@debbugs.gnu.org>; Sun, 27 Dec 2020 12:30:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=t/AsSC8Qiqa67vFfQfFFx9IyhkpLwTSkp3Ts2frBaVU=; b=ZfKInBdeCHhzacEL4SO14BgwPrmtI9mjlXmhnuO1+DI7taCkTP11j2/QGh0RekJA/E fnaXwAgNxXCkCDj0OYt9ZIK1dkiYlwO4q+18VO+hB0fRyyGbSue+xZSDl5CspoowpbzX 4Z8Bo2odkyDIolDvLT8K4HAOIgg3UYvHRHTOL29C59JE3sc/y+vJowmRiSbjYNTLu4HL MXXlMUqiRt+vwqAK2IwWGZS5VOjSSa+NPkZBLUFkMfol/lbStu/q5t2sh2Xujg82yBUF yijTwU9xoM3bi0XLOVWaoZZ0hv1/3nZVctBpLuifTtEuz5x0sOiVodIgR8ialyh7TJBc D+lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=t/AsSC8Qiqa67vFfQfFFx9IyhkpLwTSkp3Ts2frBaVU=; b=DN0NHhYbDDBlY6UPjoDaeeCspGfxeIdaoguSSg0ZQ4SZdsKKco1ZLZDgRyM5JdL178 HOG1vkxr2BSBreANUYOp9ig6bkCImqgJ2Nlz5+s+KABUbG2FSp9JB1xi1VXYaA31xeFc bFSnu8rO2oYq5DW624KHOzJVHtS8R77rS0BJLsEnr5mGl7jvx52ae/4GXRzAecVwLBex LYMHYPzFCah/kptMqg9qn3YY0IYb3LaXmsEMYIIxPzfRRlT6hQosU9jmN5n+R+t5jkKk nZsN5QyZ5dS30exB0oDsLoIYOSO5z4kO0rQhizD3buBMEO2fkYuSqPC0A8hRzbRM3o01 i8Uw== X-Gm-Message-State: AOAM530P71bN8y8KdpLpwbBl+iWFH4yzBMw9RzDkv1uNEFIIGpoyG2W/ Q116GvtxvmBF6zHQ6LNukg24chR2iOBikwBsyes= X-Google-Smtp-Source: ABdhPJzsAoQ9eig8CSXpptYyAzIwYwaekO4gvkmld85qzAIRfN2rJCBG/GfRdQas2gWixQLY6EXp+0YEnXFJP9Q1ONc= X-Received: by 2002:a9d:694a:: with SMTP id p10mr13740420oto.149.1609101045512; Sun, 27 Dec 2020 12:30:45 -0800 (PST) In-Reply-To: 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:196827 Archived-At: Am So., 27. Dez. 2020 um 21:12 Uhr schrieb Artem Loenko : > > Looks strange indeed. > > I see that these changes were introduced in this commit =E2=80=93 https:/= /git.savannah.gnu.org/cgit/emacs.git/commit/?h=3Demacs-27&id=3Dfda9b3e83a43= 4706c31ab1bee5c15511c0181d5a So, emacs-27 branch does not compile on Apple = Silicon as well any more. Also, I believe, it should be at least `arm64-app= le-darwin` and not `arm-apple-darwin`. Though, I tried to compile with `arm= 64-apple-darwin` but got the same error with `temacs`. I'd agree, but then, the src/Makefile for my emacs-27 worktree has 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 checked LLVM bundled with Xcode 12.3 and LLVM 11.0.0. Both report `arm6= 4-apple-darwin` as a target (the same for `-print-effective-triple`: > > > ~/Projects/emacs $ /opt/homebrew/opt/llvm/bin/clang --version > > clang version 11.0.0 > > Target: arm64-apple-darwin20.2.0 > > Thread model: posix > > InstalledDir: /opt/homebrew/opt/llvm/bin > > > ~/Projects/emacs $ xcrun clang --version > > Apple clang version 12.0.0 (clang-1200.0.32.28) > > Target: arm64-apple-darwin20.2.0 > > Thread model: posix > > InstalledDir: /Volumes/Extended/Archives/Xcode_12.3.app/Contents/Develo= per/Toolchains/XcodeDefault.xctoolchain/usr/bin > > Though, during the ./configure, `config.guess` identifies the system as `= aarch64-apple-darwin`: > > > Running ./configure ... > > ./configure > > ... > > checking build system type... aarch64-apple-darwin20.2.0 > > checking host system type... aarch64-apple-darwin20.2.0 > > =E2=80=A6 > > Configured for 'aarch64-apple-darwin20.2.0=E2=80=99. > > > ~/Projects/emacs $ ./build-aux/config.guess > > aarch64-apple-darwin20.2.0 > > It seems that `clang` is good with both versions as a target. > > Anyway, the fact is that `temacs` works fine with `aarch64-apple-darwin` = target and does not with `arm(64)-apple-darwin`. I do not know much about `= temacs` and Emacs internals, if you have any leads or theories to check =E2= =80=93 let me know, I will try my best. So far, my best idea is that we pro= pagate the target to other tool that does not =E2=80=9Cunderstand=E2=80=9D = `arm64-apple-darwin`. 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.