all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Help with native compilation
@ 2021-10-19 10:59 Jonathon McKitrick
  2021-10-19 19:24 ` Daniel Fleischer
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathon McKitrick @ 2021-10-19 10:59 UTC (permalink / raw)
  To: help-gnu-emacs

I'm trying to build emacs 28 or 29 with native compilation on macos.

I'm building from the formula homebrew-emacs-head (I've opened an issue there, but it seems no one else has this problem).
I reinstalled gcc and libgccjit.

Everything seems to work until I start emacs, then I see this error message:

Warning (initialization): An error occurred while loading ‘/Users/jmckitrick/.emacs.d/init.el’:

Native compiler error: (lambda (arg1 &optional) (let ((f #'yes-or-no-p)) (funcall f arg1))), Compiling /Users/jmckitrick/.emacs.d/eln-cache/28.0.60-3d05cc13/subr--trampoline-7965732d6f722d6e6f2d70_yes_or_no_p_0.eln...
ld: library not found for -lgcc_ext.10.5
libgccjit.so: error: error invoking gcc driver
Debugger entered--Lisp error: (native-ice "failed to compile" "/Users/jmckitrick/.emacs.d/eln-cache/28.0.60-3d05c..." "error invoking gcc driver")
  comp--compile-ctxt-to-file("/Users/jmckitrick/.emacs.d/eln-cache/28.0.60-3d05c...")
    comp-compile-ctxt-to-file("/Users/jmckitrick/.emacs.d/eln-cache/28.0.60-3d05c...")
      comp-final1()
        load-with-code-conversion("/private/var/folders/27/xs02f08d325_q2vh49wks48r00..." "/private/var/folders/27/xs02f08d325_q2vh49wks48r00..." nil t)
	  command-line-1(("-l" "/var/folders/27/xs02f08d325_q2vh49wks48r0000gn/T/e..."))
	    command-line()
	      normal-top-level()

	      Warning (comp): libgccjit.so: error: error invoking gcc driver Disable showing Disable logging
	      Warning (comp): /usr/local/Cellar/emacs-head@28/28.0.50_1/share/emacs/28.0.60/lisp/url/url-vars.el.gz: Error: Internal native compiler error failed to compile Disable showing Disable logging
	      Warning (comp): libgccjit.so: error: error invoking gcc driver Disable showing Disable logging
	      Warning (comp): /usr/local/Cellar/emacs-head@28/28.0.50_1/share/emacs/28.0.60/lisp/password-cache.el.gz: Error: Internal native compiler error failed to compile Disable showing Disable logging

	      
Where is the best place to get help for this issue?



Jonathon McKitrick
--
'My other computer is your Linux box.'



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

* Re: Help with native compilation
  2021-10-19 10:59 Help with native compilation Jonathon McKitrick
@ 2021-10-19 19:24 ` Daniel Fleischer
  2021-10-21 15:04   ` jcm
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Fleischer @ 2021-10-19 19:24 UTC (permalink / raw)
  To: Jonathon McKitrick; +Cc: help-gnu-emacs

Jonathon McKitrick [2021-10-19 Tue 10:59] wrote:

> I'm trying to build emacs 28 or 29 with native compilation on macos.

From "etc/PROBLEMS" in the Emacs project:

Native complitation requires the libgccjit library to be installed and
its path available to Emacs.  Errors such as:

    libgccjit.so: error: error invoking gcc driver
    Error: Internal native compiler error failed to compile

indicate Emacs can't find the library in running time.  One can set
the "LIBRARY_PATH" environment variable in the early initialization
file; for example:

(setenv "LIBRARY_PATH"
  (string-join
    '("/usr/local/opt/gcc/lib/gcc/11"
      "/usr/local/opt/libgccjit/lib/gcc/11"
      "/usr/local/opt/gcc/lib/gcc/11/gcc/x86_64-apple-darwin20/11.2.0") ":"))


You might need to adjust the version numbers.

-- 

Daniel Fleischer



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

* Re: Help with native compilation
  2021-10-19 19:24 ` Daniel Fleischer
@ 2021-10-21 15:04   ` jcm
  2021-10-27 11:04     ` Jonathon McKitrick
  0 siblings, 1 reply; 4+ messages in thread
From: jcm @ 2021-10-21 15:04 UTC (permalink / raw)
  To: Daniel Fleischer; +Cc: Jonathon McKitrick, help-gnu-emacs

> (setenv "LIBRARY_PATH"
>   (string-join
>     '("/usr/local/opt/gcc/lib/gcc/11"
>       "/usr/local/opt/libgccjit/lib/gcc/11"
>       "/usr/local/opt/gcc/lib/gcc/11/gcc/x86_64-apple-darwin20/11.2.0")
> ":"))

That did the trick! Thank you very much, Daniel.







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

* Re: Help with native compilation
  2021-10-21 15:04   ` jcm
@ 2021-10-27 11:04     ` Jonathon McKitrick
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathon McKitrick @ 2021-10-27 11:04 UTC (permalink / raw)
  To: Daniel Fleischer; +Cc: help-gnu-emacs

On Thu, Oct 21, 2021 at 03:04:00PM -0000, jcm@sdf.org wrote:
: > (setenv "LIBRARY_PATH"
: >   (string-join
: >     '("/usr/local/opt/gcc/lib/gcc/11"
: >       "/usr/local/opt/libgccjit/lib/gcc/11"
: >       "/usr/local/opt/gcc/lib/gcc/11/gcc/x86_64-apple-darwin20/11.2.0")
: > ":"))
: 
: That did the trick! Thank you very much, Daniel.

Now I'm trying the same process on M1, and I'm running into this error early:

checking for GNU Make... make
checking build system type... aarch64-apple-darwin21.1.0
checking host system type... aarch64-apple-darwin21.1.0
checking whether the C compiler works... no
configure: error: in `/private/tmp/emacs-headA28-20211027-68273-13cw6u8':
configure: error: C compiler cannot create executables
See `config.log' for more details

Do not report this issue to Homebrew/brew or Homebrew/core!

------------------------------------

I have xcode tools installed.


Jonathon McKitrick
--
'My other computer is your Linux box.'



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

end of thread, other threads:[~2021-10-27 11:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-19 10:59 Help with native compilation Jonathon McKitrick
2021-10-19 19:24 ` Daniel Fleischer
2021-10-21 15:04   ` jcm
2021-10-27 11:04     ` Jonathon McKitrick

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.