GNU bug report logs - #43369
Emacs fails to configure on ARM Macs

Previous Next

Package: emacs;

Reported by: Itai Seggev <is+apple <at> cs.hmc.edu>

Date: Sun, 13 Sep 2020 09:51:01 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 28.1

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 43369 in the body.
You can then email your comments to 43369 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#43369; Package emacs. (Sun, 13 Sep 2020 09:51:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Itai Seggev <is+apple <at> cs.hmc.edu>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 13 Sep 2020 09:51:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Itai Seggev <is+apple <at> cs.hmc.edu>
To: bug-gnu-emacs <at> gnu.org
Subject: Emacs fails to configure on ARM Macs
Date: Sun, 13 Sep 2020 02:39:46 -0500
Hi.

Out of the box, that is, using master (specifically SHA 18f390af8f11d24c)
./configure fails when building on an ARM Mac.  The problem is that the
canonical triple has the form aarch64-apple-darwin20.1.0, but configure.ac is
looking for a triple of the form arm-*.

After changing arm to aarach64, I was able to build successfully both a Cocoa
and X11 versions (the latter pretty minimal, given that toolkits are still
being ported).

Here is the diff for ease of refence:

diff --git a/configure.ac b/configure.ac
index 33948fd776..40b63905ab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -724,7 +724,7 @@ AC_DEFUN
   *-apple-darwin* )
     case "${canonical}" in
       *-apple-darwin[0-9].*) unported=yes ;;
-      i[3456]86-* | x86_64-* | arm-* )  ;;
+      i[3456]86-* | x86_64-* | aarch64-* )  ;;
       * )            unported=yes ;;
     esac
     opsys=darwin


--
Itai

In 1997 a group of programmers started writing a desktop environment to fix a
travesty they didn't create.  Their program promptly found its way onto un*x
systems everywhere. Today, still opposed by a software monopolist, they survive
as soldiers of fortune.  If you share their vision, if you know you can help,
and if you can connect to internet, maybe you can join... the K-Team.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43369; Package emacs. (Sun, 13 Sep 2020 13:42:01 GMT) Full text and rfc822 format available.

Message #8 received at 43369 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Itai Seggev <is+apple <at> cs.hmc.edu>
Cc: Roland Kaufmann <rlndkfmn+emacs <at> gmail.com>, 43369 <at> debbugs.gnu.org,
 Alan Third <alan <at> idiocy.org>
Subject: Re: bug#43369: Emacs fails to configure on ARM Macs
Date: Sun, 13 Sep 2020 15:41:16 +0200
Itai Seggev <is+apple <at> cs.hmc.edu> writes:

> Out of the box, that is, using master (specifically SHA 18f390af8f11d24c)
> ./configure fails when building on an ARM Mac.  The problem is that the
> canonical triple has the form aarch64-apple-darwin20.1.0, but configure.ac is
> looking for a triple of the form arm-*.
>
> After changing arm to aarach64, I was able to build successfully both a Cocoa
> and X11 versions (the latter pretty minimal, given that toolkits are still
> being ported).
>
> Here is the diff for ease of refence:
>
> diff --git a/configure.ac b/configure.ac
> index 33948fd776..40b63905ab 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -724,7 +724,7 @@ AC_DEFUN
>    *-apple-darwin* )
>      case "${canonical}" in
>        *-apple-darwin[0-9].*) unported=yes ;;
> -      i[3456]86-* | x86_64-* | arm-* )  ;;
> +      i[3456]86-* | x86_64-* | aarch64-* )  ;;

The arm-* bit was added recently to Emacs, from a two-year-old patch:

commit 4cba236749aafade7bd88cf2a10be48f44983faa
Author:     Roland Kaufmann <rlndkfmn+emacs <at> gmail.com>
AuthorDate: Thu Dec 27 15:51:49 2018 +0100
Commit:     Alan Third <alan <at> idiocy.org>
CommitDate: Sat Aug 15 17:06:31 2020 +0100

    Allow build configuration on Apple ARM devices (bug#41994)
    
So it sounds like arm-* was in use, and it's now aarch64-*?  In which
case adding the latter, instead of altering it, is the right change here?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) patch. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 13 Sep 2020 13:42:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43369; Package emacs. (Sun, 13 Sep 2020 16:08:01 GMT) Full text and rfc822 format available.

Message #13 received at 43369 <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Roland Kaufmann <rlndkfmn+emacs <at> gmail.com>, 43369 <at> debbugs.gnu.org,
 Itai Seggev <is+apple <at> cs.hmc.edu>
Subject: Re: bug#43369: Emacs fails to configure on ARM Macs
Date: Sun, 13 Sep 2020 17:07:43 +0100
On Sun, Sep 13, 2020 at 03:41:16PM +0200, Lars Ingebrigtsen wrote:
> 
> The arm-* bit was added recently to Emacs, from a two-year-old patch:
> 
> commit 4cba236749aafade7bd88cf2a10be48f44983faa
> Author:     Roland Kaufmann <rlndkfmn+emacs <at> gmail.com>
> AuthorDate: Thu Dec 27 15:51:49 2018 +0100
> Commit:     Alan Third <alan <at> idiocy.org>
> CommitDate: Sat Aug 15 17:06:31 2020 +0100
> 
>     Allow build configuration on Apple ARM devices (bug#41994)
>     
> So it sounds like arm-* was in use, and it's now aarch64-*?  In which
> case adding the latter, instead of altering it, is the right change here?

I'm unsure. I've googled a bit and found stuff saying that Apple used
to use arm64, but now everyone uses aarch64. I don't know if the
original patch had ever actually been tested on an ARM Mac.

If Roland Kaufmann doesn't respond with a better plan, I suppose we'd
be safest just adding it as you suggest.
-- 
Alan Third




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43369; Package emacs. (Sun, 13 Sep 2020 23:43:01 GMT) Full text and rfc822 format available.

Message #16 received at 43369 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Itai Seggev <is+apple <at> cs.hmc.edu>
Cc: Roland Kaufmann <rlndkfmn+emacs <at> gmail.com>, Alan Third <alan <at> idiocy.org>,
 43369 <at> debbugs.gnu.org
Subject: Re: bug#43369: Emacs fails to configure on ARM Macs
Date: Mon, 14 Sep 2020 01:41:48 +0200
Itai Seggev <is+apple <at> cs.hmc.edu> writes:

> FWIW, uname -m and clang --version both report arm64 (not arm), but it seems
> that config.sub normalizes this to aarach64.  See commit 5d89a9c2846d32b47.

Ah, this was in July of this year:

+	arm64-*)
+		cpu=aarch64
+		;;

So I think Itai's patch looks correct, and I'm applying it to Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43369; Package emacs. (Sun, 13 Sep 2020 23:44:01 GMT) Full text and rfc822 format available.

Message #19 received at 43369 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Itai Seggev <is+apple <at> cs.hmc.edu>
Cc: Roland Kaufmann <rlndkfmn+emacs <at> gmail.com>, Alan Third <alan <at> idiocy.org>,
 43369 <at> debbugs.gnu.org
Subject: Re: bug#43369: Emacs fails to configure on ARM Macs
Date: Mon, 14 Sep 2020 01:43:02 +0200
Itai Seggev <is+apple <at> cs.hmc.edu> writes:

> FWIW, uname -m and clang --version both report arm64 (not arm), but it seems
> that config.sub normalizes this to aarach64.  See commit 5d89a9c2846d32b47.

On second thought -- that's just arm-64, though.  Does arm-32 still
exist in an Apple context?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43369; Package emacs. (Mon, 14 Sep 2020 00:13:02 GMT) Full text and rfc822 format available.

Message #22 received at 43369 <at> debbugs.gnu.org (full text, mbox):

From: Itai Seggev <is+apple <at> cs.hmc.edu>
To: Alan Third <alan <at> idiocy.org>, Lars Ingebrigtsen <larsi <at> gnus.org>,
 Roland Kaufmann <rlndkfmn+emacs <at> gmail.com>, 43369 <at> debbugs.gnu.org
Subject: Re: bug#43369: Emacs fails to configure on ARM Macs
Date: Sun, 13 Sep 2020 18:29:37 -0500
On Sun, Sep 13, 2020 at 05:07:43PM +0100, Alan Third wrote:
> On Sun, Sep 13, 2020 at 03:41:16PM +0200, Lars Ingebrigtsen wrote:
> > 
> > The arm-* bit was added recently to Emacs, from a two-year-old patch:
> > 
> > commit 4cba236749aafade7bd88cf2a10be48f44983faa
> > Author:     Roland Kaufmann <rlndkfmn+emacs <at> gmail.com>
> > AuthorDate: Thu Dec 27 15:51:49 2018 +0100
> > Commit:     Alan Third <alan <at> idiocy.org>
> > CommitDate: Sat Aug 15 17:06:31 2020 +0100
> > 
> >     Allow build configuration on Apple ARM devices (bug#41994)
> >     
> > So it sounds like arm-* was in use, and it's now aarch64-*?  In which
> > case adding the latter, instead of altering it, is the right change here?
> 
> I'm unsure. I've googled a bit and found stuff saying that Apple used
> to use arm64, but now everyone uses aarch64. I don't know if the
> original patch had ever actually been tested on an ARM Mac.
> 
> If Roland Kaufmann doesn't respond with a better plan, I suppose we'd
> be safest just adding it as you suggest.

FWIW, uname -m and clang --version both report arm64 (not arm), but it seems
that config.sub normalizes this to aarach64.  See commit 5d89a9c2846d32b47.

--
Itai

In 1997 a group of programmers started writing a desktop environment to fix a
travesty they didn't create.  Their program promptly found its way onto un*x
systems everywhere. Today, still opposed by a software monopolist, they survive
as soldiers of fortune.  If you share their vision, if you know you can help,
and if you can connect to internet, maybe you can join... the K-Team.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43369; Package emacs. (Mon, 14 Sep 2020 07:29:02 GMT) Full text and rfc822 format available.

Message #25 received at 43369 <at> debbugs.gnu.org (full text, mbox):

From: Roland Kaufmann <rlndkfmn+emacs <at> gmail.com>
To: Alan Third <alan <at> idiocy.org>, Lars Ingebrigtsen <larsi <at> gnus.org>,
 Itai Seggev <is+apple <at> cs.hmc.edu>, 43369 <at> debbugs.gnu.org
Subject: Re: bug#43369: Emacs fails to configure on ARM Macs
Date: Mon, 14 Sep 2020 09:28:11 +0200
On 13. Sep. 2020 at 18:07, Alan Third wrote:
> I'm unsure. I've googled a bit and found stuff saying that Apple used
> to use arm64, but now everyone uses aarch64. I don't know if the
> original patch had ever actually been tested on an ARM Mac.

The original was tested on an earlier architecture. Porque no los 
dos? That is:

i[3456]86-* | x86_64-* | arm-* | aarch64-*)  ;;


Yours sincerely,

Roland Kaufmann




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43369; Package emacs. (Mon, 14 Sep 2020 10:36:02 GMT) Full text and rfc822 format available.

Message #28 received at 43369 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Roland Kaufmann <rlndkfmn+emacs <at> gmail.com>
Cc: Alan Third <alan <at> idiocy.org>, 43369 <at> debbugs.gnu.org,
 Itai Seggev <is+apple <at> cs.hmc.edu>
Subject: Re: bug#43369: Emacs fails to configure on ARM Macs
Date: Mon, 14 Sep 2020 12:35:20 +0200
Roland Kaufmann <rlndkfmn+emacs <at> gmail.com> writes:

> The original was tested on an earlier architecture. Porque no los dos?
> That is:
>
> i[3456]86-* | x86_64-* | arm-* | aarch64-*)  ;;

Yup.  I've now made this change on the trunk.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 14 Sep 2020 10:36:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 43369 <at> debbugs.gnu.org and Itai Seggev <is+apple <at> cs.hmc.edu> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 14 Sep 2020 10:36:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 12 Oct 2020 11:24:09 GMT) Full text and rfc822 format available.

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

Previous Next


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