unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Corwin Brust <corwin@bru.st>,
	"H. Dieter Wilhelm" <dieter@duenenhof-wilhelm.de>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: RE: [External] : emacs-28 windows binaries available from alpha
Date: Sun, 6 Feb 2022 00:10:52 +0000	[thread overview]
Message-ID: <SJ0PR10MB54880DCC8FB1FBC8B7E981DBF32B9@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <CAJf-WoTbpqW_6YzrL1RCRHD95R0De1wvnHCnK5CDR7anO2j=+Q@mail.gmail.com>

> > >> > I cannot reproduce this.  How exactly did you load strings.elc?
> > >>
> > >> M-x load-file
> > >>
> > >> with (load-file "d:/tmp/Corwin/strings.elc") it isn't working either on
> > >> my machine!?
> > >
> > > Because you loaded a .elc file, explicitly.  Try this instead:
> > >
> > >   M-x load-library RET d:/tmp/Corwin/strings RET
> >
> > Indeed!
> 
> Awesome, thanks for this confirmation.

I just use (require 'strings), and both the EL
and the ELC are in my `load-path'.  (And the ELC
is newer than the EL.)

But anyway, `load-library' and `require', prefer
ELC over the EL:

 If the library name is ‘FOO’, it tries looking for
 files named ‘FOO.elc’, ‘FOO.el’, and ‘FOO’.  The default behavior is to
 load the first file found.  This command prefers ‘.elc’ files over ‘.el’
 files because compiled files load and run faster.  If it finds that
 ‘LIB.el’ is newer than ‘LIB.elc’, it issues a warning, in case someone
 made changes to the ‘.el’ file and forgot to recompile it, but loads the
 ‘.elc’ file anyway.

The backtrace I sent was from doing `M-x load-file'.
I did that to provide a simple recipe from `runemacs -Q'.

But I first ran into this from just invoking Emacs with
my init file.  The backtrace is equivalent, IMO - same
thing, once there's an attempt to load the ELC.  But in
case it helps, here is the backtrace I get with my init
file - `require' is used, not `load-file':

Debugger entered--Lisp error: (error "Cannot find libgccjit library")
  error("Cannot find libgccjit library")
  comp-ensure-native-compiler()
  comp--native-compile((lambda (arg0 &optional arg1 arg2 arg3) (let ((f #'read-buffer)) (funcall f arg0 arg1 arg2 arg3))) nil "d:/usr/drew/.emacs.d/eln-cache/28.0.91-bfc49136/su...")
  comp-trampoline-compile(read-buffer)
  comp-subr-trampoline-install(read-buffer)
  defalias(read-buffer #f(compiled-function (prompt &optional default require-match predicate) #<bytecode -0xb142bd07f69549d>))
  require(strings)
  byte-code("\306\307!\210\10\310W\203\36\0\311\11B\21\312\11B\21\313\11B\21\314\11B\21\315\11B\21\10\316V\2031\0\317\320\321\322\n\323\13\324\f\325&\11\210\10..." [emacs-major-version current-load-list :type :group :version next-error-fringe-indicator require strings 22 compilation-highlight-overlay fringe-indicator-alist next-error-function next-error-last-buffer next-error-recenter 21 custom-declare-variable next-error-highlight 0.5 "*Highlighting of the current locus in selected sou..." (choice (number :tag "Highlight locus for specified time") (const :tag "Highlight locus until move" until-move) (const :tag "Highlight locus until move or next command" t) (const :tag "Do not highlight locus" nil) (const :tag "Indicate locus using fringe arrow" fringe-arrow)) next-error "22.1" next-error-highlight-no-select 0.5 "*Highlighting of locations in `next-error-no-selec..." (choice (number :tag "Highlight locus for specified time") (const :tag "Highlight locus until move" until-move) (const :tag "Highlight locus until move or next command" t) (const :tag "Do not highlight locus" nil) (const :tag "Indicate locus using fringe arrow" fringe-arrow)) #f(compiled-function (&optional arg reset) (interactive "P") #<bytecode 0x150fa3674cc6dae1>) fboundp hl-line-mode next-error-buffer-hl-line #f(compiled-function () #<bytecode 0x127964596bd0f36>) boundp filled-rectangle put variable-documentation "Fringe indicator to use for `next-error' in compil..." next-error-fringe-setup #f(compiled-function () #<bytecode -0xaf425fb13ac875f>) edit-and-eval-command #f(compiled-function (prompt command) #<bytecode -0x18d46e1fe1ec7bcf>)] 10)
  require(simple+ nil t)
  byte-code("\301\302!\210\303\302!\210\10\304V\203\24\0\303\305\306\307#\210\303\310\306\307#\210\303\311\306\307#\207" [emacs-major-version provide start require 21 bindings+ nil t misc-fns simple+] 4)
  require(start)
  load-with-code-conversion("<my init file>" "<my init file>"  t t)
  load("~/.emacs" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode 0xf88ed2872b5c88c>) #f(compiled-function () #<bytecode -0x1f3c686ddc0da035>) t)
  command-line()
  normal-top-level()

The Emacs 28 binary tries to load strings.elc, and while
doing so runs into a redefinition there of `read-buffer'.
It then tries to natively compile from that ELC (no?).

And the load fails because the compilation fails:
(featurep 'strings) = nil after the error's raised.

If I'm right about this then isn't there a bug in the
Emacs 28 binary?  If not, why not?

Or if it's right that it chokes on the ELC code for
the defun of `read-buffer', isn't it at least bad
that the error message doesn't say anything about
that, but instead says that the problem is that it
can't find library libgccjit?

> I think we now have a good
> sense of where things stand with this report. I'll summarize things
> (especially for Drew's benefit) in a new message, back up-thread.
> First I'm planning to try building emacs-28 with the patch Eli
> suggested, in case I might be able to provide feedback in advance of
> when Andreas can look.
> 
> > [Nitpicking:] Would you consider it an omission that load-library is
> > triggering a compilation but (load-file ".elc") not?  (No, probably not
> > because load-file would need to consider files which are not directly
> > submitted.)
> 
> IMO, no.  It's a feature:  when we specify an extension we get exactly
> what we ask for, when we specify without any extension we get the
> default behavior of favoring the most compiled version available,
> creating the ELN if we can when we have an ELC but no ELN.

Isn't that what's happening?  It tries to load the
ELC.  Not because the extension was specified (it
wasn't, with `require'), but because the ELC exists
and it's more recent than the EL.

IOW, how does this have anything to do with what
code you use to load the ELC?  It looks to me like
the problem occurs no matter how you do that.

  reply	other threads:[~2022-02-06  0:10 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-04 18:54 emacs-28 windows binaries available from alpha Corwin Brust
2022-02-04 22:08 ` [External] : " Drew Adams
2022-02-04 22:12   ` Drew Adams
2022-02-04 23:10     ` Corwin Brust
2022-02-05  1:28       ` Drew Adams
2022-02-05  4:35         ` Corwin Brust
2022-02-05  7:43           ` Eli Zaretskii
2022-02-05  8:48             ` Corwin Brust
2022-02-05  9:15               ` Eli Zaretskii
2022-02-05 18:16           ` Drew Adams
2022-02-05  7:25     ` Eli Zaretskii
2022-02-05  9:22       ` H. Dieter Wilhelm
2022-02-05  9:40         ` Eli Zaretskii
2022-02-05 16:49           ` H. Dieter Wilhelm
2022-02-05 17:54             ` Eli Zaretskii
2022-02-05 19:25               ` H. Dieter Wilhelm
2022-02-05 19:47                 ` Eli Zaretskii
2022-02-05 21:11                   ` H. Dieter Wilhelm
2022-02-05 22:56                     ` Corwin Brust
2022-02-06  0:10                       ` Drew Adams [this message]
2022-02-06  8:22                         ` Eli Zaretskii
2022-02-06  8:51                           ` Drew Adams
2022-02-06  9:25                             ` Eli Zaretskii
2022-02-06 17:08                               ` Drew Adams
2022-02-06 17:33                                 ` Eli Zaretskii
2022-02-06  8:18                       ` Eli Zaretskii
2022-02-05 10:10       ` Eli Zaretskii
2022-02-06  3:11         ` Corwin Brust
2022-02-06  6:57           ` Drew Adams
2022-02-06  9:11             ` Eli Zaretskii
2022-02-06 17:07               ` Drew Adams
2022-02-09 19:08         ` Eli Zaretskii
2022-02-09 21:03           ` Andrea Corallo
2022-02-10  5:52             ` Eli Zaretskii
2022-02-10  8:56               ` Andrea Corallo
2022-02-10 12:13                 ` Eli Zaretskii
2022-02-10 13:36                   ` Andrea Corallo
2022-02-10 17:15                     ` Eli Zaretskii
2022-02-10 18:34                       ` Andrea Corallo
2022-02-11  8:29                         ` Eli Zaretskii
2022-02-11  9:16                           ` Andrea Corallo
2022-02-11  9:21                             ` Andrea Corallo
2022-02-11 11:31                               ` Eli Zaretskii
2022-02-11 14:16                                 ` Andrea Corallo
2022-02-11 14:33                                   ` Eli Zaretskii
2022-02-11 14:38                                     ` Andrea Corallo
2022-02-11 11:30                             ` Eli Zaretskii
2022-02-11 14:18                               ` Andrea Corallo
2022-02-11 14:35                                 ` Eli Zaretskii
2022-02-11 14:44                                   ` Andrea Corallo
2022-02-11 15:16                                     ` Eli Zaretskii
2022-02-14 10:25                                       ` Andrea Corallo
2022-02-10 22:50                     ` Corwin Brust
2022-02-06  0:33     ` Corwin Brust

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SJ0PR10MB54880DCC8FB1FBC8B7E981DBF32B9@SJ0PR10MB5488.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=corwin@bru.st \
    --cc=dieter@duenenhof-wilhelm.de \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).