unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Perry Smith <pedz@easesoftware.com>
To: emacs-devel@gnu.org
Subject: Native compile problems on M1 Mac
Date: Fri, 2 Dec 2022 11:34:02 -0600	[thread overview]
Message-ID: <F911724A-55AD-48F1-9DC0-C1C5E7F2BAD2@easesoftware.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 3224 bytes --]

I am trying to get native compilation to work on an M1 Mac — macOS 13 (Ventura).

I have done `brew install gcc` and `brew install libgccjit` but I hit the same error in different forms in different places.

Originally, with the native compile test program, when I ran it, I got

./tut01-hello-world
ld: library not found for -lemutls_w
libgccjit.so: error: error invoking gcc driver
NULL result%

I reinstalled gcc and libgccjit and now I get:

 % ./tut01-hello-world
ld: warning: -undefined dynamic_lookup may not work with chained fixups
hello world
% echo $?
0

And I can now do `make configure="--with-native-compilation” install` and the configure, compile, and install work.  I move the new Emacs.app into /Applications and double click it and I get this in *Warnings*

⛔ Warning (initialization): An error occurred while loading ‘/Users/pedz/.config/emacs/early-init.el’:

Native compiler error: (lambda (arg0 &optional arg1 arg2 arg3 arg4) (let ((f #'load)) (funcall f arg0 arg1 arg2 arg3 arg4))), Compiling /Users/pedz/.config/emacs/eln-cache/29_0_60-b2322fda/subr--trampoline-6c6f6164_load_0.eln...
ld: library not found for -lemutls_w
libgccjit.so: error: error invoking gcc driver
Internal native compiler error: "failed to compile", "/Users/pedz/.config/emacs/eln-cache/29_0_60-b2322fda/subr--trampoline-6c6f6164_load_0.eln", "error invoking gcc driver"

Error: native-ice ("failed to compile" "/Users/pedz/.config/emacs/eln-cache/29_0_60-b2322fda/subr--trampoline-6c6f6164_load_0.eln" "error invoking gcc driver")
  mapbacktrace(#f(compiled-function (evald func args flags) #<bytecode -0xce2157ddc512f81>))
  debug-early-backtrace()
  debug-early(error (native-ice "failed to compile" "/Users/pedz/.config/emacs/eln-cache/29_0_60-b2322fda/subr--trampoline-6c6f6164_load_0.eln" "error invoking gcc driver"))
  comp--compile-ctxt-to-file("/Users/pedz/.config/emacs/eln-cache/29_0_60-b2322fda/subr--trampoline-6c6f6164_load_0.eln")
  comp-compile-ctxt-to-file("/Users/pedz/.config/emacs/eln-cache/29_0_60-b2322fda/subr--trampoline-6c6f6164_load_0.eln")
  comp-final1()
  eval-buffer(#<buffer  *load*> nil "/private/var/folders/54/h1bzk18j3zb9672d80mwtdcc0000gn/T/emacs-int-comp-subr--trampoline-6c6f6164_load_0-jC4hfG.el" nil t)
  load-with-code-conversion("/private/var/folders/54/h1bzk18j3zb9672d80mwtdcc0000gn/T/emacs-int-comp-subr--trampoline-6c6f6164_load_0-jC4hfG.el" "/private/var/folders/54/h1bzk18j3zb9672d80mwtdcc0000gn/T/emacs-int-comp-subr--trampoline-6c6f6164_load_0-jC4hfG.el" nil t)
  load("/private/var/folders/54/h1bzk18j3zb9672d80mwtdcc0000gn/T/emacs-int-comp-subr--trampoline-6c6f6164_load_0-jC4hfG.el" nil t)
  command-line-1(("-l" "/var/folders/54/h1bzk18j3zb9672d80mwtdcc0000gn/T/emacs-int-comp-subr--trampoline-6c6f6164_load_0-jC4hfG.el"))
  command-line()
  normal-top-level()

So, I am back a problem with the native executable can not find libemutls_w

I went as far as uninstalling gcc and libgccjit, reboot, and tried again but get the same result.

I am assuming that I don’t have something set up right.  Maybe something with Xcode …. I am hoping someone here has seen this before.

Thank you for your time,
Perry



[-- Attachment #1.2: Type: text/html, Size: 6945 bytes --]

[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

             reply	other threads:[~2022-12-02 17:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-02 17:34 Perry Smith [this message]
2022-12-03  7:15 ` Native compile problems on M1 Mac Gerd Möllmann

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=F911724A-55AD-48F1-9DC0-C1C5E7F2BAD2@easesoftware.com \
    --to=pedz@easesoftware.com \
    --cc=emacs-devel@gnu.org \
    /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).