GNU bug report logs -
#28994
26.0.90; Build error during bootstrap
Previous Next
Reported by: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Date: Wed, 25 Oct 2017 15:45:02 UTC
Severity: normal
Found in version 26.0.90
Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
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 28994 in the body.
You can then email your comments to 28994 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28994
; Package
emacs
.
(Wed, 25 Oct 2017 15:45:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Monnier <monnier <at> IRO.UMontreal.CA>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 25 Oct 2017 15:45:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Package: Emacs
Version: 26.0.90
The following:
rm -f src/bootstrap-emacs lisp/progmodes/elisp-mode.elc
make
triggers the following message:
[...]
Loading emacs-lisp/lisp-mode...
Loading .../lisp/progmodes/elisp-mode.el (source)...
Eager macro-expansion failure: (error "Autoloading file .../lisp/emacs-lisp/regexp-opt.elc failed to define function flymake-log")
Loading textmodes/text-mode...
[...]
It's arguably harmless, but the error is undesirable and the error
message itself clearly shows we have a bug somewhere in our
error reporting.
I tracked down the source of the problem to:
- autoload-do-load (called to fetch flymake-log) will call `load` telling
it to silently ignore errors if flymake is not found.
- then, indeed, flymake.el isn't found (because lisp/progmodes is not in
load-path in this specific situation).
- so after the call to `load` the macro is still not defined and the
load-history has no trace of flymake.el since we didn't load it at all,
hence the odd error message.
The patch below to src/eval.c fixes this problem by:
- not signaling an error if the load didn't define the function when we
told load not to signal an error anyway (so we don't emit a misleading
message about some unrelated file).
- not telling load to ignore errors when we're trying to load a macro.
So after that patch, we get the real error message:
[...]
Loading emacs-lisp/lisp-mode...
Loading .../lisp/progmodes/elisp-mode.el (source)...
Eager macro-expansion failure: (file-missing "Cannot open load file" "Aucun fichier ou dossier de ce type" "flymake")
Loading textmodes/text-mode...
[...]
Which I fix with the patch to lisp/loadup.el. This then bumps into
another error, because flymake.el ends up loading edmacro, which loads
kmacro which tries to modify query-replace-map which doesn't exist yet,
and if we fix that by loading `replace.el` we get yet another error because
`replace.el` tries to use text-mode-map which again isn't defined yet,
which I fix by loading text-mode.
And now it works without signaling an error. Any objection to
installing this patch, or suggestion to fix the string of problems some
other way?
Stefan
diff --git a/lisp/kmacro.el b/lisp/kmacro.el
index 4abc571db4..5729f2fc8d 100644
--- a/lisp/kmacro.el
+++ b/lisp/kmacro.el
@@ -111,6 +111,7 @@
;;; Code:
;; Customization:
+(require 'replace)
(defgroup kmacro nil
"Simplified keyboard macro user interface."
diff --git a/lisp/loadup.el b/lisp/loadup.el
index d048f0736b..40e5651aa1 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -76,6 +76,7 @@
(setq max-lisp-eval-depth 2200)
(setq load-path (list (expand-file-name "." dir)
(expand-file-name "emacs-lisp" dir)
+ (expand-file-name "progmodes" dir)
(expand-file-name "language" dir)
(expand-file-name "international" dir)
(expand-file-name "textmodes" dir)
diff --git a/lisp/replace.el b/lisp/replace.el
index a5548f461d..cdaeb9240a 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -28,6 +28,7 @@
;;; Code:
+(require 'text-mode)
(eval-when-compile (require 'cl-lib))
(defcustom case-replace t
diff --git a/src/eval.c b/src/eval.c
index 52e4c96d4b..063deb4ba0 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1986,12 +1986,10 @@ it defines a macro. */)
if (!CONSP (fundef) || !EQ (Qautoload, XCAR (fundef)))
return fundef;
- if (EQ (macro_only, Qmacro))
- {
- Lisp_Object kind = Fnth (make_number (4), fundef);
- if (! (EQ (kind, Qt) || EQ (kind, Qmacro)))
- return fundef;
- }
+ Lisp_Object kind = Fnth (make_number (4), fundef);
+ if (EQ (macro_only, Qmacro)
+ && !(EQ (kind, Qt) || EQ (kind, Qmacro)))
+ return fundef;
/* This is to make sure that loadup.el gives a clear picture
of what files are preloaded and when. */
@@ -2014,15 +2012,18 @@ it defines a macro. */)
The value saved here is to be restored into Vautoload_queue. */
record_unwind_protect (un_autoload, Vautoload_queue);
Vautoload_queue = Qt;
- /* If `macro_only', assume this autoload to be a "best-effort",
+ /* If `macro_only' is set and fundef isn't a macro, assume this autoload to
+ be a "best-effort" (e.g. to try and find a compiler macro),
so don't signal an error if autoloading fails. */
- Fload (Fcar (Fcdr (fundef)), macro_only, Qt, Qnil, Qt);
+ Lisp_Object ignore_errors
+ = (EQ (kind, Qt) || EQ (kind, Qmacro)) ? Qnil : macro_only;
+ Fload (Fcar (Fcdr (fundef)), ignore_errors, Qt, Qnil, Qt);
/* Once loading finishes, don't undo it. */
Vautoload_queue = Qt;
unbind_to (count, Qnil);
- if (NILP (funname))
+ if (NILP (funname) || !NILP (ignore_errors))
return Qnil;
else
{
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28994
; Package
emacs
.
(Wed, 25 Oct 2017 16:10:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 28994 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
> Date: Wed, 25 Oct 2017 11:37:58 -0400
>
> Any objection to installing this patch
None if you meant to install on master.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28994
; Package
emacs
.
(Wed, 25 Oct 2017 16:18:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 28994 <at> debbugs.gnu.org (full text, mbox):
>> Any objection to installing this patch
> None if you meant to install on master.
OK. And would there be some part you'd be willing/interested to see on
emacs-26?
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28994
; Package
emacs
.
(Wed, 25 Oct 2017 16:27:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 28994 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
> Cc: 28994 <at> debbugs.gnu.org
> Date: Wed, 25 Oct 2017 12:17:29 -0400
>
> >> Any objection to installing this patch
> > None if you meant to install on master.
>
> OK. And would there be some part you'd be willing/interested to see on
> emacs-26?
The Lisp parts look innocent enough.
Reply sent
to
Stefan Monnier <monnier <at> IRO.UMontreal.CA>
:
You have taken responsibility.
(Wed, 25 Oct 2017 16:39:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Stefan Monnier <monnier <at> IRO.UMontreal.CA>
:
bug acknowledged by developer.
(Wed, 25 Oct 2017 16:39:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 28994-done <at> debbugs.gnu.org (full text, mbox):
>> >> Any objection to installing this patch
>> > None if you meant to install on master.
>> OK. And would there be some part you'd be willing/interested to see on
>> emacs-26?
> The Lisp parts look innocent enough.
OK, done, thanks,
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28994
; Package
emacs
.
(Wed, 25 Oct 2017 17:35:01 GMT)
Full text and
rfc822 format available.
Message #22 received at 28994 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
> Cc: 28994-done <at> debbugs.gnu.org
> Date: Wed, 25 Oct 2017 12:38:29 -0400
>
> >> >> Any objection to installing this patch
> >> > None if you meant to install on master.
> >> OK. And would there be some part you'd be willing/interested to see on
> >> emacs-26?
> > The Lisp parts look innocent enough.
>
> OK, done, thanks,
Thank you.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 23 Nov 2017 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 271 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.