emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Native compile problems on M1 Mac


From: Perry Smith
Subject: Native compile problems on M1 Mac
Date: Fri, 2 Dec 2022 11:34:02 -0600

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: signature.asc
Description: Message signed with OpenPGP


reply via email to

[Prev in Thread] Current Thread [Next in Thread]