GNU bug report logs -
#47783
28.0.50; [feature/native-comp] libgccjit.so: error: error invoking gcc driver
Previous Next
Reported by: Pankaj Jangid <pankaj <at> codeisgreat.org>
Date: Thu, 15 Apr 2021 02:51:02 UTC
Severity: normal
Merged with 48370
Found in version 28.0.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs <at> gnu.org> writes:
> I don't know what happened here but I bet has to do with the value of
> one of these three env vars [1] and most likely PATH.
>
> [1] <https://gcc.gnu.org/onlinedocs/jit/internals/index.html#environment-variables>
>
I am working with pre-built version of ‘gcc’ and ‘libgccjit’ from
Homebrew. So I tried to set the following environment
variables. Experimented with various permutation combinations of these.
#+begin_src elisp
(add-to-list 'exec-path
"/usr/local/opt/gcc/bin")
(setenv "PATH" (mapconcat 'identity exec-path ":"))
(setenv "LD_LIBRARY_PATH"
"/usr/local/opt/libgccjit/lib/gcc/10:/usr/local/opt/gcc/lib/gcc/10")
(setenv "LIBRARY_PATH"
"/usr/local/opt/libgccjit/lib/gcc/10:/usr/local/opt/gcc/lib/gcc/10")
#end_src
The above are standard location of ‘gcc’ and ’libgccjit’ artifacts.
The exec-path configuration above crashes my Emacs at startup. So I had
to comment that out.
Is there a way in Emacs to get all the environment variables in one go?
I want to compare the vars from two invocations - GUI and CLI. As I
reported earlier that CLI invocation works without any error.
More facts:
The error comes only at the beginning. As you can see in the following
log (*Async-native-compilation-log) that compilation is working fine
later on.
--8<---------------cut here---------------start------------->8---
Compiling /Users/pankaj/Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/cl-lib.el.gz...
uncompressing cl-lib.el.gz...
uncompressing cl-lib.el.gz...done
ld: library not found for -lgcc_ext.10.5
libgccjit.so: error: error invoking gcc driver
/Users/pankaj/Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/cl-lib.el.gz: Error: Internal native compiler error failed to compile
Compiling /Users/pankaj/Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/crm.el.gz...
uncompressing crm.el.gz...
uncompressing crm.el.gz...done
Compiling /Users/pankaj/Applications/Emacs.app/Contents/Resources/lisp/progmodes/hideshow.el.gz...
uncompressing hideshow.el.gz...
uncompressing hideshow.el.gz...done
Compiling /Users/pankaj/Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/advice.el.gz...
uncompressing advice.el.gz...
uncompressing advice.el.gz...done
Compiling /Users/pankaj/Applications/Emacs.app/Contents/Resources/lisp/outline.el.gz...
uncompressing outline.el.gz...
uncompressing outline.el.gz...done
Compiling /Users/pankaj/Applications/Emacs.app/Contents/Resources/lisp/calendar/cal-menu.el.gz...
uncompressing cal-menu.el.gz...
uncompressing cal-menu.el.gz...done
--8<---------------cut here---------------end--------------->8---
And when all the compilation is done the error goes away; it does not
appear in further sessions.
This bug report was last modified 3 years and 9 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.