From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Suvayu Ali Newsgroups: gmane.emacs.help Subject: emacs daemon (from master) fails as systemd service Date: Tue, 14 Nov 2023 15:53:50 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19771"; mail-complaints-to="usenet@ciao.gmane.io" To: Emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 14 16:54:54 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r2vkc-0004z4-6u for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 14 Nov 2023 16:54:54 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2vjs-0002I1-KD; Tue, 14 Nov 2023 10:54:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r2vjr-0002HR-3f for help-gnu-emacs@gnu.org; Tue, 14 Nov 2023 10:54:07 -0500 Original-Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2vjp-0007Ae-2q for help-gnu-emacs@gnu.org; Tue, 14 Nov 2023 10:54:06 -0500 Original-Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-53de0d1dc46so9409704a12.3 for ; Tue, 14 Nov 2023 07:54:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699977242; x=1700582042; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=SaZRR5BNb39QfieemGdukp610B5ftHWlTZk2J97wCMg=; b=LMqKIuXcRWZbjwVqfN/JuwB4nOt9E1hxd5qndV52bNvBRTQnBInEWmz+nanlWkdAAP JcJORP+OYdn1AcN6CR/7H96PNgRtvw/QiU3ZANzdMjhQ39Ri+c+YpgUWEPgy9Vea+g0I D40lwc/Kj2j2ou0IJAfIloJA2kOr56bpWptuTsrAuGSRv1LuOlGKKvKIdZHRINNreceA OEsCUyZQfvS8Hxu1llWu3vZGOW5unF/+ateP6Xy4344jAtg9eRktEkBJxKnGhV9TKJSV z1BqNG+sHco49c2nO4KDp00L0YqR5Kqyn0kTHffxNs570e+dBZuGHbgzwquBPceDtGmm FYFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699977242; x=1700582042; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=SaZRR5BNb39QfieemGdukp610B5ftHWlTZk2J97wCMg=; b=qFKcnLOEbDim706fg0+xALjXCV3MScrQ1zrldbARigHACSYTx4wMEUSCbfuxxrDBbv Wpw8hFI8HW1pKxre25cfD0OqCGH+LTapCL651gsHHQR3LinmF/uwhsQuDSdU5Ml84AVm w9hPOFwqul7wTv0mTbDPhYUBfkzC+gioB2Qr18WMRW/lD2Zs/+0IycANClv0tUmmwlJ5 iWWOkMBK883iOk7AbJt5ccs2LRlfMqrkBloNLIzkfENpgWr+hyiSEjXG8H/Gs1jZTgLD i5HJXJGl+fh+5JoeDg1LXJda4ZYg4YP6vw4oJtXVWO+lXzFvDKZkpShjzVVHSdE6n7py RySA== X-Gm-Message-State: AOJu0YxXVAIuGwW9gJQOhCgeNKiINj7h5JT7SoVZclGzL8QWIaLJoRIc XK+Qr2TgRwukBphuIau8xe6QZpTALy2cVrKSoCOgEu1cioU= X-Google-Smtp-Source: AGHT+IF+rKeSEAFw8ElZeFMVdavzgzDDIWec8/WJri7SDi2qMMEM4c7V0ng90Ji5EFeJ8UAQQ2CwNijtb7qNmMWb+ZQ= X-Received: by 2002:a17:907:1c84:b0:9e6:f7c6:792f with SMTP id nb4-20020a1709071c8400b009e6f7c6792fmr8413437ejc.17.1699977241875; Tue, 14 Nov 2023 07:54:01 -0800 (PST) Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=fatkasuvayu@gmail.com; helo=mail-ed1-x533.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:145530 Archived-At: 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.