Subject: 26.0.50; Build failure with latest MSYS2
From: Richard Copley <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Mon, 18 Sep 2017 15:12:14 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

After a recent MSYS2 upgrade, Emacs fails to build.
The error is

./temacs --batch  --load loadup bootstrap
make[1]: *** [Makefile:738: bootstrap-emacs.exe] Error 127

Running the temacs in question from a native command prompt
gives a message box to the effect "ScriptFreeCache not found
in GDI32.dll".

The doc for ScriptFreeCache
<https://msdn.microsoft.com/en-us/library/windows/desktop/dd319121(v=vs.85).aspx>
has this note:

[Important] Starting with Windows 8: To maintain the ability to run on
Windows 7, a module that uses Uniscribe must specify Usp10.lib before
gdi32.lib in its library list.

If I re-link temacs.exe using the same command line as the Makefile
uses, except for moving "-lusp10" to just before "lgdi32", then
start "Make" again, the build succeeds.

This happens when I build on Windows 7 and not on Windows 10.
I don't understand why the MSYS2 update is relevant to this.
Maybe it's not.

In GNU Emacs 26.0.50 (build 2, x86_64-w64-mingw32)
 of 2017-09-14 built on 60678UHB
Repository revision: ec5c287fa86a04baa55eac7a2388bd10a0cff498
Windowing system distributor 'Microsoft Corp.', version 6.1.7601
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
C-c C-c is undefined

Configured using:
 'configure --config-cache --with-modules --without-pop 'CFLAGS=-Og
 -ggdb3''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS MODULES

Important settings:
  value of $LANG: ENG
  locale-coding-system: cp1252

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-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
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message subr-x puny seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils elec-pair time-date
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel 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 elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic 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 charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote w32notify w32 multi-tty make-network-process emacs)

Memory information:
((conses 16 96936 7232)
 (symbols 56 20140 1)
 (miscs 48 41 87)
 (strings 32 29576 1455)
 (string-bytes 1 747132)
 (vectors 16 13995)
 (vector-slots 8 482004 10070)
 (floats 8 50 72)
 (intervals 56 233 0)
 (buffers 992 11))