Skip to content

Fix missing i686 dlls #591

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Feb 12, 2025
Merged

Conversation

dscho
Copy link
Member

@dscho dscho commented Feb 10, 2025

As of yesterday, the check-for-missing-dlls job in git-sdk-32 is failing, and only in that git-sdk-* repository. The culprit is this monster of a commit that you should not try to load in the browser, as GitHub fails thusly:

image

Here is the commit message in its full glory
Update 169 packages

apr (1.7.0-1 -> 1.7.5-1)
apr-util (1.6.1-1 -> 1.6.3-2)
asciidoc (9.1.0-2 -> 10.2.1-2)
autoconf-wrapper (new: 20240607-1)
autoconf2.13 (2.13-3 -> 2.13-6)
autoconf (2.71-1 -> 2.69-4)
autoconf2.71 (new: 2.71-4)
autoconf2.72 (new: 2.72-3)
autogen (5.18.16-1 -> 5.18.16-5)
automake-wrapper (11-1 -> 20240607-1)
automake1.11 (1.11.6-4 -> 1.11.6-6)
automake1.12 (1.12.6-4 -> 1.12.6-6)
automake1.13 (1.13.4-5 -> 1.13.4-7)
automake1.14 (1.14.1-4 -> 1.14.1-6)
automake1.15 (1.15.1-2 -> 1.15.1-4)
automake1.16 (1.16.3-1 -> 1.16.5-1)
automake1.17 (new: 1.17-1)
bash-completion (2.11-1 -> 2.16.0-1)
binutils (2.36.1-4 -> 2.44-1)
bison (3.7.6-1 -> 3.8.2-5)
bsdcpio (3.5.1-1 -> 3.7.7-1)
bsdtar (3.5.1-1 -> 3.7.7-1)
bzip2 (1.0.8-2 -> 1.0.8-4)
coreutils (8.32-1 -> 8.32-5)
dash (0.5.11.4-1 -> 0.5.12-1)
diffstat (1.64-1 -> 1.67-1)
diffutils (3.7-1 -> 3.10-1)
docbook-xml (4.5-2 -> 4.5-4)
docbook-xsl (1.79.2-1 -> 1.79.2-3)
docx2txt (1.4-1 -> 1.4-2)
dos2unix (7.4.2-1 -> 7.5.2-1)
expat (2.3.0-1 -> 2.6.4-1)
file (5.40-2 -> 5.46-1)
filesystem (2021.06-1 -> 2024.12.18-1)
findutils (4.8.0-1 -> 4.10.0-2)
flex (2.6.4-1 -> 2.6.4-4)
gcc (10.2.0-1 -> 13.3.0-1)
gcc-fortran (removed)
gcc-libs (10.2.0-1 -> 13.3.0-1)
gdb (10.2-3 -> 14.2-7)
gdbm (1.19-1 -> 1.24-1)
gettext (0.19.8.1-1 -> 0.22.4-1)
gettext-devel (0.19.8.1-1 -> 0.22.4-1)
git (2.32.0-1 -> 2.48.1-1)
glib2 (2.68.1-1 -> 2.82.4-1)
gmp (6.2.1-1 -> 6.3.0-1)
grep (3.1-1 -> 1~3.0-7)
groff (1.22.4-1 -> 1.23.0-2)
help2man (1.48.3-1 -> 1.49.3-1)
icu (68.2-1 -> 75.1-2)
info (6.7-3 -> 7.1.1-1)
isl (0.22.1-1 -> 0.27-1)
libarchive (3.5.1-1 -> 3.7.7-1)
libasprintf (0.19.8.1-1 -> 0.22.4-1)
libassuan (2.5.5-1 -> 2.5.7-1)
libatomic_ops (7.6.10-1 -> 7.8.2-1)
libbz2 (1.0.8-2 -> 1.0.8-4)
libedit (20210522_3.1-1 -> 20240808_3.1-1)
libexpat (2.3.0-1 -> 2.6.4-1)
libffi (3.3-1 -> 3.4.6-1)
libgc (8.0.4-1 -> 8.2.8-1)
libgdbm (1.19-1 -> 1.24-1)
libgettextpo (0.19.8.1-1 -> 0.22.4-1)
libgpgme (1.16.0-1 -> 1.24.1-2)
libguile (2.2.7-1 -> 3.0.10-3)
libhogweed (3.7.3-1 -> 3.10.1-1)
libiconv (1.16-2 -> 1.18-1)
libiconv-devel (1.16-2 -> 1.18-1)
libidn2 (2.3.1-2 -> 2.3.7-1)
libintl (0.19.8.1-1 -> 0.22.4-1)
libltdl (2.4.6-11 -> 2.5.4-1)
liblz4 (1.9.3-1 -> 1.10.0-1)
liblzma (5.2.5-1 -> 5.6.4-1)
liblzo2 (2.10-2 -> 2.10-3)
libnettle (3.7.3-1 -> 3.10.1-1)
libnghttp2 (1.43.0-1 -> 1.64.0-1)
libnpth (1.6-1 -> 1.8-1)
libp11-kit (0.23.22-2 -> 0.25.5-2)
libpcre (8.45-1 -> 8.45-5)
libpcre16 (8.45-1 -> 8.45-5)
libpcre32 (8.45-1 -> 8.45-5)
libpcrecpp (8.45-1 -> 8.45-5)
libpcreposix (8.45-1 -> 8.45-5)
libpipeline (1.5.3-2 -> 1.5.8-1)
libpsl (0.21.1-2 -> 0.21.5-2)
libreadline (8.1.0-1 -> 8.2.013-1)
libsqlite (3.36.0-1 -> 3.46.1-1)
libtasn1 (4.17.0-2 -> 4.19.0-1)
libtool (2.4.6-11 -> 2.5.4-1)
libunistring (0.9.10-1 -> 1.3-1)
libunrar (6.0.7-1 -> 7.1.3-1)
libutil-linux (2.35.2-1 -> 2.35.2-5)
libxcrypt (new: 4.4.38-1)
libxml2 (2.9.10-9 -> 2.13.5-1)
libxslt (1.1.34-4 -> 1.1.42-1)
libxxhash (0.8.0-1 -> 0.8.3-1)
libzstd (1.5.0-1 -> 1.5.6-1)
lndir (1.0.3-1 -> 1.0.5-1)
m4 (1.4.19-1 -> 1.4.19-2)
make (4.3-1 -> 4.4.1-2)
man-db (2.9.4-1 -> 2.13.0-1)
markdown (1.0.1-1 -> 1.0.1-2)
mpc (1.2.1-1 -> 1.3.1-1)
mpdecimal (2.5.0-1 -> 4.0.0-1)
mpfr (4.1.0-1 -> 4.2.1-1)
msys2-keyring (1~20210213-2 -> 1~20241007-1)
msys2-launcher (1.3-2 -> 1.5-3)
msys2-w32api-headers (9.0.0.6158.1c773877-1 -> 12.0.0.r0.g819a6ec2e-2)
msys2-w32api-runtime (9.0.0.6158.1c773877-1 -> 12.0.0.r0.g819a6ec2e-2)
ncurses (6.2-1 -> 6.5.20240831-2)
nettle (3.7.3-1 -> 3.10.1-1)
p11-kit (0.23.22-2 -> 0.25.5-2)
pacman (6.0.0-4 -> 6.1.0-10)
pacman-contrib (1.4.0-2 -> 1.10.6-1)
pacman-mirrors (20210703-1 -> 20241217-1)
patch (2.7.6-1 -> 2.7.6-3)
patchutils (0.4.2-1 -> 0.4.2-3)
pcre (8.45-1 -> 8.45-5)
perl-Authen-SASL (2.16-2 -> 2.1700-1)
perl-Convert-BinHex (1.125-1 -> 1.125-2)
perl-Encode-Locale (1.05-1 -> 1.05-2)
perl-Error (0.17029-1 -> 0.17029-2)
perl-File-Listing (6.14-1 -> 6.16-1)
perl-HTML-Tagset (3.20-2 -> 3.24-1)
perl-HTTP-Cookies (6.09-1 -> 6.11-1)
perl-HTTP-Daemon (6.12-1 -> 6.16-1)
perl-HTTP-Date (6.05-1 -> 6.06-1)
perl-HTTP-Message (6.32-1 -> 7.00-1)
perl-HTTP-Negotiate (6.01-2 -> 6.01-3)
perl-IO-HTML (1.004-1 -> 1.004-2)
perl-IO-Socket-SSL (2.071-1 -> 2.089-1)
perl-IO-Stringy (2.113-1 -> 2.113-2)
perl-JSON (4.03-1 -> 4.10-1)
perl-LWP-MediaTypes (6.04-1 -> 6.04-2)
perl-MIME-tools (5.509-1 -> 5.515-1)
perl-MailTools (2.21-1 -> 2.22-1)
perl-Module-Build (0.4231-1 -> 0.4234-2)
perl-Net-HTTP (6.21-1 -> 6.23-1)
perl-Net-SMTP-SSL (1.04-1 -> 1.04-2)
perl-Test-Pod (1.52-1 -> 1.52-2)
perl-TimeDate (2.33-1 -> 2.33-2)
perl-Try-Tiny (0.30-1 -> 0.32-1)
perl-URI (5.09-1 -> 5.31-1)
perl-WWW-RobotRules (6.02-2 -> 6.02-3)
perl-http-cookiejar (new: 0.014-1)
perl-inc-latest (0.500-1 -> 0.500-2)
perl-libwww (6.55-1 -> 6.77-1)
pinentry (1.1.1-1 -> 1.3.1-1)
pkgfile (21-1 -> 21-2)
python (3.9.5-1 -> 3.12.8-3)
rebase (4.5.0-1 -> 4.5.0-4)
rsync (3.2.3-1 -> 3.4.1-1)
sed (4.8-1 -> 4.9-1)
ssh-pageant-git (1.4.12.g6f47092-1 -> 1.4.r15.gc804ba4-1)
swig (4.0.2-1 -> 4.2.1-1)
tar (1.34-1 -> 1.35-2)
tcl (8.6.10-1 -> 8.6.12-3)
time (1.9-1 -> 1.9-3)
tzcode (2021a-1 -> 2025a-1)
unrar (6.0.7-1 -> 7.1.3-1)
unzip (6.0-2 -> 6.0-3)
util-linux (2.35.2-1 -> 2.35.2-5)
which (2.21-2 -> 2.21-4)
windows-default-manifest (6.4-1 -> 6.4-2)
winpty (0.4.3-1 -> 0.4.3-3)
xmlto (0.0.28-2 -> 0.0.29-1)
xxhash (0.8.0-1 -> 0.8.3-1)
xz (5.2.5-1 -> 5.6.4-1)
zstd (1.5.0-1 -> 1.5.6-1)

Signed-off-by: Git for Windows Build Agent <[email protected]>

Essentially, it is the consequence of a big, huge sync of MSYS2's i686 repository of MSYS packages, and unsurprisingly, a couple of things fail now.

Let's only work around them in the quickest manner, as Git for Windows v2.48.1 is intended to be the last release with full i686 support. After this release, there will only be MinGit artifacts for that CPU architecture, and we can save ourselves the effort of fixing things up properly.

The `BITNESS` idea hails from the time when it was assumed that there
would only ever be a 32-bit and a 64-bit Windows, implying Intel/AMD
CPUs.

That has changed with the advent of ARM64, and we're slowly migrating
away from using `BITNESS`; This here commit is another step on that
journey.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho requested a review from mjcheetham February 10, 2025 12:12
@dscho dscho self-assigned this Feb 10, 2025
@dscho dscho marked this pull request as draft February 10, 2025 15:51
@dscho
Copy link
Member Author

dscho commented Feb 10, 2025

Converting to draft to figure out what causes this failure to happen and not to fail the build step:

D:\a\_temp\c08d3a80-12cb-4e20-885f-43ed181d029d.sh: line 13: sdk-artifact/cmd/git.exe: No such file or directory

Copy link
Member

@mjcheetham mjcheetham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just questions, and one nitpick ;-)
Otherwise looks OK, even if hacky. I wish i686 farewell.

@dscho dscho force-pushed the fix-missing-i686-dlls branch 4 times, most recently from 6126dbd to 13c1b21 Compare February 11, 2025 09:47
The `cmd/git.exe` file is not part of all of the flavors...

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho force-pushed the fix-missing-i686-dlls branch from 13c1b21 to d2a8df2 Compare February 11, 2025 11:21
As of yesterday's sync of the i686 packages in MSYS2,
`mingw-w64-p11-kit` is listed with a `>=0.23.1` requirement. This
confused the `make-file-list.sh` script when it specifically wanted to
exclude `mingw-w64-p11-kit`'s files from being bundled.

Unbeknownst to me, this `>=` mishandling hid _another_ bug:
`mingw-w64-p11-kit>=0.23.1` is listed in the `git-sdk-64` repository as
a dependency of `mingw-w64-gnutls`, and that allowed it to slip through
the cracks and actually get included in 64-bit versions of Git for
Windows!

This finally also explains, at long last, the conundrum that puzzled me
so much in b7729d4 (make-file-list: do include p11-kit's dependencies,
2022-07-08) where the libffi/libtasn1 dependencies were needed in
git-sdk-64 but not in git-sdk-32: In 32-bit Git for Windows,
`/mingw32/bin/p11-kit.exe` was excluded but in 64-bit Git for Windows
`/mingw64/bin/p11-kit.exe` was included!

Let's make things consistent again and just ship the MINGW variant of
p11-kit in regular Git for Windows (but still omit it in MinGit).

Signed-off-by: Johannes Schindelin <[email protected]>
As of 6f92a0e (make-file-list: work around 32-bit issues, 2020-10-15),
we worked around a discrepancy between i686 and x86_64 variants of the
`apr` and the `file` package, excluding dependencies specifically for
i686 variants.

However, yesterday's big sync removed those discrepancies.

Let's use a `grep` invocation that is as straight-forward as it is hacky
as an indicator whether or not to special-case these dependencies in the
i686 case.

All of this is really only needed for this one last time when Git for
Windows v2.48.1 will ship with an i686 installer and portable Git;
Future versions of Git for Windows will only ship MinGit for that CPU
architecture, which does not have that problem.

Note that we also have to adjust the `please.sh create-sdk-artifact
build-installers` command for that hack to work there.

Signed-off-by: Johannes Schindelin <[email protected]>
As of yesterday's big MSYS2 i686 sync, there is no longer an
`msys-unistring-2.dll` but an `msys-unistring-5.dll`.

However, gnupg (e.g. `dirmngr.exe`, via `msys-gnutls-30.dll`) depends on
the former file to be present.

Since the full i686 variant of Git for Windows is on its way out (we'll
be dropping the installer/portable Git builds for i686 after one last
full i686 release with Git for Windows v2.48.1, and MinGit does not
include gnupg), it isn't worth fretting too much about this; Simply
copying the latter to the former seems to work just fine.

Signed-off-by: Johannes Schindelin <[email protected]>
As of yesterday's big MSYS2 i686 sync, there is no longer an
`msys-unistring-2.dll` but an `msys-unistring-5.dll`.

However, gnupg (e.g. `dirmngr.exe`, via `msys-gnutls-30.dll`) depends on
the former file to be present.

Since the full i686 variant of Git for Windows is on its way out (we'll
be dropping the installer/portable Git builds for i686 after one last
full i686 release with Git for Windows v2.48.1, and MinGit does not
include gnupg), it isn't worth fretting too much about this; Simply
copying the latter to the former seems to work just fine.

Signed-off-by: Johannes Schindelin <[email protected]>
The way the `git-extra` package is designed, it updates the version as
well as the `git-extra.install` file as part of running `makepkg-mingw`.

These are the updates after the parent commit changed
`git-extra.install.in` to introduce a hack to allow gnupg/gnutls to find
`libunistring`'s DLL again.

Signed-off-by: Johannes Schindelin <[email protected]>
…-around

Before we can actually deploy the `git-extra` package with the
just-added work-around, the corresponding PR build in `build-extra`
needs to pass, which requires the same work-around when creating the SDK
artifacts.

Signed-off-by: Johannes Schindelin <[email protected]>
As of the upgrade from util-linux v2.35.2 to v2.40.2, there is now a
`lastlog2.exe` and an `msys-lastlog2-2.dll` which we do not want to
include in Git for Windows' installer.

Signed-off-by: Johannes Schindelin <[email protected]>
This also changes the `check-for-missing-dlls` script a bit so that its
output is not gargantuan.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho force-pushed the fix-missing-i686-dlls branch from d2a8df2 to 8dbf89f Compare February 11, 2025 12:43
@dscho dscho marked this pull request as ready for review February 11, 2025 12:50
@dscho
Copy link
Member Author

dscho commented Feb 11, 2025

Finally! What a roller-coaster of a PR...

@dscho
Copy link
Member Author

dscho commented Feb 11, 2025

/deploy mingw-w64-git-extra

The i686/x86_64 and the arm64 workflow runs were started.

@dscho
Copy link
Member Author

dscho commented Feb 11, 2025

/deploy git-extra

The i686/x86_64 and the arm64 workflow runs were started.

To make `-D__USE_MINGW_ANSI_STDIO=1` work (which is implicitly set via
`/etc/makepkg_mingw.conf`), with clangarm64 we need to link to
libmsvcrt-os. Otherwise the build would fail with:

  ld.lld: error: undefined symbol: __ms_printf
  [...]
  ld.lld: error: undefined symbol: __ms_sscanf

With toolchains other than `clangarm64`, linking to that static library
does not hurt, so let's do it unconditionally.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho
Copy link
Member Author

dscho commented Feb 12, 2025

/updpkgsums

The workflow run was started.

@dscho
Copy link
Member Author

dscho commented Feb 12, 2025

/deploy

@dscho
Copy link
Member Author

dscho commented Feb 12, 2025

/deploy git-extra

The i686/x86_64 and the arm64 workflow runs were started.

An update to the `pkgver` itself is not considered to be a vital change
to `git-extra`, therefore tip commits touching only that line are
excluded from the calculation of the package version.

However, running an `/updpkgsums` may very well update also a checksum
(which was exactly the case in
git-for-windows#591 (comment))
and such a change should _likewise_ avoid advancing the `pkgver`.

Signed-off-by: Johannes Schindelin <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho force-pushed the fix-missing-i686-dlls branch from a072b88 to 69e705a Compare February 12, 2025 09:50
@dscho
Copy link
Member Author

dscho commented Feb 12, 2025

/deploy git-extra

The i686/x86_64 and the arm64 workflow runs were started.

@dscho dscho merged commit 87da318 into git-for-windows:main Feb 12, 2025
14 checks passed
@dscho dscho deleted the fix-missing-i686-dlls branch February 12, 2025 10:13
@@ -21,7 +21,7 @@ $(BUILDDIR)/%.res: $(SRCDIR)/%.rc
$(WINDRES) --input $< --output $@ --output-format coff

$(BUILDDIR)/WhoUses.exe: $(BUILDDIR)/WhoUses.o $(BUILDDIR)/SystemInfo.o
$(CXX) $(CXXFLAGS) -o $@ $(LDFLAGS) $^
$(CXX) $(CXXFLAGS) -o $@ $(LDFLAGS) $^ -lmsvcrt-os
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem right.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeremyd2019 note that it was only necessary with clang's g++ shim, not with the gcc one.

dscho added a commit to git-for-windows/MSYS2-packages that referenced this pull request Feb 13, 2025
This work-around was needed until
git-for-windows/build-extra#591 introduced a
more general work-around via `git-extra`. So let's revert commit
4e41ba8 (CI-Build(i686): work around a libunistring version problem
of gnupg, 2025-02-12)

Signed-off-by: Johannes Schindelin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants