Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1051600: emacs: shouldn't native-compilation use the cached eln-files?

96 views
Skip to first unread message

Jörg-Volker Peetz

unread,
Sep 10, 2023, 7:30:05 AM9/10/23
to
Package: emacs
Version: 1:29.1+1-5
Severity: wishlist

Dear Rob Browning,

on my system each newly started emacs process does native-compilation of
all used modules, even the ones already compiled by previous processes.
Is this to be expected?
As I see it, the cached native-compiled modules should be re-used.
Do I have to configure something for that?

Thanks for your work on the debian emacs packages and regards,
Jörg.


-- System Information:
Debian Release: trixie/sid
APT prefers testing
APT policy: (600, 'testing'), (500, 'unstable'), (5, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 6.4.12 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=C.utf8, LC_CTYPE=C.utf8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages emacs depends on:
ii emacs-lucid 1:29.1+1-5

emacs recommends no packages.

emacs suggests no packages.

-- no debconf information

Jörg-Volker Peetz

unread,
Sep 11, 2023, 3:00:05 PM9/11/23
to
Sean Whitton wrote on 11/09/2023 18:59:
> control: severity -1 normal
> control: tag -1 + moreinfo
>
> Hello,
>
> On Sun 10 Sep 2023 at 01:15pm +02, Jörg-Volker Peetz wrote:
>
>> on my system each newly started emacs process does native-compilation of
>> all used modules, even the ones already compiled by previous processes.
>> Is this to be expected?
>> As I see it, the cached native-compiled modules should be re-used.
>> Do I have to configure something for that?
>
> It's not expected. But we will need more precise steps to reproduce to
> do anything about it.
>
Hello,
thanks for looking into this.
From a terminal (rxvt-unicode) running my shell (mksh) I start emacs
(emacs-lucid). After about 15 seconds the following warnings appear:

■ Warning (comp): debian-el.el:90:26: Warning: reference to free variable ‘di\
red-mode-map’
■ Warning (comp): debian-el.el:90:26: Warning: reference to free variable ‘di\
red-mode-map’
■ Warning (comp): debian-el.el:95:35: Warning: docstring has wrong usage of u\
nescaped single quotes (use \= or different quoting)
■ Warning (comp): mmm-vars.el:869:2: Warning: defvar `mmm-classes-alist' docs\
tring has wrong usage of unescaped single quotes (use \= or different quoting)
■ Warning (comp): mmm-auto.el:168:2: Warning: docstring has wrong usage of un\
escaped single quotes (use \= or different quoting)

I stop emacs (C-x C-c) and start the next emacs. And again, after about the same
time the same warnings appear.
As I understand it, the second emacs is re-compiling the modules mentioned in
the warnings (and others, as can be seen in the eln-cache directory).

This happens also when calling `emacs -nw`.

init.el is appended.

Best regards,
Jörg.
init.el

Jörg-Volker Peetz

unread,
Sep 12, 2023, 4:40:04 AM9/12/23
to
Hello Sean,

Sean Whitton wrote on 12/09/2023 09:41:
> Hello,
>
> On Mon 11 Sep 2023 at 08:45pm +02, Jörg-Volker Peetz wrote:
>
>> Hello,
>> thanks for looking into this.
>> From a terminal (rxvt-unicode) running my shell (mksh) I start emacs
>> (emacs-lucid). After about 15 seconds the following warnings appear:
>>
>> ■ Warning (comp): debian-el.el:90:26: Warning: reference to free variable ‘di\
>> red-mode-map’
>> ■ Warning (comp): debian-el.el:90:26: Warning: reference to free variable ‘di\
>> red-mode-map’
>> ■ Warning (comp): debian-el.el:95:35: Warning: docstring has wrong usage of u\
>> nescaped single quotes (use \= or different quoting)
>> ■ Warning (comp): mmm-vars.el:869:2: Warning: defvar `mmm-classes-alist' docs\
>> tring has wrong usage of unescaped single quotes (use \= or different quoting)
>> ■ Warning (comp): mmm-auto.el:168:2: Warning: docstring has wrong usage of un\
>> escaped single quotes (use \= or different quoting)
>>
>> I stop emacs (C-x C-c) and start the next emacs. And again, after about the same
>> time the same warnings appear.
>> As I understand it, the second emacs is re-compiling the modules mentioned in
>> the warnings (and others, as can be seen in the eln-cache directory).
>
> The fact the warnings appear does not necessarily mean that any
> recompilation occurs.

The time stamp of the eln files in the cache directory changes.
>
>> init.el is appended.
>
> We'd need a reproduction with 'emacs -q'.
>
Right you are... It doesn't happen with 'emacs -q'.
And putting just these lines:

;;; Set eln-cache dir
(when (boundp 'native-comp-eln-load-path)
(setcar native-comp-eln-load-path
(expand-file-name "~/.cache/emacs-eln-cache/" user-emacs-directory)))

into init.el and starting 'emacs' makes the flaw happen.
--
Regards,
Jörg.

Jörg-Volker Peetz

unread,
Sep 12, 2023, 7:30:04 AM9/12/23
to
Hello Sean,

Sean Whitton wrote on 12/09/2023 12:42:
> Hello,
>
> On Tue 12 Sep 2023 at 10:14am +02, Jörg-Volker Peetz wrote:
>
>> Right you are... It doesn't happen with 'emacs -q'.
>> And putting just these lines:
>>
>> ;;; Set eln-cache dir
>> (when (boundp 'native-comp-eln-load-path)
>> (setcar native-comp-eln-load-path
>> (expand-file-name "~/.cache/emacs-eln-cache/" user-emacs-directory)))
>>
>> into init.el and starting 'emacs' makes the flaw happen.
>
> And how about if you put them into early-init.el?
>
thank you very much, that did the trick :-)
Just now I learned about the Early Init File from you.
As far as I'm concerned, the bug can be closed.
--
Regards,
Jörg.
0 new messages