systemd-mode
systemd-mode copied to clipboard
Byte compilation error with Emacs 26 pretest
Related to #5, with the Emacs 26 pretest (26.0.90) and the following init file:
(package-initialize)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/"))
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(eval-when-compile
(require 'use-package))
(use-package systemd
:ensure t)
The following byte compilation error is being reported:
Compiling file /home/drot/.emacs.d/elpa/systemd-20171006.1352/systemd.el at Tue Oct 17 19:01:57 2017
Entering directory ‘/home/drot/.emacs.d/elpa/systemd-20171006.1352/’
Error (bytecomp): Opening input file: No such file or directory, /home/drot/.emacs.d/unit-directives.txt
For some reason load-file-name
is still ~/.emacs.d/init.el
when the byte compile happens, but I don't know why.
This is still happening with systemd-20180101.1803
.
It seems the problem is how use-package
handle the PATH, since
$ emacs --batch --eval '(byte-compile-file "elpa/systemd-20180101.1803/systemd.el")'
doesn't produce any error.
The issue also happens without use-package
:
(package-initialize)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/"))
(unless (package-installed-p 'systemd)
(package-refresh-contents)
(package-install 'systemd))
If you clone the systemd-mode
repo and try M-x package-install-file
to install it from the repo it also happens, so the problem could be package.el
itself.
I run into this problem with Emacs 25.3 as well. Is it expected?
I got the same with Debian 10, Emacs 26.3 and use-package.