bug#43369: Emacs fails to configure on ARM Macs

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#43369: Emacs fails to configure on ARM Macs

Lars Ingebrigtsen
Itai Seggev <[hidden email]> 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 <[hidden email]>
AuthorDate: Thu Dec 27 15:51:49 2018 +0100
Commit:     Alan Third <[hidden email]>
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



Reply | Threaded
Open this post in threaded view
|

bug#43369: Emacs fails to configure on ARM Macs

Alan Third
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 <[hidden email]>
> AuthorDate: Thu Dec 27 15:51:49 2018 +0100
> Commit:     Alan Third <[hidden email]>
> 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



Reply | Threaded
Open this post in threaded view
|

bug#43369: Emacs fails to configure on ARM Macs

Lars Ingebrigtsen
Itai Seggev <[hidden email]> 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



Reply | Threaded
Open this post in threaded view
|

bug#43369: Emacs fails to configure on ARM Macs

Lars Ingebrigtsen
In reply to this post by Alan Third
Itai Seggev <[hidden email]> 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



Reply | Threaded
Open this post in threaded view
|

bug#43369: Emacs fails to configure on ARM Macs

Lars Ingebrigtsen
In reply to this post by Alan Third
Roland Kaufmann <[hidden email]> 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