From: Pankaj Jangid <pankaj@codeisgreat.org>
To: 47783@debbugs.gnu.org
Subject: bug#47783: 28.0.50; [feature/native-comp] libgccjit.so: error: error invoking gcc driver
Date: Sat, 17 Apr 2021 22:27:53 +0530 [thread overview]
Message-ID: <m2czussvam.fsf@xyz.invalid> (raw)
In-Reply-To: <m2y2dks1l9.fsf@codeisgreat.org>
Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@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
next prev parent reply other threads:[~2021-04-17 16:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-15 2:50 bug#47783: 28.0.50; [feature/native-comp] libgccjit.so: error: error invoking gcc driver Pankaj Jangid
2021-04-15 6:58 ` Eli Zaretskii
2021-04-15 12:56 ` Pankaj Jangid
2021-04-15 13:52 ` Eli Zaretskii
2021-04-15 16:12 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-15 7:09 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-15 14:06 ` Pankaj Jangid
2021-04-15 16:17 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-16 8:16 ` Pankaj Jangid
2021-04-16 9:25 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-17 16:57 ` Pankaj Jangid [this message]
2021-04-17 17:10 ` Eli Zaretskii
2021-04-17 17:33 ` Pankaj Jangid
2021-04-17 18:49 ` Pankaj Jangid
2021-05-05 13:10 ` Lars Ingebrigtsen
2021-05-06 7:00 ` Pankaj Jangid
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2czussvam.fsf@xyz.invalid \
--to=pankaj@codeisgreat.org \
--cc=47783@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).