unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Bootstrap failure on master with native compilation for Windows
@ 2024-10-26 19:00 Andy Moreton
  2024-10-26 19:17 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Moreton @ 2024-10-26 19:00 UTC (permalink / raw)
  To: emacs-devel

Hi,

Building from latest master branch on Windows using the mingw64
toolchain works if native compilation is disabled.

With native compilation enabled, there is an error in a bootstrap build
from a clean tree when dumping:

    GEN      autoloads

  C:/emacs/git/emacs/master/src/lread.c:5485: Emacs fatal error: assertion failed: NILP (Vcomp_abi_hash)

  Backtrace:
  0000000400281213
  000000040010ab11
  000000040018477c
  00000004001fda5d
  00000004002b112b
  00000004002af8e1
  0000000400308e86
  00000004000012e1
  00000004000013ee
  000000067261736c
  000000067441cc89
  make[2]: *** [Makefile:203: autoloads] Error 3
  make[2]: Leaving directory '/c/emacs/git/emacs/master/build/mingw64-x86_64-O2-native/lisp'


Running a git bisect points to commit edf37e811caf ("Implement drawing
text with DirectWrite on MS-Windows.").

Possibly something to do with defsubr calls in syms_of_w32dwrite, and the
latter being called in the wrong initialisation order ?

    AndyM








^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bootstrap failure on master with native compilation for Windows
  2024-10-26 19:00 Bootstrap failure on master with native compilation for Windows Andy Moreton
@ 2024-10-26 19:17 ` Eli Zaretskii
  2024-10-26 19:20   ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2024-10-26 19:17 UTC (permalink / raw)
  To: Andy Moreton; +Cc: emacs-devel

> From: Andy Moreton <andrewjmoreton@gmail.com>
> Date: Sat, 26 Oct 2024 20:00:45 +0100
> 
> Hi,
> 
> Building from latest master branch on Windows using the mingw64
> toolchain works if native compilation is disabled.
> 
> With native compilation enabled, there is an error in a bootstrap build
> from a clean tree when dumping:
> 
>     GEN      autoloads
> 
>   C:/emacs/git/emacs/master/src/lread.c:5485: Emacs fatal error: assertion failed: NILP (Vcomp_abi_hash)
> 
>   Backtrace:
>   0000000400281213
>   000000040010ab11
>   000000040018477c
>   00000004001fda5d
>   00000004002b112b
>   00000004002af8e1
>   0000000400308e86
>   00000004000012e1
>   00000004000013ee
>   000000067261736c
>   000000067441cc89
>   make[2]: *** [Makefile:203: autoloads] Error 3
>   make[2]: Leaving directory '/c/emacs/git/emacs/master/build/mingw64-x86_64-O2-native/lisp'
> 
> 
> Running a git bisect points to commit edf37e811caf ("Implement drawing
> text with DirectWrite on MS-Windows.").
> 
> Possibly something to do with defsubr calls in syms_of_w32dwrite, and the
> latter being called in the wrong initialisation order ?

Does it help to move the following part out of syms_of_w32dwrite to
the top level of that file?

  DEFVAR_BOOL ("w32-inhibit-dwrite", w32_inhibit_dwrite,
	       doc: /* If t, don't use DirectWrite.  */);




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bootstrap failure on master with native compilation for Windows
  2024-10-26 19:17 ` Eli Zaretskii
@ 2024-10-26 19:20   ` Eli Zaretskii
  2024-10-26 19:41     ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2024-10-26 19:20 UTC (permalink / raw)
  To: andrewjmoreton; +Cc: emacs-devel

> Date: Sat, 26 Oct 2024 22:17:08 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-devel@gnu.org
> 
> Does it help to move the following part out of syms_of_w32dwrite to
> the top level of that file?
> 
>   DEFVAR_BOOL ("w32-inhibit-dwrite", w32_inhibit_dwrite,
> 	       doc: /* If t, don't use DirectWrite.  */);

Actually, I think the problem is that it is not initialized, so try
this:

void
syms_of_w32dwrite (void)
{
  DEFVAR_BOOL ("w32-inhibit-dwrite", w32_inhibit_dwrite,
	       doc: /* If t, don't use DirectWrite.  */);
  w32_inhibit_dwrite = false;  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

  defsubr (&Sw32_dwrite_reinit);
  defsubr (&Sw32_dwrite_available);
}



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bootstrap failure on master with native compilation for Windows
  2024-10-26 19:20   ` Eli Zaretskii
@ 2024-10-26 19:41     ` Eli Zaretskii
  2024-10-27  0:30       ` Andy Moreton
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2024-10-26 19:41 UTC (permalink / raw)
  To: andrewjmoreton; +Cc: emacs-devel

> Date: Sat, 26 Oct 2024 22:20:13 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> CC: emacs-devel@gnu.org
> 
> > Date: Sat, 26 Oct 2024 22:17:08 +0300
> > From: Eli Zaretskii <eliz@gnu.org>
> > Cc: emacs-devel@gnu.org
> > 
> > Does it help to move the following part out of syms_of_w32dwrite to
> > the top level of that file?
> > 
> >   DEFVAR_BOOL ("w32-inhibit-dwrite", w32_inhibit_dwrite,
> > 	       doc: /* If t, don't use DirectWrite.  */);
> 
> Actually, I think the problem is that it is not initialized, so try
> this:
> 
> void
> syms_of_w32dwrite (void)
> {
>   DEFVAR_BOOL ("w32-inhibit-dwrite", w32_inhibit_dwrite,
> 	       doc: /* If t, don't use DirectWrite.  */);
>   w32_inhibit_dwrite = false;  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> 
>   defsubr (&Sw32_dwrite_reinit);
>   defsubr (&Sw32_dwrite_available);
> }

Sorry, ignore me.  The problem was that syms_of_w32dwrite was called
from the wrong place, not from where all the syms_of_* functions are
called, and it uses defsubr.

Please try the latest master, I hope I fixed this.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bootstrap failure on master with native compilation for Windows
  2024-10-26 19:41     ` Eli Zaretskii
@ 2024-10-27  0:30       ` Andy Moreton
  0 siblings, 0 replies; 5+ messages in thread
From: Andy Moreton @ 2024-10-27  0:30 UTC (permalink / raw)
  To: emacs-devel

On Sat 26 Oct 2024, Eli Zaretskii wrote:

>> Date: Sat, 26 Oct 2024 22:20:13 +0300
>> From: Eli Zaretskii <eliz@gnu.org>
>> CC: emacs-devel@gnu.org
>> 
>> > Date: Sat, 26 Oct 2024 22:17:08 +0300
>> > From: Eli Zaretskii <eliz@gnu.org>
>> > Cc: emacs-devel@gnu.org
>> > 
>> > Does it help to move the following part out of syms_of_w32dwrite to
>> > the top level of that file?
>> > 
>> >   DEFVAR_BOOL ("w32-inhibit-dwrite", w32_inhibit_dwrite,
>> > 	       doc: /* If t, don't use DirectWrite.  */);
>> 
>> Actually, I think the problem is that it is not initialized, so try
>> this:
>> 
>> void
>> syms_of_w32dwrite (void)
>> {
>>   DEFVAR_BOOL ("w32-inhibit-dwrite", w32_inhibit_dwrite,
>> 	       doc: /* If t, don't use DirectWrite.  */);
>>   w32_inhibit_dwrite = false;  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>> 
>>   defsubr (&Sw32_dwrite_reinit);
>>   defsubr (&Sw32_dwrite_available);
>> }
>
> Sorry, ignore me.  The problem was that syms_of_w32dwrite was called
> from the wrong place, not from where all the syms_of_* functions are
> called, and it uses defsubr.
>
> Please try the latest master, I hope I fixed this.

Thanks Eli, native compilation builds are working again.

    AndyM




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-10-27  0:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-26 19:00 Bootstrap failure on master with native compilation for Windows Andy Moreton
2024-10-26 19:17 ` Eli Zaretskii
2024-10-26 19:20   ` Eli Zaretskii
2024-10-26 19:41     ` Eli Zaretskii
2024-10-27  0:30       ` Andy Moreton

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).