unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Corwin Brust <corwin@bru.st>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "H. Dieter Wilhelm" <dieter@duenenhof-wilhelm.de>,
	Emacs developers <emacs-devel@gnu.org>,
	Drew Adams <drew.adams@oracle.com>, Andrea Corallo <akrl@sdf.org>
Subject: Re: [External] : emacs-28 windows binaries available from alpha
Date: Sat, 5 Feb 2022 21:11:52 -0600	[thread overview]
Message-ID: <CAJf-WoSpJd5QTdwHOUPmourn02JQZq7EgEGrqXgkaWFhk+3nmg@mail.gmail.com> (raw)
In-Reply-To: <83o83l1v51.fsf@gnu.org>

On Sat, Feb 5, 2022 at 4:10 AM Eli Zaretskii <eliz@gnu.org> wrote:
>
> Andrea, how about the following patch (which assumes
> comp-enable-subr-trampolines enables and disables only generation of
> new trampolines, but doesn't affect the use of existing trampolines)?
> Is this safe for the release branch, in your opinion?

To be very clear: I'm in no position to comment on how safe this patch
is.  That said...

>
> diff --git a/src/comp.c b/src/comp.c
> index 188dc6e..ba65837 100644
> --- a/src/comp.c
> +++ b/src/comp.c
> @@ -434,6 +434,13 @@ load_gccjit_if_necessary (bool mandatory)
>        gccjit_initialized = init_gccjit_functions ();
>        status = gccjit_initialized ? Qt : Qnil;
>        Vlibrary_cache = Fcons (Fcons (Qgccjit, status), Vlibrary_cache);
> +      /* Disable deferred async compilation and trampoline synthesis
> +        in this session, since libgccjit is not available.  */
> +      if (!gccjit_initialized)
> +       {
> +         native_comp_deferred_compilation = false;
> +         comp_enable_subr_trampolines = false;
> +       }
>      }
>
>    if (mandatory && !gccjit_initialized)

I was able to apply this to the emacs-28 branch and confirm it does
the job.  Thanks due to my elder lad for use of his gaming rig on a
Saturday eve.

The "Patched" result set came from a new set of binary packages[1]
built with this patch.  I also tried a few other things and didn't
spot any obvious breakage.

Drew,
Please LMK if you spot issues with my reproducer and (if you gett a
chance to try) whether you get any different result or if this seems
to solve the issue.

Reproducer:

0. create a folder called c:\emacs
1. download the EL file as linked in Drew's original message to this
thread to c:\emacs
2. download the ELC file attached to that same message to c:\emacs
3. unpack emacs-28.0.91.zip into c:\emacs
4. double click runemacs.exe
5. In scratch, paste in the following sniped and press C-x C-e

  (let ((load-path (append (list "c:/emacs") load-path)))
    (require 'strings))

Patched:

find "strings" at the tail of the *Messages* buffer

Unpatched:

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
"c:/Users/Miko/AppData/Roaming/.emacs.d/eln-cache/2...")
  comp-trampoline-compile(read-buffer)
  comp-subr-trampoline-install(read-buffer)
  defalias(read-buffer #f(compiled-function (prompt &optional default
require-match predicate) #<bytecode -0x12f50ecb110554b3>))
  require(strings)
  (let ((load-path (append (list "c:/emacs") load-path))) (require 'strings))
  (progn (let ((load-path (append (list "c:/emacs") load-path)))
(require 'strings)))
  elisp--eval-last-sexp(nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  command-execute(eval-last-sexp)

[1] Windows binaries Eli's patch, as above:
https://git.sr.ht/~mplscorwin/emacs-w64/tree/master/item/patched



  reply	other threads:[~2022-02-06  3:11 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
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 [this message]
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=CAJf-WoSpJd5QTdwHOUPmourn02JQZq7EgEGrqXgkaWFhk+3nmg@mail.gmail.com \
    --to=corwin@bru.st \
    --cc=akrl@sdf.org \
    --cc=dieter@duenenhof-wilhelm.de \
    --cc=drew.adams@oracle.com \
    --cc=eliz@gnu.org \
    --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).