Skip to content
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

Tracking issue for Windows ARM64 support #3107

Open
dennisameling opened this issue Mar 12, 2021 · 190 comments
Open

Tracking issue for Windows ARM64 support #3107

dennisameling opened this issue Mar 12, 2021 · 190 comments

Comments

@dennisameling
Copy link

dennisameling commented Mar 12, 2021

There's been a discussion about Windows ARM64 support here: #3021

I made a discussion comment there to keep track of the outstanding tasks to get basic ARM64 support to Git for Windows. However, @Alovchin91 informed me via Twitter that it was hard to keep track of the progress that way, requesting a dedicated issue. So here it is 😊

Open tasks for basic ARM64 support:

Thanks to the changes that we did in the last few days, there's now a fully working build of Git for Windows ARM64.

Test build for ARM64 users, built on March 12, 2021: https://github.com/dennisameling/git/releases/tag/v2.31.0-rc2.windows.2

I think we're pretty much ready to publish a beta version of Git for Windows ARM64! @dscho what do you think? Please let me know if I missed something in the list above.

@dscho
Copy link
Member

dscho commented Mar 12, 2021

I'm a bit focused on making sure that the v2.31.0 release goes smoothly, and will be happy to pay more attention to the ARM64 side of things after that release is out (which will probably happen Tuesday or Wednesday this coming week).

@Alovchin91
Copy link

Hi @dennisameling ,

Thanks for your wonderful work! ❤️ Have been using MinGit lately (which is a 💎 by itself) and it works great on my SPX!

One thing I just found:

C:\Projects\rustup>git log --help
fatal: 'C:/MinGit/arm64/share/doc/git-doc': not a documentation directory.

While MinGit doesn't seem to contain git-doc anyway, what caught my attention is that git.exe tries to search for documentation in the arm64 directory, while docs seem to still be in mingw32.

Could you please check on your side, on a complete Git setup? Thanks a lot! 😃

@dscho
Copy link
Member

dscho commented Mar 14, 2021

The documentation is not built as part of the CMake-based build. It will take quite some work to implement that. @Alovchin91 that's your chance to get involved! 😉

@Alovchin91
Copy link

@dscho I would be happy to help, but right now my capacity is extremely limited unfortunately and I have never had any proper experience with Cmake.

But wouldn't it be enough to point Git.exe from arm64 folder to the documentation in mingw32? 🤔

@dscho
Copy link
Member

dscho commented Mar 14, 2021

But wouldn't it be enough to point Git.exe from arm64 folder to the documentation in mingw32? 🤔

Not really, because the build configuration may differ in more than just the CPU architecture, even in ways affecting how/what parts of the documentation are compiled.

@Alovchin91
Copy link

Alovchin91 commented Mar 14, 2021

Hmm, I think right now my concern is mostly about where does arm64 version look for docs in a full installer-based version of Git 🤔

I saw that it's also absent from the "normal" mingw32 MinGit build, so I suppose missing docs in those builds is not arm64 specific issue.

@dscho
Copy link
Member

dscho commented Mar 14, 2021

Right, documentation is excluded from MinGit builds.

But looking for the documentation in the wrong location, just because there is no documentation in the correct location, isn't a solution for the non-MinGit flavors of Git for Windows, either ;-)

@Alovchin91
Copy link

Ah, right, now I get your point 😁 For some reason I thought that the most part of the tools are redirected to mingw32 folder and arm64 only contains wrappers or helpers 😅

@dscho
Copy link
Member

dscho commented Mar 14, 2021

Thanks to @dennisameling tireless work, the Git executables are built for Windows/ARM64. The i686 version of the MINGW tools we're still relying on are things like curl.exe, but we do include all of the i686 Git executables at the moment, too.

@dennisameling
Copy link
Author

Can confirm the help docs are only present in mingw32\share\doc\git-doc on a full installation and not in arm64\share\doc\git-doc.

The help function looks at GIT_HTML_PATH to find the help docs:

git/builtin/help.c

Lines 464 to 482 in 959b2f0

static void get_html_page_path(struct strbuf *page_path, const char *page)
{
struct stat st;
char *to_free = NULL;
if (!html_path)
html_path = to_free = system_path(GIT_HTML_PATH);
/* Check that we have a git documentation directory. */
if (!strstr(html_path, "://")) {
if (stat(mkpath("%s/git.html", html_path), &st)
|| !S_ISREG(st.st_mode))
die("'%s': not a documentation directory.", html_path);
}
strbuf_init(page_path, 0);
strbuf_addf(page_path, "%s/%s.html", html_path, page);
free(to_free);
}

This is defined in the CMake file:

add_compile_definitions(PAGER_ENV="LESS=FRX LV=-c"
GIT_EXEC_PATH="libexec/git-core"
GIT_LOCALE_PATH="share/locale"
GIT_MAN_PATH="share/man"
GIT_INFO_PATH="share/info"
GIT_HTML_PATH="share/doc/git-doc"
DEFAULT_HELP_FORMAT="html"
DEFAULT_GIT_TEMPLATE_DIR="share/git-core/templates"
GIT_VERSION="${PROJECT_VERSION}.GIT"
GIT_USER_AGENT="git/${PROJECT_VERSION}.GIT"
BINDIR="bin"
GIT_BUILT_FROM_COMMIT="")

@dscho would you be okay with a clause in the CMake file for Win ARM64 that sets GIT_HTML_PATH to ../mingw32/share/doc/git-doc for the time being? We can leverage the already available CMAKE_GENERATOR_PLATFORM for that logic.

@dscho
Copy link
Member

dscho commented Mar 19, 2021

would you be okay with a clause in the CMake file for Win ARM64 that sets GIT_HTML_PATH to ../mingw32/share/doc/git-doc for the time being?

I wonder how much work it would be to optionally use asciidoctor or asciidoc, if configured. These lines describe how asciidoc is called: https://github.com/git/git/blob/v2.31.0/Documentation/Makefile#L125-L133 And these describe how asciidoctor would be called instead: https://github.com/git/git/blob/v2.31.0/Documentation/Makefile#L179-L190

@dennisameling
Copy link
Author

I wonder how much work it would be to optionally use asciidoctor or asciidoc, if configured.

Will have a look in the coming days.

Just created a PR for 64-bit ARM64 installer support: git-for-windows/build-extra#333

@dennisameling
Copy link
Author

@dscho now that the 64-bit ARM64 installer PR has been merged, do you think we're ready to release a beta build of Git for Windows ARM64? I'm happy to look into the docs thing with asciidoctor and asciidoc mentioned above, but will only have time for that after May 7 due to work responsibilities and a break 😊 Thanks in advance!

@rimrul
Copy link
Member

rimrul commented Apr 22, 2021

Check if the daily "Git for Windows update check" works correctly on ARM64

It'll probably run daily and check for updates, but when it detects an update, it'll try to download and install the x86 installer.

@dscho
Copy link
Member

dscho commented Apr 23, 2021

do you think we're ready to release a beta build of Git for Windows ARM64?

Yes, I think we're getting to the point where we want to invite testers (I, unfortunately, am not eligible because I lack the hardware).

I'm happy to look into the docs thing with asciidoctor and asciidoc mentioned above

Fantastic.

I do think that it should be possible to add that to the CMakeLists.txt definition (a quick search brought up gdamore/nanomsg@5592124 which might be a good example to follow, although I would try not to have a separate Boolean to enable documentation; Rather, I would make it conditional on a check that tries to find asciidoc or asciidoctor, allowing the user to specify a hard-coded path to either to side-step the discovery).

It'll probably run daily and check for updates, but when it detects an update, it'll try to download and install the x86 installer.

Indeed.

For microsoft/git, I already did something slightly ugly to redirect the git update-git-for-windows command: microsoft#321 (comment). Essentially, it is a hack that edits the git-update-git-for-windows script to target a different update site, via a few sed commands.

I could imagine that we would probably want to improve on that e.g. by enhancing git-update-git-for-windows itself. One option would be to search for a file, say, git-update-git-for-windows.ini next to the script (when called via the PATH, as git update-git-for-windows will do internally, "$0" contains the absolute path to the script, therefore "$0.ini"would refer to that.inifile's path). If found, it would override a couple of things. Something along these lines (applies tobuild-extra`, but reader beware: this is totally untested):

diff --git a/git-extra/git-update-git-for-windows b/git-extra/git-update-git-for-windows
index 7121dd7be..50ff5524a 100755
--- a/git-extra/git-update-git-for-windows
+++ b/git-extra/git-update-git-for-windows
@@ -174,7 +174,22 @@ update_git_for_windows () {
 		;;
 	esac
 
-	latest_tag_url=https://gitforwindows.org/latest-tag.txt
+	if test -f "$0.ini"
+	then
+		fork="$(git config -f "$0.ini" update.fromFork)"
+		test -n "$releases_url" || {
+			echo "Could not find update.fromFork in $0.ini" >&2
+			return 1
+		}
+		releases_url=https://api.github.com/repos/$fork/releases
+		latest_tag_url=$releases_url/latest
+		latest_eval='latest=${latest_tag#*\"tag_name\": \"}; latest=${latest%%\"*}'
+	else
+		releases_url=https://api.github.com/repos/git-for-windows/git/releases
+		latest_tag_url=https://gitforwindows.org/latest-tag.txt
+		latest_eval='latest=${latest_tag#v}'
+	fi
+
 	latest_tag=$(http_get $latest_tag_url) ||
 	case $?,"$proxy" in
 	7,)
@@ -190,7 +205,7 @@ update_git_for_windows () {
 		;;
 	esac
 
-	latest=${latest_tag#v}
+	eval "$latest_eval"
 	# Did we ask about this version already?
 	recently_seen="$(get_recently_seen)"
 	test -n "$quiet" && test "x$recently_seen" = "x$latest" && return
@@ -215,7 +230,6 @@ update_git_for_windows () {
 	esac
 
 	echo "Update $latest is available" >&2
-	releases_url=https://api.github.com/repos/git-for-windows/git/releases
 	releases=$(http_get $releases_url/latest) || return
 	download=$(echo "$releases" |
 		grep '"browser_download_url": "' |

@dscho
Copy link
Member

dscho commented Apr 23, 2021

❓ Check if the daily "Git for Windows update check" works correctly on ARM64

Right, completely forgot to address that part. We do trust uname -m in the git-update-git-for-windows script, but on ARM, we cannot (because our MSYS2 will be an i686 or an x86_64 one).

@rimrul
Copy link
Member

rimrul commented Apr 23, 2021

I could imagine that we would probably want to improve on that e.g. by enhancing git-update-git-for-windows itself. One option would be to search for a file, say, git-update-git-for-windows.ini next to the script (when called via the PATH, as git update-git-for-windows will do internally, "$0" contains the absolute path to the script, therefore "$0.ini"would refer to that.ini` file's path). If found, it would override a couple of things.

I was thinking a lot simpler: We could check $MSYSTEM or $MINGW_MOUNT_POINT to detect we're on an ARM install. Admittedly, I did not think about microsoft/git when I had that idea.

@dscho
Copy link
Member

dscho commented Apr 26, 2021

I don't really trust MSYSTEM and MINGW_MOUNT_POINT at this stage ;-) If git.exe sets MSYSTEM, for example, it will not have the expected value.

@dscho
Copy link
Member

dscho commented Apr 28, 2021

I opened git-for-windows/build-extra#338 to help with this.

@dennisameling
Copy link
Author

Incredibly excited that git-for-windows/build-extra#340 has been merged. I almost don't dare to ask, but do you think we're now ready to release a beta version of Git for Windows ARM64, @dscho (apart from the request for the docs, which I hope to look into in the coming two weeks)? 🤞🏼

Yes, I think we're getting to the point where we want to invite testers (I, unfortunately, am not eligible because I lack the hardware).

I ordered and received a Raspberry Pi 4 last week, then installed Windows on ARM 19043 (21H1) on it. The performance is surprisingly good, but every once in a while there's a little driver-related hiccup that the Windows on Raspberry team is working hard on. If you want, I can send you the TeamViewer ID + password so you can test a bit on your end as well 👍🏼

@Alovchin91
Copy link

I have the Surface Pro X so I can also help with testing 🙂 RDP is also an option.

@dscho
Copy link
Member

dscho commented May 18, 2021

Right now, I would like to focus on Git for Windows v2.32.0, for which -rc0 came out yesterday, and the final version is expected around June 7th/8th.

After that, I'm all game for ARM64 and will take y'all up on the kind offers to let me connect to your hardware.

@Alovchin91
Copy link

Well... I wonder if BUILD next week brings anything interesting to arm64 world anyway 🤷 Maybe an arm64 GitHub Actions pipeline? One could dream...

@rimrul
Copy link
Member

rimrul commented May 19, 2021

@dennisameling Could you add the issue with git --version --build-options that I pointed out in #3083 to the list?

While it isn't a show stopper for the ARM beta it would be nice to have that fixed before we get more ARM bug reports.

@Alovchin91
Copy link

Okay, I hope it's finally time to prepare the first ARM64 beta! 🤗 Please let me know if I can help with anything. I could provide an ARM64 virtual machine on my Surface Pro X for a build pipeline, for example 🙂

@dennisameling
Copy link
Author

dennisameling commented Jul 10, 2021

Just updated the list above with open issues. I recently came across the fact that Visual C++ is needed since we use MSVC for the ARM64 builds. We can either include the Visual C++ Redistributable package in the installer, or statically build using MSVC (if possible). Do you have any preference here @dscho? I guess the latter option would be best as software like GitHub Desktop is depending on MinGit, so a static build would make their lives easier as well.

@rimrul
Copy link
Member

rimrul commented Jul 10, 2021

I don't think UCRT can be statically linked and redistributing vcredist would probably be a GPL violation, so linking the vcredist download page is probably our only option.

@dscho
Copy link
Member

dscho commented Aug 23, 2023

We could try adding a bit more logging to signtool.sh, specifically in between the osslsigncode.exe and mv calls. That way, we'd be able to see if the osslsigncode.exe process finished correctly and if it might actually be hanging on the mv call (or somewhere else) instead. WDYT?

I am almost 100% certain that osslsigncode.exe has terminated, but the MSYS2 runtime is still waiting for it.

The approach I would want to try is to build a heavily-instrumented version of the MSYS2 runtime, littering debug print statements all over the place, in particular around creating and joining threads and starting child process and waiting for them. Then I would want to create a GitHub workflow that downloads a minimal Git for Windows SDK, just enough to code-sign something using osslsigncode.exe (probably using https://github.com/git-for-windows/git-for-windows-automation/blob/62028952256d6048991b58dcacee1f8d6461047c/.github/workflows/open-pr.yml#L77-L139 as template, which does something similar except that it adds pacman.exe instead of osslsigncode.exe to .sparse/minimal-sdk), replaces msys-2.0.dll with the patched version (e.g. by reusing a different workflow run's artifacts as I did here) and then code-signs some random .exe file, and for good measure I would want to do this in a matrix of, say, 6, just to make sure that we're not getting that one lucky punch where the hang does not occur.

Then I would experiment with the -verbose flag because if it turns out that this is indeed helping reduce the hangs, we have a good indicator in which direction we need to look for a consistent reproducer.

Should that not bear any fruit, I would pivot and try to reproduce the same hang in an interactive VM and then take it from there.

@anthony-linaro
Copy link

Hi All,

Was there ever any more progress with this, since discussion died off in August? I saw a few new builds on Dennis's fork, but is there ant progress to official builds? What is blocking the possibility to make releases?

I did try and give building it myself a go, but I feel I must be missing some sort of steps somewhere, as I get all sorts of issues about missing wcsstr, -municode not being recognised and so on.

MSYS2 hanging when exiting processes is sadly something we've run into across a few other projects also (blender, and some of our own internal CI builds), and haven't been able to track down. We typically end up going for the "time out and retry" approach.

@rimrul
Copy link
Member

rimrul commented Feb 13, 2024

Was there ever any more progress with this, since discussion died off in August?

What is blocking the possibility to make releases?

Mainly the hanging CI builds. Especially our ARM64 builds consistently hanging since git-for-windows/git-for-windows-automation#61

We typically end up going for the "time out and retry" approach.

We have some ARM64 jobs that legitimately take 4.5 hours. That would put our timeout up to at least 5 hours. Letting jobs hang that long and automatically retrying them could quickly burn through our funds.

@dscho
Copy link
Member

dscho commented Feb 23, 2024

@dennisameling thank you for triggering https://github.com/git-for-windows/git-for-windows-automation/actions/runs/8025034802! I saw that some jobs stayed queued for quite a while because no runners were spun up. When I looked more closely, it seems that quite a few webhook deliveries encountered 404s and 504s, and it looks as if those problems are responsible. I kicked three workflow runs off manually, to create those runners. At least it looks as if all the runners were all torn down automatically and without problems.

@dennisameling
Copy link
Author

dennisameling commented Feb 24, 2024

Hi everyone, here's the arm64 build of 2.44.0, built by the pipeline that @dscho mentioned above: https://github.com/dennisameling/git/releases/tag/v2.44.0.windows.1 🎉

I saw that some jobs stayed queued for quite a while because no runners were spun up. When I looked more closely, it seems that quite a few webhook deliveries encountered 404s and 504s, and it looks as if those problems are responsible.

That's interesting. I wonder if it was somehow related to the fact that there were dozens of jobs already running on the git-for-windows/git at that time. There's a limit to the number of parallel jobs that can run simultaneously in a GitHub account. But then it's surprising that the webhook returned 404s and 504s - I'd expect something like 429 instead.

Today, I triggered the same workflow 3 more times to test the stability. All runners were created correctly, with the exception of some occasional rate limits on Azure. A simple retry after other runners had completed their work, was enough.

Out of the total 4 times that I started the workflow, 1 ran into the issue with the signtool hang again, so I canceled it.

We typically end up going for the "time out and retry" approach.

I agree that a simple "time out and retry" approach might be a viable path forward for now, since all hangs have been in the signtool process only. I think @rimrul, in their comment above, assumed that this approach would apply to the CI config as a whole, but I think we can limit its scope to this shell script. We could add some logic to the script that waits for the signtool executable to return within a minute or two, and if it doesn't, kill it and try up to 3 (?) more times. WDYT?

@dscho
Copy link
Member

dscho commented Feb 24, 2024

That strategy sounds good to me.

FWIW I see a consistent hang on Windows/ARM64 also in pacman in update-via-pacman.ps1 in CI. Unfortunately, due to a reorg at my dayjob, I have substantially reduced capacity to investigate, even as much as I want it.

@dscho
Copy link
Member

dscho commented Feb 24, 2024

The hang is documented here: git-for-windows/git-for-windows-automation#61

@Alovchin91
Copy link

Alovchin91 commented Feb 24, 2024

Pacman keeps hanging for me on emulated x64 as well. The latest version that works without hangs is 6.0.2-11.

I’d suggest to downgrade it and ignore its updates for now until you have time and will to investigate.

@dscho
Copy link
Member

dscho commented Feb 24, 2024

Pacman keeps hanging for me on emulated x64 as well. The latest version that works without hangs is 6.0.2-11.

Good piece of information! Do you know what changed in the next version?

I’d suggest to downgrade it and ignore its updates for now until you have time and will to investigate.

It is a symptom that may very well affect other scenarios, too. Including scenarios more relevant to Git users than Pacman. Downgrading would therefore not really help but paper over a potentially much bigger problem. That's why I don't want to do that.

@chadlwilson
Copy link

chadlwilson commented Feb 24, 2024

Pacman keeps hanging for me on emulated x64 as well. The latest version that works without hangs is 6.0.2-11.

Good piece of information! Do you know what changed in the next version?

Based on https://github.com/msys2/MSYS2-packages/commits/master/pacman looks like msys2/MSYS2-packages@8c1bba7 ? Something to do with allowing weak key sigs in later gnupg releases from msys2/msys2-pacman#33

@dscho
Copy link
Member

dscho commented Feb 25, 2024

Pacman keeps hanging for me on emulated x64 as well. The latest version that works without hangs is 6.0.2-11.

Good piece of information! Do you know what changed in the next version?

Based on https://github.com/msys2/MSYS2-packages/commits/master/pacman looks like msys2/MSYS2-packages@8c1bba7 ? Something to do with allowing weak key sigs in later gnupg releases from msys2/msys2-pacman#33

Thank you @chadlwilson! The change does not strike me as making anything worse, though, so I figure it may be a related change (maybe a gpg update?) that made this fail more often.

@chadlwilson
Copy link

Yeah, might be interesting to pin gnupg at 2.2.41 and see if anything changes, perhaps.

@Alovchin91
Copy link

Alovchin91 commented Feb 25, 2024

I believe I’ve tried downgrading gnupg and it didn’t help. Downgrading pacman alone did help though.

@Alovchin91
Copy link

Alovchin91 commented May 1, 2024

I have used arm64 pacman packages from @dennisameling's run from yesterday, and when installing them I've noticed some discrepancy between x64 and arm64 packages, more specifically:

  • mingw-w64-x86_64-curl-*-8.7.1-1 vs mingw-w64-clang-aarch64-curl-*-8.6.0-1
  • mingw-w64-x86_64-openssl-3.2.1-1 vs mingw-w64-clang-aarch64-openssl-3.1.4-1

The most interesting part probably being openssl. I've noticed that other @dennisameling's runs have been hanging on pacman. Usually when it happens on my machine (if I update pacman past 6.0.2-11), I can kill one of the two pacman processes and the other process then goes on, but complains about signatures and OpenSSL.

Now, obviously pacman wouldn't use the mingw package, but is there a good reason why these packages are not being upgraded?

@rimrul
Copy link
Member

rimrul commented May 1, 2024

Now, obviously pacman wouldn't use the mingw package, but is there a good reason why these packages are not being upgraded?

Yes. The consistent hangs during the build and deploy jobs (as mentioned in #3107 (comment)) are preventing building and deployment of updated versions of these packages which means pacman can't download these updated versions.

@Alovchin91
Copy link

Okay, but are there any updates? Has anybody tried downgrading pacman? This issue has been silent for months, I'm not even sure where to follow the progress anymore.

@dscho
Copy link
Member

dscho commented May 4, 2024

The latest version that works without hangs is 6.0.2-11.

I just tried downgrading pacman to that version and the hangs still occur for me.

@dscho
Copy link
Member

dscho commented May 4, 2024

I am hopeful that msys2/MSYS2-packages#4583 will allow us to avoid those hangs for the time being.

@dscho
Copy link
Member

dscho commented May 9, 2024

Relevant news: GCC v15.1 is slated to support targeting aarch64-w64-mingw32.

@dscho
Copy link
Member

dscho commented May 24, 2024

Well, with the work-around from msys2/MSYS2-packages#4583 applied optimistically in git-for-windows/git-sdk-arm64#17, we now finally have a working, native Windows/ARM64 sync job keeping git-sdk-arm64 up to date:

Image

We also are finally in a state where MINGW-packages can be built for Windows/ARM64 without human intervention. I guess now comes the long game of playing catch-up:

Script to generate
# Extract the package metadata for a specific key (provided as first parameter)
# If no second parameter was provided, extract it from all packages, prefixing the value with `<package>:`
# If a second parameter was provided, use it as a prefix regex to match
# (this can have a `-[0-9]` suffix to match precise package names)
extract_desc () {
  case "$2" in
  *x86_64*)
    remote=github;;
  *)
    remote=git-sdk-arm64;;
  esac
  # Skip `pacman` because it's so slow; Look at `/var/lib/pacman/local/*/desc` directly
  # The `desc` files are contained in directories whose names have the format `<package-name>-<version>`
  # The `desc` file has `%<key>%` lines which are followed by lines containing the values
  git grep -A1 '^%'"$1"'%$' $remote/main:var/lib/pacman/local/ |
  sed -n '/:%'"$1"'%$/{N;s|.*local/:\([^/]*\)/desc-|\1:|p}' |
  if test -z "$2"
  then
    cat
  else
    sed -n "s|^$2[^:]*:||p"
  fi
}

# Get all `mingw-w64-*` packages in `git-sdk-arm64` that have not been built by MSYS2 (but most likely by Git for Windows)
extract_desc PACKAGER |
grep '^mingw-w64-' |
grep -v ':CI .*autobuild' |
while read line
do
  dir=${line%%:*}
  x64_dir=mingw-w64-x86_64-${dir#mingw-w64-clang-aarch64-}
  # Does `git-sdk-64` have the same version? If so, move along, nothing to be seen here
  git rev-parse --verify github/main:var/lib/pacman/local/$x64_dir >/dev/null 2>&1 && continue

  ver_arm64=$(extract_desc VERSION "$dir")
  package_name=$(extract_desc NAME "$dir")
  ver_x64=$(extract_desc VERSION mingw-w64-x86_64-${package_name#mingw-w64-clang-aarch64-}-[0-9])
  echo "mingw-w64-${package_name#mingw-w64-clang-aarch64-} | ${ver_x64:-N/A} | $ver_arm64"
done
package x86_64 clang-aarch64
mingw-w64-clang N/A 17.0.6-3
mingw-w64-clang-analyzer N/A 17.0.6-3
mingw-w64-clang-libs N/A 17.0.6-3
mingw-w64-clang-tools-extra N/A 17.0.6-3
mingw-w64-compiler-rt N/A 17.0.6-3
mingw-w64-gcc-compat N/A 17.0.6-3
mingw-w64-git 2.45.1.1.965b16798d-1 2.39.1.1.b03dafd9c2-1
mingw-w64-git-doc-html 2.45.1.1.965b16798d-1 2.39.1.1.b03dafd9c2-1
mingw-w64-lld N/A 17.0.6-3
mingw-w64-llvm N/A 17.0.6-3
mingw-w64-llvm-libs N/A 17.0.6-3
mingw-w64-openssl 3.2.1-1 3.1.4-1

Note: I think this might be missing some packages (IIRC mingw-w64-gnutls wasn't built, but it's not in git-sdk-arm64), but that's the gist of it.

@Alovchin91
Copy link

@dscho This is fantastic news! 🎉 Does that mean arm64 packages can now be published to the Git for Windows aarch64 Pacman repo?

@rimrul
Copy link
Member

rimrul commented May 24, 2024

mingw-w64-openssl 3.2.1-1 3.1.4-1

I've started the deployment workflow

And I messed up something in copy&paste

second attempt

@rimrul
Copy link
Member

rimrul commented May 24, 2024

IIRC mingw-w64-gnutls wasn't built

git-for-windows/MINGW-packages#114 (comment)

I think it was built and deployed.

@rimrul
Copy link
Member

rimrul commented May 24, 2024

For the various clang/llvm packages I won't get around to updating git-for-windows/MINGW-packages#115 today, but I'll try to get it done tomorrow.

@dscho
Copy link
Member

dscho commented May 24, 2024

Does that mean arm64 packages can now be published to the Git for Windows aarch64 Pacman repo?

@Alovchin91 they already are, git-sdk-arm64 uses that Pacman repository.

For the various clang/llvm packages I won't get around to updating git-for-windows/MINGW-packages#115 today, but I'll try to get it done tomorrow.

Thank you @rimrul!

IIRC mingw-w64-gnutls wasn't built

git-for-windows/MINGW-packages#114 (comment)

I think it was built and deployed.

Hah, it would look as there were substantial gaps in my feeble attempt to see what packages versions still need to be built for clang-aarch64... Let me try that again:

versions_arm64="$(git show git-sdk-arm64/main:var/lib/pacman/sync/git-for-windows-aarch64.db |
  tar OxJvf - 2>/dev/null |
  sed -n '/^%NAME%$/{n;x};/^%VERSION%$/{n;G;s/\(.*\)\n\(.*\)/\2:\1/;p}')"
versions_x64="$(git show github/main:var/lib/pacman/sync/git-for-windows.db |
  tar OxJvf - 2>/dev/null |
  sed -n '/^%NAME%$/{n;x};/^%VERSION%$/{n;G;s/\(.*\)\n\(.*\)/\2:\1/;p}')"
for pair in $(echo "$versions_arm64" | grep '^mingw-w64-')
do
  pkg_arm64=${pair%%:*}
  ver_arm64=${pair#*:}
  pkg_x64=mingw-w64-x86_64-${pkg_arm64#mingw-w64-clang-aarch64-}
  ver_x64="$(echo "$versions_x64" | sed -n "s|^$pkg_x64:||p")"

  test "$ver_x64" = "$ver_arm64" ||
  echo "mingw-w64-${pkg_x64#mingw-w64-x86_64-}|${ver_x64:-N/A}|$ver_arm64"
done
package x86_64 clang-aarch64
mingw-w64-clang N/A 17.0.6-3
mingw-w64-clang-analyzer N/A 17.0.6-3
mingw-w64-clang-libs N/A 17.0.6-3
mingw-w64-clang-tools-extra N/A 17.0.6-3
mingw-w64-compiler-rt N/A 17.0.6-3
mingw-w64-gcc-compat N/A 17.0.6-3
mingw-w64-lld N/A 17.0.6-3
mingw-w64-llvm N/A 17.0.6-3
mingw-w64-llvm-libs N/A 17.0.6-3
mingw-w64-openssl 3.2.1-1 3.1.4-1
mingw-w64-openssl-pdb 3.2.1-1 3.1.4-1

The outcome is the same, thankfully: we only need to rebuild mingw-w64-openssl.

@Alovchin91
Copy link

@Alovchin91 they already are, git-sdk-arm64 uses that Pacman repository.

It doesn't look like Git and Git-Docs packages are included though:

$ pacman -Sl git-for-windows-aarch64
git-for-windows-aarch64 git-extra 1.1.636.2db97b993-1
git-for-windows-aarch64 mingw-w64-clang-aarch64-clang 17.0.6-3
git-for-windows-aarch64 mingw-w64-clang-aarch64-clang-analyzer 17.0.6-3
git-for-windows-aarch64 mingw-w64-clang-aarch64-clang-libs 17.0.6-3
git-for-windows-aarch64 mingw-w64-clang-aarch64-clang-tools-extra 17.0.6-3
git-for-windows-aarch64 mingw-w64-clang-aarch64-compiler-rt 17.0.6-3
git-for-windows-aarch64 mingw-w64-clang-aarch64-curl 8.8.0-1
git-for-windows-aarch64 mingw-w64-clang-aarch64-curl-gnutls 8.8.0-1
git-for-windows-aarch64 mingw-w64-clang-aarch64-curl-gnutls-alternate 8.8.0-1
git-for-windows-aarch64 mingw-w64-clang-aarch64-curl-gnutls-pdb 8.8.0-1
git-for-windows-aarch64 mingw-w64-clang-aarch64-curl-openssl-alternate 8.8.0-1 [installed]
git-for-windows-aarch64 mingw-w64-clang-aarch64-curl-pdb 8.8.0-1
git-for-windows-aarch64 mingw-w64-clang-aarch64-curl-winssl 8.8.0-1 [installed]
git-for-windows-aarch64 mingw-w64-clang-aarch64-curl-winssl-alternate 8.8.0-1
git-for-windows-aarch64 mingw-w64-clang-aarch64-curl-winssl-pdb 8.8.0-1
git-for-windows-aarch64 mingw-w64-clang-aarch64-gcc-compat 17.0.6-3
git-for-windows-aarch64 mingw-w64-clang-aarch64-git-credential-manager 2.5.0-1
git-for-windows-aarch64 mingw-w64-clang-aarch64-git-extra 1.1.636.2db97b993-1 [installed]
git-for-windows-aarch64 mingw-w64-clang-aarch64-git-lfs 3.5.1-1
git-for-windows-aarch64 mingw-w64-clang-aarch64-gnutls 3.8.4-1
git-for-windows-aarch64 mingw-w64-clang-aarch64-lld 17.0.6-3
git-for-windows-aarch64 mingw-w64-clang-aarch64-llvm 17.0.6-3
git-for-windows-aarch64 mingw-w64-clang-aarch64-llvm-libs 17.0.6-3
git-for-windows-aarch64 mingw-w64-clang-aarch64-openssl 3.1.4-1 [installed]
git-for-windows-aarch64 mingw-w64-clang-aarch64-openssl-pdb 3.1.4-1
git-for-windows-aarch64 mingw-w64-clang-aarch64-pcre2 10.43-1 [installed]
git-for-windows-aarch64 mingw-w64-clang-aarch64-wintoast 1.0.0.275.a44fa02-1
git-for-windows-aarch64 mingw-w64-clang-aarch64-xpdf-tools 4.00-1

That's why I've been asking Dennis about the packages.tar.gz artefact in another thread -- the only way to install Git-arm64 as a package right now is to download the artefact and pacman -U it.

@dscho
Copy link
Member

dscho commented May 24, 2024

It doesn't look like Git and Git-Docs packages are included though:

@Alovchin91 that's correct. For the time being, there is not (yet) any official Git for Windows/ARM64.

mingw-w64-openssl 3.2.1-1 3.1.4-1

I've started the deployment workflow

And I messed up something in copy&paste

second attempt

FWIW this second attempt might look like it's stuck when trying to follow live, but I just RDPed into the runner to see whether it is running things and it does.

I also see that OpenSSL's tests are not run in parallel; Not sure why, but it certainly does not utilize the VM very well.

@dscho
Copy link
Member

dscho commented May 24, 2024

mingw-w64-openssl 3.2.1-1 3.1.4-1

I've started the deployment workflow
And I messed up something in copy&paste
second attempt

FWIW this second attempt might look like it's stuck when trying to follow live, but I just RDPed into the runner to see whether it is running things and it does.

@rimrul it worked!

@bitcrazed
Copy link

Just a quick note from me: While I no longer work at Microsoft, @marcpems and @jamshedd continue to drive things and am sure will be just as excited that I am that Git for Windows on Arm is edging ever closer to being completed and officially released.

GREAT work @dscho, @Alovchin91, @rimrul, @chadlwilson, and @dennisameling (& anyone else I've missed) - you're all rockstars, thank you!!!

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

No branches or pull requests