Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Changes to recipe: xz_utils/5.8.1
Motivation
This is a fix for cross building from Windows to Android. At the moment, I encountered two issues. One issue was that
msys2was not used when building for Android with Autotools withxz_utilsversion 5.8.1. But even after fixing that, the Autotools failed while building. I fixed it by using CMake when building for Android on Windows since I don't have much experience with Autotools.This PR fixes cross-compilation from Windows to Android. I encountered two issues during the process. The first was that MSYS2 wasn’t being used when building for Android with Autotools (xz_utils 5.8.1). After resolving that, the Autotools build still failed. Since I don’t have much experience with Autotools, I switched to using CMake for the Windows-to-Android build, which resolved the remaining issues.
Details
Initially, I had to update the following condition:
to:
Without this change, the build wouldn’t use
msys2at all and failed with the following error:configure_error.txt
However, even after resolving that, the Autotools build still failed because it attempted to include
windows.hwhile targeting Android. Relevant logs:autotools_android_error.txt
Switching to CMake for Windows-to-Android builds resolves the issue, and the build completes successfully:
cmake_android_build.txt
Add a 👍 reaction to pull requests you find important to help the team prioritize, thanks!