unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Suvayu Ali <fatkasuvayu+linux@gmail.com>
To: Emacs mailing list <help-gnu-emacs@gnu.org>
Subject: emacs daemon (from master) fails as systemd service
Date: Tue, 14 Nov 2023 15:53:50 +0000	[thread overview]
Message-ID: <CAMXnza0iUZR7n8O3BKeQJSbMtcf6bJbUk2cTXauSn5UkC+-fVw@mail.gmail.com> (raw)

Hi,

I've been using Emacs from master (7d42a762) for the last few months
because I wanted to try out tree-sitter.  It was working fine until I
updated it today.

When I start emacs normally `emacs -nw`, it starts up without issues.
When I manually start a daemon: `emacs --fg-daemon`, and connect from
another terminal with `emacsclient -nw`, that works as well.  However,
when I start emacs from systemd, it fails.  I log the stdout to a
file, and it has this:

  Error using execdir /opt/emacs/bin/:
  emacs: /opt/emacs/bin/../native-lisp/29.1-4c106e1f/preloaded/register-80045398-5a7974d5.eln:
cannot open shared object file: No such file or directory

I checked the directory /opt/emacs/, there is no "native-lisp"
directory, but the directory is writable.  So if it needs to be
generated, that's possible.

My service file looks like this (mostly same as upstream):

[Service]
Type=notify
StandardOutput=file:/tmp/emacs%U.log
StandardError=inherit

# delay to pick-up changes from `import-environment` in $HOME/.bash_profile
ExecStartPre=sleep 7
ExecStart=emacs --fg-daemon
ExecStop=emacsclient --eval "(save-some-buffers t)" \
                     --eval "(session-save-session)" --eval "(kill-emacs)"

# Emacs will exit with status 15 after having received SIGTERM, which
# is the default "KillSignal" value systemd uses to stop services.
SuccessExitStatus=15

Restart=on-failure

[Install]
WantedBy=default.target

Any idea what is going wrong?

Cheers,
-- 
Suvayu

Open source is the future. It sets us free.



             reply	other threads:[~2023-11-14 15:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-14 15:53 Suvayu Ali [this message]
2023-11-14 15:59 ` emacs daemon (from master) fails as systemd service Eli Zaretskii
2023-11-14 16:04   ` Suvayu Ali

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=CAMXnza0iUZR7n8O3BKeQJSbMtcf6bJbUk2cTXauSn5UkC+-fVw@mail.gmail.com \
    --to=fatkasuvayu+linux@gmail.com \
    --cc=help-gnu-emacs@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.
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).