GNU bug report logs - #41329
[feature/native-comp] The Makefile only checks for .elc files.

Previous Next

Package: emacs;

Reported by: Nicolas Bértolo <nicolasbertolo <at> gmail.com>

Date: Sat, 16 May 2020 16:17:02 UTC

Severity: normal

Done: Andrea Corallo <akrl <at> sdf.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 41329 in the body.
You can then email your comments to 41329 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#41329; Package emacs. (Sat, 16 May 2020 16:17:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicolas Bértolo <nicolasbertolo <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 16 May 2020 16:17:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Bértolo <nicolasbertolo <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [feature/native-comp] The Makefile only checks for .elc files.
Date: Sat, 16 May 2020 13:15:40 -0300
[Message part 1 (text/plain, inline)]
There is a problem with the build system for .eln files. The Makefile only
has a
target creating *.elc files. This means that if you use Emacs to change an
.el
file and you set it up to byte-compile .el files on save you will never
recompile the .eln files.

This can also be reproduced if you press C-c on a terminal that is
native-compiling. The .eln file will not be produced, but the .elc will be
in
the filesystem and `make` will not try to native-compile the file again.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41329; Package emacs. (Sat, 16 May 2020 16:56:02 GMT) Full text and rfc822 format available.

Message #8 received at 41329 <at> debbugs.gnu.org (full text, mbox):

From: Andrea Corallo <akrl <at> sdf.org>
To: Nicolas Bértolo <nicolasbertolo <at> gmail.com>
Cc: 41329 <at> debbugs.gnu.org
Subject: Re: bug#41329: [feature/native-comp] The Makefile only checks for
 .elc files.
Date: Sat, 16 May 2020 16:55:17 +0000
Nicolas Bértolo <nicolasbertolo <at> gmail.com> writes:

> There is a problem with the build system for .eln files. The Makefile
> only has a
> target creating *.elc files.

Yes the main reason for that is that the Makefile is not aware of which
files are lexical and can be compiled and which are dynamic and can't.

> This means that if you use Emacs to
> change an .el
> file and you set it up to byte-compile .el files on save you will
> never
> recompile the .eln files.

I'm not sure I understand.  I you mean that manually byte-compiling a
file prevents the .eln compilation to happen if make is invoked
afterwards then yes.  But make should be used.

> This can also be reproduced if you press C-c on a terminal that is
> native-compiling. The .eln file will not be produced, but the .elc
> will be in
> the filesystem and `make` will not try to native-compile the file
> again.

I don't think so, the .elc is renamed with their final filename after
the .eln has been produced to prevent exactly that.

This build system arrangement is till we have dynamic scope compilation
and we can clean it up.

  Andrea

-- 
akrl <at> sdf.org




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41329; Package emacs. (Sat, 16 May 2020 17:47:01 GMT) Full text and rfc822 format available.

Message #11 received at 41329 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Bértolo <nicolasbertolo <at> gmail.com>
To: Andrea Corallo <akrl <at> sdf.org>
Cc: 41329 <at> debbugs.gnu.org
Subject: Re: bug#41329: [feature/native-comp] The Makefile only checks for
 .elc files.
Date: Sat, 16 May 2020 14:45:54 -0300
[Message part 1 (text/plain, inline)]
 > I'm not sure I understand.  I you mean that manually byte-compiling a
> file prevents the .eln compilation to happen if make is invoked
> afterwards then yes.  But make should be used.

I use `auto-compile-mode` so that is why I was hitting this problem.

> I don't think so, the .elc is renamed with their final filename after
> the .eln has been produced to prevent exactly that.

Mmm, it has happened in my system. I wonder why. Will post an update
if I manage to reproduce it reliably.

> Yes the main reason for that is that the Makefile is not aware of which
> files are lexical and can be compiled and which are dynamic and can't.

Can't it grep for "lexical-binding: t" in the first line?

Nicolas.


El sáb., 16 may. 2020 a las 13:55, Andrea Corallo (<akrl <at> sdf.org>) escribió:

> Nicolas Bértolo <nicolasbertolo <at> gmail.com> writes:
>
> > There is a problem with the build system for .eln files. The Makefile
> > only has a
> > target creating *.elc files.
>
> Yes the main reason for that is that the Makefile is not aware of which
> files are lexical and can be compiled and which are dynamic and can't.
>
> > This means that if you use Emacs to
> > change an .el
> > file and you set it up to byte-compile .el files on save you will
> > never
> > recompile the .eln files.
>
> I'm not sure I understand.  I you mean that manually byte-compiling a
> file prevents the .eln compilation to happen if make is invoked
> afterwards then yes.  But make should be used.
>
> > This can also be reproduced if you press C-c on a terminal that is
> > native-compiling. The .eln file will not be produced, but the .elc
> > will be in
> > the filesystem and `make` will not try to native-compile the file
> > again.
>
> I don't think so, the .elc is renamed with their final filename after
> the .eln has been produced to prevent exactly that.
>
> This build system arrangement is till we have dynamic scope compilation
> and we can clean it up.
>
>   Andrea
>
> --
> akrl <at> sdf.org
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41329; Package emacs. (Sat, 16 May 2020 18:20:01 GMT) Full text and rfc822 format available.

Message #14 received at 41329 <at> debbugs.gnu.org (full text, mbox):

From: Andrea Corallo <akrl <at> sdf.org>
To: Nicolas Bértolo <nicolasbertolo <at> gmail.com>
Cc: 41329 <at> debbugs.gnu.org
Subject: Re: bug#41329: [feature/native-comp] The Makefile only checks for
 .elc files.
Date: Sat, 16 May 2020 18:19:10 +0000
Nicolas Bértolo <nicolasbertolo <at> gmail.com> writes:

>> I'm not sure I understand.  I you mean that manually byte-compiling
> a
>> file prevents the .eln compilation to happen if make is invoked
>> afterwards then yes.  But make should be used.
>
> I use `auto-compile-mode` so that is why I was hitting this problem.

I see, I rarely messed up externally the repo and always used make to
build.

>> I don't think so, the .elc is renamed with their final filename
> after
>> the .eln has been produced to prevent exactly that.
>
> Mmm, it has happened in my system. I wonder why. Will post an update
> if I manage to reproduce it reliably.

I suspect this is due to some confusion or a different issue to the
discussed one.

AFAIU if a file is compiled by `batch-byte-native-compile-for-bootstrap'
the elc can be produced only after the eln.

>> Yes the main reason for that is that the Makefile is not aware of
> which
>> files are lexical and can be compiled and which are dynamic and
> can't.
>
> Can't it grep for "lexical-binding: t" in the first line?

I think so, but playing with the build system can be time consuming,
especially to obtain a portable solutions.  Given that when we'll have
dynamic scope compilation will be sufficient just not to produce the
.elc I decided not to invest more time on this.

If you want to suggest a patch to have the eln files as target this is
very welcome.  Consider that the other complication is the eln folder
with the hash that should be know to the build system, so probably a two
step solution is required.

Thanks

  Andrea

--
akrl <at> sdf.org




Reply sent to Andrea Corallo <akrl <at> sdf.org>:
You have taken responsibility. (Mon, 31 Aug 2020 20:55:02 GMT) Full text and rfc822 format available.

Notification sent to Nicolas Bértolo <nicolasbertolo <at> gmail.com>:
bug acknowledged by developer. (Mon, 31 Aug 2020 20:55:02 GMT) Full text and rfc822 format available.

Message #19 received at 41329-done <at> debbugs.gnu.org (full text, mbox):

From: Andrea Corallo <akrl <at> sdf.org>
To: Nicolas Bértolo <nicolasbertolo <at> gmail.com>
Cc: 41329-done <at> debbugs.gnu.org
Subject: Re: bug#41329: [feature/native-comp] The Makefile only checks for
 .elc files.
Date: Mon, 31 Aug 2020 20:54:04 +0000
Nicolas Bértolo <nicolasbertolo <at> gmail.com> writes:

> There is a problem with the build system for .eln files. The Makefile only has a
> target creating *.elc files. This means that if you use Emacs to change an .el
> file and you set it up to byte-compile .el files on save you will never
> recompile the .eln files.

I'm closing this as with the new cache mechanism the stale .eln can't be
loaded and will be automatically recompiled before being finally late
loaded.

  Andrea




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 29 Sep 2020 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 209 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.