GNU bug report logs - #11707
24.1.50; 'make recompile' does not use BYTE_COMPILE_FLAGS on Windows

Previous Next

Package: emacs;

Reported by: Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>

Date: Thu, 14 Jun 2012 11:21:01 UTC

Severity: normal

Found in version 24.1.50

Fixed in version 24.4

Done: Glenn Morris <rgm <at> gnu.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 11707 in the body.
You can then email your comments to 11707 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#11707; Package emacs. (Thu, 14 Jun 2012 11:21:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 14 Jun 2012 11:21:02 GMT) Full text and rfc822 format available.

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

From: Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.1.50; 'make recompile' does not use BYTE_COMPILE_FLAGS on Windows
Date: Thu, 14 Jun 2012 20:16:42 +0900
When I 'make recompile' on Windows, Emacs outputs many "Lisp nesting
exceeds `max-lisp-eval-depth'" message.

The cause of the problem is that lisp/makefile.w32-in does not use
BYTE_COMPILE_FLAGS variable when recompile.  On the other hand,
lisp/Makefile.in use it.

Please see the below patch.

=== modified file 'lisp/makefile.w32-in'
--- lisp/makefile.w32-in	2012-06-09 11:53:31 +0000
+++ lisp/makefile.w32-in	2012-06-14 00:18:51 +0000
@@ -396,7 +396,7 @@
 # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
 #          this can break with GNU Make 3.81 and later if sh.exe is used.
 recompile: compile-first autoloads doit $(lisp)/progmodes/cc-mode.elc
-	$(emacs) --eval $(ARGQUOTE)(batch-byte-recompile-directory 0)$(ARGQUOTE) $(lisp)
+	$(emacs) $(BYTE_COMPILE_FLAGS) --eval $(ARGQUOTE)(batch-byte-recompile-directory 0)$(ARGQUOTE) $(lisp)
 
 $(lisp)/calendar/cal-loaddefs.el:
 	"$(EMACS)" $(EMACSOPT) -l autoload \


-- 
Kazuhiro Ito




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11707; Package emacs. (Thu, 14 Jun 2012 16:31:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
Cc: 11707 <at> debbugs.gnu.org
Subject: Re: bug#11707: 24.1.50;
	'make recompile' does not use BYTE_COMPILE_FLAGS on Windows
Date: Thu, 14 Jun 2012 19:27:26 +0300
> Date: Thu, 14 Jun 2012 20:16:42 +0900
> From: Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
> 
> When I 'make recompile' on Windows, Emacs outputs many "Lisp nesting
> exceeds `max-lisp-eval-depth'" message.
> 
> The cause of the problem is that lisp/makefile.w32-in does not use
> BYTE_COMPILE_FLAGS variable when recompile.  On the other hand,
> lisp/Makefile.in use it.

lisp/makefile.w32-in doesn't use BYTE_COMPILE_FLAGS because they are
not supposed to be needed for that target.

Are you using "make recompile" with emacs.exe that has only source
(*.el) version of the byte compiler loaded?  Otherwise, I don't
understand how come you get these errors.

I don't want to blindly enlarge the stack of the byte compiler without
understanding the problem which causes the errors.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11707; Package emacs. (Fri, 15 Jun 2012 16:45:02 GMT) Full text and rfc822 format available.

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

From: Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 11707 <at> debbugs.gnu.org
Subject: Re: bug#11707: 24.1.50;
	'make recompile' does not use BYTE_COMPILE_FLAGS on Windows
Date: Sat, 16 Jun 2012 01:41:25 +0900
> > When I 'make recompile' on Windows, Emacs outputs many "Lisp nesting
> > exceeds `max-lisp-eval-depth'" message.
> 
> lisp/makefile.w32-in doesn't use BYTE_COMPILE_FLAGS because they are
> not supposed to be needed for that target.
> 
> Are you using "make recompile" with emacs.exe that has only source
> (*.el) version of the byte compiler loaded?  Otherwise, I don't
> understand how come you get these errors.

Probablely yes.  The problem occured when I accidentally stopped 'make
bootstrap' in byte-compiling process and then run 'make recompile'.

Because I noticed the below ChangeLog entry and I didn't know about
the reason of the difference between Makefile.in and makefile.w32-in,
I simply thought lisp/makefile.w32-in didn't use BYTE_COMPILE_FLAGS
unintendedly.

lisp/ChangeLog
> 2011-04-01  Stefan Monnier  <monnier <at> iro.umontreal.ca>
> 
> 	Add lexical binding.
(snip)
> 	* Makefile.in (BIG_STACK_DEPTH, BIG_STACK_OPTS, BYTE_COMPILE_FLAGS):
> 	New variables.
> 	(compile-onefile, .el.elc, compile-calc, recompile): Use them.
> 	(COMPILE_FIRST): Add macroexp and cconv.
> 	* makefile.w32-in: Mirror changes in Makefile.in.


Here is the more strict recipe for the problem.  But I don't know
whether 'make recompile' is expected to be run in such condition.

1. 'make bootstrap'
2. rm ../lisp/emacs-lisp/macroexp.elc
3. touch ../lisp/image-dired.el
4. make recompile

The below error occurs.
> Compiling f:/build/emacs-trunk/lisp/image-dired.el...
> Compiler-macro error: (error "Lisp nesting exceeds `max-lisp-eval-depth'")
> Compiler-macro error: (error "Lisp nesting exceeds `max-lisp-eval-depth'")
> Compiler-macro error: (error "Lisp nesting exceeds `max-lisp-eval-depth'")
> Compiler-macro error: (error "Lisp nesting exceeds `max-lisp-eval-depth'")
> Compiler-macro error: (error "Lisp nesting exceeds `max-lisp-eval-depth'")
> Compiler-macro error: (error "Lisp nesting exceeds `max-lisp-eval-depth'")
> Compiler-macro error: (error "Lisp nesting exceeds `max-lisp-eval-depth'")
>
> In toplevel form:
> image-dired.el:2352:1:Error: Lisp nesting exceeds `max-lisp-eval-depth'

5. make recompile
Successfully finished.

-- 
Kazuhiro Ito




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11707; Package emacs. (Fri, 15 Jun 2012 17:45:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
Cc: 11707 <at> debbugs.gnu.org
Subject: Re: bug#11707: 24.1.50;
	'make recompile' does not use BYTE_COMPILE_FLAGS on Windows
Date: Fri, 15 Jun 2012 20:41:09 +0300
> Date: Sat, 16 Jun 2012 01:41:25 +0900
> From: Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
> Cc: 11707 <at> debbugs.gnu.org
> 
> 
> > > When I 'make recompile' on Windows, Emacs outputs many "Lisp nesting
> > > exceeds `max-lisp-eval-depth'" message.
> > 
> > lisp/makefile.w32-in doesn't use BYTE_COMPILE_FLAGS because they are
> > not supposed to be needed for that target.
> > 
> > Are you using "make recompile" with emacs.exe that has only source
> > (*.el) version of the byte compiler loaded?  Otherwise, I don't
> > understand how come you get these errors.
> 
> Probablely yes.  The problem occured when I accidentally stopped 'make
> bootstrap' in byte-compiling process and then run 'make recompile'.

You should use "make compile" in this situation.  "make recompile"
might produce incorrect byte code, because it compiles all the files
in the same Emacs session.

> Here is the more strict recipe for the problem.  But I don't know
> whether 'make recompile' is expected to be run in such condition.
> 
> 1. 'make bootstrap'
> 2. rm ../lisp/emacs-lisp/macroexp.elc
> 3. touch ../lisp/image-dired.el
> 4. make recompile
> 
> The below error occurs.
> > Compiling f:/build/emacs-trunk/lisp/image-dired.el...
> > Compiler-macro error: (error "Lisp nesting exceeds `max-lisp-eval-depth'")
> > Compiler-macro error: (error "Lisp nesting exceeds `max-lisp-eval-depth'")
> > Compiler-macro error: (error "Lisp nesting exceeds `max-lisp-eval-depth'")
> > Compiler-macro error: (error "Lisp nesting exceeds `max-lisp-eval-depth'")
> > Compiler-macro error: (error "Lisp nesting exceeds `max-lisp-eval-depth'")
> > Compiler-macro error: (error "Lisp nesting exceeds `max-lisp-eval-depth'")
> > Compiler-macro error: (error "Lisp nesting exceeds `max-lisp-eval-depth'")
> >
> > In toplevel form:
> > image-dired.el:2352:1:Error: Lisp nesting exceeds `max-lisp-eval-depth'
> 
> 5. make recompile
> Successfully finished.

"make compile" should be free from this problem.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11707; Package emacs. (Mon, 18 Jun 2012 13:01:01 GMT) Full text and rfc822 format available.

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

From: Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 11707 <at> debbugs.gnu.org
Subject: Re: bug#11707: 24.1.50;
	'make recompile' does not use BYTE_COMPILE_FLAGS on Windows
Date: Mon, 18 Jun 2012 21:56:44 +0900
> > The problem occured when I accidentally stopped 'make
> > bootstrap' in byte-compiling process and then run 'make recompile'.
> 
> You should use "make compile" in this situation.  "make recompile"
> might produce incorrect byte code, because it compiles all the files
> in the same Emacs session.

Thank you for the advice.  "make compile" surely has no problem.

-- 
Kazuhiro Ito




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11707; Package emacs. (Mon, 25 Jun 2012 01:15:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 11707 <at> debbugs.gnu.org, Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
Subject: Re: bug#11707: 24.1.50;
	'make recompile' does not use BYTE_COMPILE_FLAGS on Windows
Date: Sun, 24 Jun 2012 21:10:31 -0400
Eli Zaretskii wrote:

> You should use "make compile" in this situation.  "make recompile"
> might produce incorrect byte code, because it compiles all the files
> in the same Emacs session.

I would like to suggest just removing the "recompile" target altogether. 
Although I have never used it for anything personally, so maybe I'm
missing something, but I cannot see why this target should exist.
"make compile" is always more correct (and also faster on GNU/Linux for
multi-core machines).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11707; Package emacs. (Mon, 25 Jun 2012 11:41:01 GMT) Full text and rfc822 format available.

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

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 11707 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
	Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
Subject: Re: bug#11707: 24.1.50; 'make recompile' does not use
	BYTE_COMPILE_FLAGS on Windows
Date: Mon, 25 Jun 2012 13:35:47 +0200
On Mon, Jun 25, 2012 at 3:10 AM, Glenn Morris <rgm <at> gnu.org> wrote:

> I would like to suggest just removing the "recompile" target altogether.
> Although I have never used it for anything personally,

You've used it if you ever did  "make cvs-update" or "make bzr-update".

    Juanma




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11707; Package emacs. (Mon, 25 Jun 2012 14:40:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 11707 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
	Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
Subject: Re: bug#11707: 24.1.50;
	'make recompile' does not use BYTE_COMPILE_FLAGS on Windows
Date: Mon, 25 Jun 2012 10:35:40 -0400
>> You should use "make compile" in this situation.  "make recompile"
>> might produce incorrect byte code, because it compiles all the files
>> in the same Emacs session.

Actually, I don't know of any case where it ends up generating incorrect
byte-code.  It will signal different (fewer) warnings and things like
that, but AFAIK the generated byte-code should be pretty much
equivalent.  Moreover, if it ever ends up generating incorrect
byte-code, it's most likely because of a bug in some other file
(typically, the bug would be that Emacs's behavior is modified just by
loading that file).

> I would like to suggest just removing the "recompile" target altogether. 
> Although I have never used it for anything personally, so maybe I'm
> missing something, but I cannot see why this target should exist.

It is significantly faster on uniprocessor machines.

I don't think we should remove it, but we should definitely rename it
because nothing in "compile -vs- recompile" hints at the difference.

We could rename it to "single-process-compile" or something like that.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11707; Package emacs. (Tue, 26 Jun 2012 16:33:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: 11707 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
	Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
Subject: Re: bug#11707: 24.1.50;
	'make recompile' does not use BYTE_COMPILE_FLAGS on Windows
Date: Tue, 26 Jun 2012 12:28:24 -0400
Juanma Barranquero wrote:

> You've used it if you ever did  "make cvs-update" or "make bzr-update".

I never have. I don't know why those rules exist either.
The cvs-update alias should just be removed now.
bzr-update should use compile instead of recompile, since the former is
parallelizable, which I think is more useful these days for a majority.

But bzr-update seems to offer no advantage over lisp/'s "all" target, so
I don't know why it exists at all.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11707; Package emacs. (Tue, 26 Jun 2012 17:13:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: lekktu <at> gmail.com, kzhr <at> d1.dion.ne.jp, 11707 <at> debbugs.gnu.org
Subject: Re: bug#11707: 24.1.50;
	'make recompile' does not use BYTE_COMPILE_FLAGS on Windows
Date: Tue, 26 Jun 2012 20:08:04 +0300
> From: Glenn Morris <rgm <at> gnu.org>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  11707 <at> debbugs.gnu.org,  Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
> Date: Tue, 26 Jun 2012 12:28:24 -0400
> 
> But bzr-update seems to offer no advantage over lisp/'s "all" target

It does on Windows ;-)  Observe:

  ALL =

  all: $(ALL)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11707; Package emacs. (Thu, 28 Jun 2012 17:36:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: lekktu <at> gmail.com, kzhr <at> d1.dion.ne.jp, 11707 <at> debbugs.gnu.org
Subject: Re: bug#11707: 24.1.50;
	'make recompile' does not use BYTE_COMPILE_FLAGS on Windows
Date: Thu, 28 Jun 2012 13:30:57 -0400
Eli Zaretskii wrote:

>> But bzr-update seems to offer no advantage over lisp/'s "all" target
>
> It does on Windows ;-)  Observe:

Prefix everything I say with "on POSIX platforms..." unless otherwise
specified. :)

So would anyone object to my removing the "bzr-update" rule from
lisp/Makefile.in?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11707; Package emacs. (Thu, 28 Jun 2012 17:39:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 11707 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
	Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
Subject: Re: bug#11707: 24.1.50;
	'make recompile' does not use BYTE_COMPILE_FLAGS on Windows
Date: Thu, 28 Jun 2012 13:34:39 -0400
Stefan Monnier wrote:

> Actually, I don't know of any case where it ends up generating incorrect
> byte-code.  It will signal different (fewer) warnings and things like
> that, but AFAIK the generated byte-code should be pretty much
> equivalent.

True. Though there's the "invalid byte code" issue with
byte-compile-dynamic that was noticed recently. That's an extra,
somewhat serious looking warning that it signals.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11707; Package emacs. (Thu, 28 Jun 2012 18:16:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 11707 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
	Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
Subject: Re: bug#11707: 24.1.50;
	'make recompile' does not use BYTE_COMPILE_FLAGS on Windows
Date: Thu, 28 Jun 2012 14:11:08 -0400
>> Actually, I don't know of any case where it ends up generating incorrect
>> byte-code.  It will signal different (fewer) warnings and things like
>> that, but AFAIK the generated byte-code should be pretty much
>> equivalent.
> True.  Though there's the "invalid byte code" issue with
> byte-compile-dynamic that was noticed recently.  That's an extra,
> somewhat serious looking warning that it signals.

Good point.  Tho I tend to count it against byte-compile-dynamic, which
is a feature I'd be happy to stop supporting.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11707; Package emacs. (Thu, 28 Jun 2012 18:21:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: lekktu <at> gmail.com, kzhr <at> d1.dion.ne.jp, 11707 <at> debbugs.gnu.org
Subject: Re: bug#11707: 24.1.50;
	'make recompile' does not use BYTE_COMPILE_FLAGS on Windows
Date: Thu, 28 Jun 2012 21:15:51 +0300
> From: Glenn Morris <rgm <at> gnu.org>
> Cc: lekktu <at> gmail.com,  11707 <at> debbugs.gnu.org,  kzhr <at> d1.dion.ne.jp
> Date: Thu, 28 Jun 2012 13:30:57 -0400
> 
> So would anyone object to my removing the "bzr-update" rule from
> lisp/Makefile.in?

Instead of removing it, and thus causing pain to finger memory of some
of us, how about if bzr-update simply invokes whatever you think
should be used instead?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11707; Package emacs. (Fri, 06 Jul 2012 07:50:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: 11707 <at> debbugs.gnu.org
Subject: Re: bug#11707: 24.1.50;
	'make recompile' does not use BYTE_COMPILE_FLAGS on Windows
Date: Fri, 06 Jul 2012 03:44:14 -0400
Stefan Monnier wrote:

> I don't think we should remove it, but we should definitely rename it
> because nothing in "compile -vs- recompile" hints at the difference.
>
> We could rename it to "single-process-compile" or something like that.

Done.

This MS Windows bug is still open; maybe it can be closed, I don't know.




Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Wed, 18 Dec 2013 21:41:02 GMT) Full text and rfc822 format available.

Notification sent to Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>:
bug acknowledged by developer. (Wed, 18 Dec 2013 21:41:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: 11707-done <at> debbugs.gnu.org
Subject: Re: bug#11707: 24.1.50;
 'make recompile' does not use BYTE_COMPILE_FLAGS on Windows
Date: Wed, 18 Dec 2013 16:40:09 -0500
Version: 24.4

Since MS Windows now uses the same Makefiles as every other platform,
not the makefile.w32-in files, this issue no longer applies.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 16 Jan 2014 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 218 days ago.

Previous Next


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