unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Philipp Stephani <p.stephani2@gmail.com>
To: Artem Loenko <artyom.loenko@mac.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:30:34 +0100	[thread overview]
Message-ID: <CAArVCkQYxDzPnu6n3W+j=Nv7rtH_O4dDni7rHmS6kVAi7DFppA@mail.gmail.com> (raw)
In-Reply-To: <C14FD20B-D825-4A50-B789-1EB2D7FDC671@mac.com>

Am So., 27. Dez. 2020 um 21:12 Uhr schrieb Artem Loenko <artyom.loenko@mac.com>:
>
> Looks strange indeed.
>
> I see that these changes were introduced in this commit – https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-27&id=fda9b3e83a434706c31ab1bee5c15511c0181d5a So, emacs-27 branch does not compile on Apple Silicon as well any more. Also, I believe, it should be at least `arm64-apple-darwin` and not `arm-apple-darwin`. Though, I tried to compile with `arm64-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=$(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 `arm64-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/Developer/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
> > …
> > Configured for 'aarch64-apple-darwin20.2.0’.
>
> > ~/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 – let me know, I will try my best. So far, my best idea is that we propagate the target to other tool that does not “understand” `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.





  reply	other threads:[~2020-12-27 20:30 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 [this message]
2020-12-27 21:37       ` Artem Loenko via Bug reports for GNU Emacs, the Swiss army knife of text editors
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='CAArVCkQYxDzPnu6n3W+j=Nv7rtH_O4dDni7rHmS6kVAi7DFppA@mail.gmail.com' \
    --to=p.stephani2@gmail.com \
    --cc=45455@debbugs.gnu.org \
    --cc=artyom.loenko@mac.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).