From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Casey Banner Newsgroups: gmane.emacs.bugs Subject: bug#73159: 30.0.90; uniscribe / harfbuzz are not initialized on Windows, resulting in fallback to gdi Date: Tue, 10 Sep 2024 00:15:24 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000001dbf2a0621bc209b" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5009"; mail-complaints-to="usenet@ciao.gmane.io" To: 73159@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 10 06:16:22 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1snsIg-00017e-7K for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 10 Sep 2024 06:16:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1snsIR-00060D-7x; Tue, 10 Sep 2024 00:16:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1snsII-0005zc-9R for bug-gnu-emacs@gnu.org; Tue, 10 Sep 2024 00:15:58 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1snsIH-00087I-VV for bug-gnu-emacs@gnu.org; Tue, 10 Sep 2024 00:15:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:MIME-Version:To:Subject; bh=WYPi5FHCJSUwOmQh0HYiPjE7U+zh0EeZlhz1T7Dd97I=; b=Lr8Tc83jqM1Xv0LDuyBaYj1dE4rhwlxJhhBOZVdQXWOSA3xKGfPoyEilhji11hOSv3WVGTrexUh4A4lhKNkZD+fjVBm7PBh90JB8LyeRMKnJD3N97CnTp+iQf8dkfpxw7FS6Ohtl2zY/ugwymsCy+7TGnxorKQ637iZB1iO1UIATfL2MLQpg6DpW6xiH3DQ0b7IujjNskdmAi4Tn1+m5Lb7knZhmAZlXXW6bH9KDzhjrSELtGFV9j8TajVUxBZ7CnMr3Rbl2t13ZWZAxkJWOFEwUHrYFnlziWnIH7MT8vALZWHOJuWuvSc9XRItooIkPuG2DEc2R1Did9WMCoM4gAA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1snsIM-0000mt-Br for bug-gnu-emacs@gnu.org; Tue, 10 Sep 2024 00:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Casey Banner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 10 Sep 2024 04:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73159 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.17259417503001 (code B ref -1); Tue, 10 Sep 2024 04:16:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Sep 2024 04:15:50 +0000 Original-Received: from localhost ([127.0.0.1]:34508 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1snsI9-0000mL-8N for submit@debbugs.gnu.org; Tue, 10 Sep 2024 00:15:50 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:41802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1snsI6-0000mC-NL for submit@debbugs.gnu.org; Tue, 10 Sep 2024 00:15:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1snsI2-0005yS-1U for bug-gnu-emacs@gnu.org; Tue, 10 Sep 2024 00:15:42 -0400 Original-Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1snsHz-000860-N3 for bug-gnu-emacs@gnu.org; Tue, 10 Sep 2024 00:15:41 -0400 Original-Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-717914d6c95so3303737b3a.0 for ; Mon, 09 Sep 2024 21:15:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725941737; x=1726546537; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=WYPi5FHCJSUwOmQh0HYiPjE7U+zh0EeZlhz1T7Dd97I=; b=LUkgHpMA+byqDnJ8ov3JWDtgMXQy9CDVLeEs35WFlWmolv69pIpPF3F7kwkS/deVHC SxmNGH0+JtWDb/CO2S4+k6PHBqhI3ti6Ev+SXWi6VVwkUCxfOEwmY0yJN+S/VUjYZU/J eBBXoUomqARjDBqT1YT79QiIiiVXqMdk1mXlzuPcJBU4bxkx64lIIbA2igtBNBQOJnkv yX98681Bp3TkUnlJ7o3xOaY/Zr3YVbQB7X4vlNsUCDrdzkfioV0Lcr5+d9jCCGER9ZiE i1c3i4bC2ZxVmKppISWAvhV/6wGGJbNRCpCpEz3OIOgL1PAMQKGNS0K6tKY7V004MzJe FmyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725941737; x=1726546537; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=WYPi5FHCJSUwOmQh0HYiPjE7U+zh0EeZlhz1T7Dd97I=; b=IXitvYG1wzgMoWPLkccr/TR721WvA9/UfGM6PLB10JJPJV0vLfos7WdfvJqKvzqOBz ggdP+fqXhpmzpZcrEOq05Lq/Z1OucbjbyCOK6yw3GtNKe6anOde5CvRNE8oJmvyiK40W coMRZsTHA05M4pDBGUL/yba/bEI0rhZZEH+2jOCSHDiQQU/dBkUps+0cULJjziLKfmaK Q/ULihzejihb8O/+iGRz0au0KLi61FBiqIVM89dVmwt+9E1XIVPEvroknUIhWa8CpaEo QGD3dM4YJBTu0jveyGTewFaIjBB4dkj7T846CVFebOPLcfUeExUE907x7i2O9HIyi6bd xTow== X-Gm-Message-State: AOJu0YzSb/sVK9wYIHt67SwNW16rgRsk/Pkf+qQubwQ98XqJ/244jEmm aV9U3Z4VMBLQjufyOSCvaEps/YKHR7wNcIdrGL6teTqqWjDMzCVM5HsMs7mSyYVZ1rijXcpl5Ra 5VWQkeuKElck1wtjHna3Xzv2JtxPr4pfZ X-Google-Smtp-Source: AGHT+IGrQ+lkVu9KpupTgOnWWyKK0F2sOiRFy0xaixJDf4P/Rt4JyGncrgbBM+rmz9vQNl24DCTzIizGeiCp5QaOA3k= X-Received: by 2002:a05:6a21:6b0b:b0:1cf:4c70:f26f with SMTP id adf61e73a8af0-1cf4c70f4b2mr2963359637.17.1725941736649; Mon, 09 Sep 2024 21:15:36 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=kcbanner@gmail.com; helo=mail-pf1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:291536 Archived-At: --0000000000001dbf2a0621bc209b Content-Type: text/plain; charset="UTF-8" I recently pulled the latest emacs-30 branch (f47297782bdb5e5a07e02f119c8013d11f7d7fae), and I'm building emacs using MSYS2 mingw64 on Windows. With a build on this branch, certain symbols (from the nerd-icons package) were rendering as boxes and not their actual symbol. I suspected that this was because gdi was being used, and indeed using describe-char on any character shows me a font starting with `gdi:`, indicating the uniscribe or harfbuzz are not being used. This is not the case on the emacs-29 branch, where I see `uniscribe:` instead (and the symbols render correctly). I was not able to get harfbuzz to load on that branch, which is why I was trying emacs-30 to see if something was different there. To investigate this, I first used procmon to look at the syscalls to see if anything was trying to load libharfbuzz-0.dll, and I did see it in the trace I took, however the callstack was an OS callstack, and not from where I expected (src\w32uniscribe.c:syms_of_w32uniscribe_for_pdumber). I rebuilt with debug symbols, and set a breakpoint in that function - it was called once, but `initialized` was false so the LoadLibrary calls never ran. I'm not too familiar with how pdumper works, or the emacs source in general, so I'm not sure what the actual root cause is here. I did a bit more debugging to see when `initialized` was set to true, and it does get set later during initialization. I noted that I do not have a .pdmp file in my installation direction, which it seems to be trying to load during startup. One more piece of information: attempting to yank any text results in the error: `Coding system is invalid or doesn't have an eol variant for dos line ends: nil` This error occurs when starting with -Q and attempting to yank any text. If I call `(set-selection-coding-system 'utf-16-le)`, it resolves the issue. However, I didn't have to do this in emacs-29, so this makes me think something has possibly broken with init on Windows, since I believe this is not supposed to be nil by default? I'm happy to assist by providing any additional info if needed! Thanks, Casey In GNU Emacs 30.0.90 (build 1, x86_64-w64-mingw32) of 2024-09-09 built on DESKTOP-EK25TL1 Windowing system distributor 'Microsoft Corp.', version 10.0.19045 System Description: Microsoft Windows 10 Pro (v10.0.2009.19045.4780) Configured using: 'configure -prefix=/e/dev/emacs-src --without-dbus --without-pop --with-native-compilation --with-wide-int --without-compress-install --with-json --with-tree-sitter --without-imagemagick 'CFLAGS=-O2 -mtune=native -march=native -fomit-frame-pointer -ftree-vectorize -Wno-error=implicit-function-declaration -pipe -g' PKG_CONFIG_PATH=/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig' Configured features: 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 (NATIVE_COMP present but libgccjit not available) Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: cp1252 Major mode: Fundamental Minor modes in effect: tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t blink-cursor-mode: t minibuffer-regexp-mode: t buffer-read-only: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date subr-x mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils rmc iso-transl tooltip cus-start cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel touch-screen dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads w32notify w32 lcms2 multi-tty move-toolbar make-network-process native-compile emacs) Memory information: ((conses 16 181417 72491) (symbols 48 21836 0) (strings 32 65423 2126) (string-bytes 1 4014620) (vectors 16 34658) (vector-slots 8 1231317 136112) (floats 8 196 11) (intervals 56 408 0) (buffers 992 11)) --0000000000001dbf2a0621bc209b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I recently pulled the latest emacs-30 branch (f472977= 82bdb5e5a07e02f119c8013d11f7d7fae),=C2=A0
and I'm building em= acs using MSYS2 mingw64 on Windows.

With a build on this branch, c= ertain symbols (from the nerd-icons
package) were rendering as boxes and= not their actual symbol. I
suspected that this was because gdi was bein= g used, and indeed using
describe-char on any character shows me a font = starting with
`gdi:`, indicating the uniscribe or harfbuzz are not being= used.

This is not the case on the emacs-29 branch, where I see `uni= scribe:`
instead (and the symbols render correctly). I was not able to g= et
harfbuzz to load on that branch, which is why I was trying emacs-30to see if something was different there.

To investigate this, I fi= rst used procmon to look at the syscalls to
see if anything was trying t= o load libharfbuzz-0.dll, and I did see it
in the trace I took, however = the callstack was an OS callstack, and not
from where I expected (src\w3= 2uniscribe.c:syms_of_w32uniscribe_for_pdumber).

I rebuilt with debug= symbols, and set a breakpoint in that function - it
was called once, bu= t `initialized` was false so the LoadLibrary calls
never ran. I'm no= t too familiar with how pdumper works, or the emacs
source in general, s= o I'm not sure what the actual root cause is here.

I did a bit m= ore debugging to see when `initialized` was set to true,
and it doe= s get set later during initialization. I noted that I do not have a .pdmp f= ile
in my installation direction, which it seems to be trying to = load during startup.

One more piece of information= : attempting to yank any text results in the error:

`Coding system is invalid or doesn't have an eol variant for dos line= ends: nil`

This error occurs when starting w= ith -Q and attempting to yank any text. If I=C2=A0
call `(set-sel= ection-coding-system 'utf-16-le)`, it resolves the issue.

However, I didn't have to do this in emacs-29, so this= makes me think=C2=A0
something has possibly broken with init on = Windows, since I believe this
is not supposed to be nil by defaul= t?

I'm happy to assist by providing any ad= ditional info if needed!

Thanks,
Casey

In GNU Emacs 30.0.90 (build 1, x86_64-w64-mingw32) of 2024-09-0= 9 built
=C2=A0on DESKTOP-EK25TL1
Windowing system distributor 'Mi= crosoft Corp.', version 10.0.19045
System Description: Microsoft Win= dows 10 Pro (v10.0.2009.19045.4780)

Configured using:
=C2=A0'= configure -prefix=3D/e/dev/emacs-src --without-dbus --without-pop
=C2=A0= --with-native-compilation --with-wide-int --without-compress-install
=C2= =A0--with-json --with-tree-sitter --without-imagemagick 'CFLAGS=3D-O2=C2=A0-mtune=3Dnative -march=3Dnative -fomit-frame-pointer -ftree-vectori= ze
=C2=A0-Wno-error=3Dimplicit-function-declaration -pipe -g'
=C2= =A0PKG_CONFIG_PATH=3D/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig'
Configured features:
ACL GIF GMP GNUTLS HARFBUZZ JPEG LCMS2 LIBXML= 2 MODULES NATIVE_COMP
NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND SQLITE3 TH= READS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XPM ZLIB

(NATIVE_= COMP present but libgccjit not available)

Important settings:
=C2= =A0 value of $LANG: en_US.UTF-8
=C2=A0 locale-coding-system: cp1252
<= br>Major mode: Fundamental

Minor modes in effect:
=C2=A0 tooltip-= mode: t
=C2=A0 global-eldoc-mode: t
=C2=A0 show-paren-mode: t
=C2= =A0 electric-indent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 tool-ba= r-mode: t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-mode: t
= =C2=A0 global-font-lock-mode: t
=C2=A0 blink-cursor-mode: t
=C2=A0 mi= nibuffer-regexp-mode: t
=C2=A0 buffer-read-only: t
=C2=A0 line-number= -mode: t
=C2=A0 indent-tabs-mode: t
=C2=A0 transient-mark-mode: t
= =C2=A0 auto-composition-mode: t
=C2=A0 auto-encryption-mode: t
=C2=A0= auto-compression-mode: t

Load-path shadows:
None found.

F= eatures:
(shadow sort mail-extr emacsbug message mailcap yank-media puny= dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg = rfc6068
epg-config gnus-util text-property-search time-date subr-x mm-de= code
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailhea= der
cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util
ma= il-prsvr mail-utils rmc iso-transl tooltip cus-start cconv eldoc paren
e= lectric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
t= ouch-screen dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars
ter= m/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list= replace newcomment text-mode lisp-mode prog-mode register
page tab-bar = menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-= lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice= seq simple cl-generic indonesian philippine
cham georgian utf-8-lang mi= sc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp= 51932 hebrew greek romanian slovak czech
european ethiopic indian cyrill= ic chinese composite emoji-zwj charscript
charprop case-table epa-hook j= ka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs t= heme-loaddefs faces cus-face macroexp
files window text-properties overl= ay sha1 md5 base64 format env
code-pages mule custom widget keymap hasht= able-print-readable backquote
threads w32notify w32 lcms2 multi-tty move= -toolbar make-network-process
native-compile emacs)

Memory inform= ation:
((conses 16 181417 72491) (symbols 48 21836 0) (strings 32 65423 = 2126)
=C2=A0(string-bytes 1 4014620) (vectors 16 34658)
=C2=A0(vector= -slots 8 1231317 136112) (floats 8 196 11)
=C2=A0(intervals 56 408 0) (b= uffers 992 11))
--0000000000001dbf2a0621bc209b--