GNU bug report logs - #47783
28.0.50; [feature/native-comp] libgccjit.so: error: error invoking gcc driver

Previous Next

Package: emacs;

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


Message #35 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pankaj Jangid <pankaj <at> codeisgreat.org>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#47783: 28.0.50;
 [feature/native-comp] libgccjit.so: error: error invoking gcc driver
Date: Sat, 17 Apr 2021 22:27:53 +0530
Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs <at> gnu.org> writes:

>> Is there a way in Emacs to get all the environment variables in one
>> go?
>
> One can use the `process-environment' variable. Also might be useful for
> you `initial-environment'.

Finally, as you pointed out, PATH env is the root cause. When I start
from GUI the PATH is set to:

     "/usr/bin:/bin:/usr/sbin:/sbin"

But when I start from CLI, the Bash init files are executed and hence
the PATH is:

    "/Users/pankaj/.sdkman/candidates/kotlin/current/bin:/Users/pankaj/.sdkman/candidates/groovy/current/bin:/Users/pankaj/.sdkman/candidates/gradle/current/bin:/Users/pankaj/.sdkman/candidates/ant/current/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Library/Apple/usr/bin:/Users/pankaj/Applications/Emacs.app/Contents/MacOS:/Users/pankaj/Applications/Emacs.app/Contents/MacOS/bin:/Users/pankaj/go/bin:/Users/pankaj/.cargo/bin"

There are lots of things. But the PATH, which we are interested in, is
the location of compiler; and that is "/usr/local/bin". So I hard-coded
PATH in a CLI session:

   export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

And then launched ‘Emacs’ from there. Worked perfectly fine.

So, my question is - is there a way to adjust the ‘initial-environment’
variable? The docstring says that it is inherited from the parent
process. So that makes it kind-of read-only.

Other solution could be to hold-on the compilation till full
‘~/emacs.d/init.el’ (or whichever is the init file) is
evaluated. Because users configure the environment variables during that
process.

--
Regards
Pankaj





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.