From: Rob Browning <rlb@defaultvalue.org>
To: emacs-devel@gnu.org
Subject: Possibly defaulting native-compile-target-directory to XDG_CACHE_HOME/...
Date: Fri, 16 Dec 2022 00:08:37 -0600 [thread overview]
Message-ID: <871qozyj6i.fsf@trouble.defaultvalue.org> (raw)
We're still trying to resolve some native compilation related crashes in
Debian in the hope that we'll be able to have 28 in the next stable
release --with-native-compilation. (Stage one of the freeze begins on
Jan 12.)
One remaining issue is that emacs crashes when HOME=/nope in some of our
test suites and perhapssome other packaging or install-related
activities. For example: https://bugs.debian.org/1021842
(To refresh, Debian policies require packages not to write outside of a
few specified locations in certain situations, e.g. package builds, and
HOME is not one of the specified locations.)
I can't recall from previous discussions whether that crash would be
considered a bug, or whether emacs just requires a writable cache dir
now (which is fine if so).
But I have discovered that if we allow the redirection of the
native-compile-target-directory to XDG_CACHE_HOME via something like
this in comp.el:
(defvar native-compile-target-directory (getenv "XDG_CACHE_HOME")
"When non-nil force the target directory for the eln files being compiled.")
then we can resolve the issue:
export HOME=/nope
export XDG_CACHE_HOME="$(mktemp -d ...)"
run-tests...
Of course, I assume the default above isn't quite right, i.e. if we were
to pursue this, I imagine we'd actually want to default
native-compile-target-directory to something more like
"$XDG_CACHE_HOME/emacs/eln-cache" when XDG_CACHE_DIR is set.
I also noticed that emacs already respects XDG_CONFIG_HOME, so I
imagined relying on XDG_CACHE_HOME might not be entirely suspect.
Thanks
--
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
next reply other threads:[~2022-12-16 6:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-16 6:08 Rob Browning [this message]
2022-12-17 12:08 ` Possibly defaulting native-compile-target-directory to XDG_CACHE_HOME/ Eli Zaretskii
2022-12-17 17:42 ` Rob Browning
2022-12-17 18:04 ` Eli Zaretskii
2022-12-17 20:37 ` Rob Browning
2022-12-17 20:59 ` Rob Browning
2022-12-18 8:48 ` Eli Zaretskii
2022-12-24 23:03 ` Sean Whitton
2022-12-25 6:44 ` Eli Zaretskii
2022-12-25 9:22 ` Eli Zaretskii
2022-12-17 15:58 ` Stefan Monnier
2022-12-17 17:38 ` Rob Browning
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=871qozyj6i.fsf@trouble.defaultvalue.org \
--to=rlb@defaultvalue.org \
--cc=emacs-devel@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).