Subject: bug#73159: 30.0.90; uniscribe / harfbuzz are not initialized on Windows, resulting in fallback to gdi

From: Casey Banner <[email-masked]>
Date: Tue, 10 Sep 2024 14:31:07 -0400

> How come your LANG is set to en_US.UTF-8?  Did you set this in the
> environment or something.  Using UTF-8 as the default encoding on
> Windows is not a good idea.

It seems that the msys2 .profile has `export LANG=$(locale -uU)`, and that
returns en_US.UTF-8 for me.

> Please look at src/epaths.h and see how PATH_EXEC is defined there.

It is indeed  #define PATH_EXEC
"%emacs_dir%/libexec/emacs/30.0.50/x86_64-w64-mingw32"

src/epaths.in has #define PATH_EXEC "/usr/local/libexec/emacs"

I had been running configure and make in a subdirectory. If I run them in
the top-level directory,
then it does update PATH_EXEC to the correct version. I think I made the
wrong assumption that
 running configure in a subdirectory would leave the main source clean.

Thank you for your help debugging this!

- Casey

On Tue, Sep 10, 2024 at 8:33 AM Eli Zaretskii <[email-masked]> wrote:

> > From: Casey Banner <[email-masked]>
> > Date: Tue, 10 Sep 2024 01:50:43 -0400
> >
> > I did a procmon dump to see what .pdmp files emacs.exe is trying to
> load, and it attempts these locations:
> >
> > - E:\dev\emacs-src\bin\emacs.pdmp
> > -
> >
> E:\dev\emacs-src\libexec\emacs\30.0.50\x86_64-w64-mingw32\emacs-ef314e5e05618ae9e98f9cccc0769b2adce721d1b3bac00e305e61b4d457b0a4.pdmp
> >
> > - E:\dev\emacs-src\libexec\emacs\30.0.50\x86_64-w64-mingw32\emacs.pdmp
> >
> > The thing is, the emacs version is 30.0.90, not 30.0.50.
> >
> > A strings dump of emacs.exe:
> >
> > strings emacs.exe | grep 30.0
> > %emacs_dir%/libexec/emacs/30.0.50/x86_64-w64-mingw32
> > $Id: GNU Emacs 30.0.90 (x86_64-w64-mingw32 ACL GIF GMP GNUTLS HARFBUZZ
> JPEG LCMS2 LIBXML2
> > MODULES NATIVE_COMP NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND SQLITE3
> THREADS TIFF
> > TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XPM ZLIB) $
> > 30.0.90
> > %emacs_dir%/share/emacs/30.0.90/lisp
> >
> %emacs_dir%/share/emacs/30.0.90/site-lisp;%emacs_dir%/share/emacs/site-lisp
> > /30.0.90/lisp/
> > %emacs_dir%/share/emacs/30.0.90/etc
> > %emacs_dir%/libexec/emacs/30.0.90/x86_64-w64-mingw32
> > %emacs_dir%/libexec/emacs/30.0.50/x86_64-w64-mingw32
> >
> > So it seems something is going wrong with setting the path. I noticed
> that exec/configure.ac has:
> >
> > AC_INIT([libexec], [30.0.50], [[email-masked]], [],
> >   [https://www.gnu.org/software/emacs/])
>
> exec/configure.ac is not used in the MinGW build (but the above is a
> bug nonetheless, so I will fix it shortly).
>
> I cannot reproduce this result:
>
> > strings emacs.exe | grep 30.0
> > %emacs_dir%/libexec/emacs/30.0.50/x86_64-w64-mingw32
>
> Please look at src/epaths.h and see how PATH_EXEC is defined there.
>
> > I tried changing this to 30.0.90 and re-building (using make bootstrap),
> but the resulting binary still has 30.0.50
> > in it.
>
> As expected: the MinGW build doesn't use that file.  You should
> regenerate or update src/epaths.h.  Perhaps touch src/epaths.in and
> then re-run "make" in the top-level directory of the source tree.
>
>