unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Native compile problems on M1 Mac
@ 2022-12-02 17:34 Perry Smith
  2022-12-03  7:15 ` Gerd Möllmann
  0 siblings, 1 reply; 2+ messages in thread
From: Perry Smith @ 2022-12-02 17:34 UTC (permalink / raw)
  To: emacs-devel


[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-03  7:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-02 17:34 Native compile problems on M1 Mac Perry Smith
2022-12-03  7:15 ` Gerd Möllmann

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).