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

Cross compiling windows resources to Windows Arm64 is broken #25870

Closed
ThadHouse opened this issue Jul 22, 2023 · 3 comments · Fixed by #25871
Closed

Cross compiling windows resources to Windows Arm64 is broken #25870

ThadHouse opened this issue Jul 22, 2023 · 3 comments · Fixed by #25871
Labels
a:bug has:reproducer Indicates the issue has a confirmed reproducer in:native-platform c, cpp, swift and other native languages support, etc re:windows Issue related to using Gradle on Windows
Milestone

Comments

@ThadHouse
Copy link
Contributor

Expected Behavior

Compiling a window resource for a binary targeting arm64 on an intel host should work.

Current Behavior

The resource compiler ran is the one for the target, which fails to run. --info shows the resource compiler for arm64 is used.

Context (optional)

Add arm64 builds to our project.

Steps to Reproduce

GradleResourceIssue.zip

Attached project is just missing the wrapper for Gradle 8.2, but has everything else required. Make sure the arm64 windows compiler is installed, then run the build task.

Gradle version

8.2

Build scan URL (optional)

No response

Your Environment (optional)

Windows 11 x64 host machine.

@ov7a
Copy link
Member

ov7a commented Jul 26, 2023

Thank you for providing a valid reproducer.

The issue is in the backlog of the relevant team, but the existence of a workaround makes it non-critical.


Thank you for your PR fixing this issue! I'll review it a bit later, but please ensure that tests are passing.

@ov7a ov7a added in:native-platform c, cpp, swift and other native languages support, etc re:windows Issue related to using Gradle on Windows and removed to-triage labels Jul 26, 2023
@ThadHouse
Copy link
Contributor Author

but the existence of a workaround makes it non-critical.

Theres no workaround, other then to not build arm64 binaries. Which isn't really a workaround, more just that the new feature is broken.

@eskatos eskatos added the has:reproducer Indicates the issue has a confirmed reproducer label Jul 26, 2023
@eskatos
Copy link
Member

eskatos commented Jul 26, 2023

Sorry for the confusion, we picked the wrong canned answer. There is indeed no workaround.

bot-gradle added a commit that referenced this issue Jul 27, 2023
…compiler

Currently, the target platform is always used for the sdk resource compiler. However, when cross compiling, this does not work, and causes resource compilation for fail. Solve for this by detecting the host platform and using that for the binary directory for the resource compiler.

<!--- The issue this PR addresses -->
Fixes #25870

### Context
Windows Arm64 support was added as both a host and cross compiled option, however cross compiled mode does not work currently. This diff fixes that.

### Contributor Checklist
- [x] [Review Contribution Guidelines](https://github.com/gradle/gradle/blob/master/CONTRIBUTING.md)
- [x] Make sure that all commits are [signed off](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff) to indicate that you agree to the terms of [Developer Certificate of Origin](https://developercertificate.org/).
- [x] Make sure all contributed code can be distributed under the terms of the [Apache License 2.0](https://github.com/gradle/gradle/blob/master/LICENSE), e.g. the code was written by yourself or the original code is licensed under [a license compatible to Apache License 2.0](https://apache.org/legal/resolved.html).
- [x] Check ["Allow edit from maintainers" option](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) in pull request so that additional changes can be pushed by Gradle team
- [ ] Provide integration tests (under `<subproject>/src/integTest`) to verify changes from a user perspective
- [x] Provide unit tests (under `<subproject>/src/test`) to verify logic
- [x] Update User Guide, DSL Reference, and Javadoc for public-facing changes
- [ ] Ensure that tests pass sanity check: `./gradlew sanityCheck`
- [x] Ensure that tests pass locally: `./gradlew <changed-subproject>:quickTest`

### Reviewing cheatsheet

Before merging the PR, comments starting with
- ❌ ❓**must** be fixed
- 🤔 💅 **should** be fixed
- 💭 **may** be fixed
- 🎉 celebrate happy things

Co-authored-by: Thad House <thadhouse1@gmail.com>
bot-gradle added a commit that referenced this issue Jul 27, 2023
…compiler

Currently, the target platform is always used for the sdk resource compiler. However, when cross compiling, this does not work, and causes resource compilation for fail. Solve for this by detecting the host platform and using that for the binary directory for the resource compiler.

<!--- The issue this PR addresses -->
Fixes #25870

### Context
Windows Arm64 support was added as both a host and cross compiled option, however cross compiled mode does not work currently. This diff fixes that.

### Contributor Checklist
- [x] [Review Contribution Guidelines](https://github.com/gradle/gradle/blob/master/CONTRIBUTING.md)
- [x] Make sure that all commits are [signed off](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff) to indicate that you agree to the terms of [Developer Certificate of Origin](https://developercertificate.org/).
- [x] Make sure all contributed code can be distributed under the terms of the [Apache License 2.0](https://github.com/gradle/gradle/blob/master/LICENSE), e.g. the code was written by yourself or the original code is licensed under [a license compatible to Apache License 2.0](https://apache.org/legal/resolved.html).
- [x] Check ["Allow edit from maintainers" option](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) in pull request so that additional changes can be pushed by Gradle team
- [ ] Provide integration tests (under `<subproject>/src/integTest`) to verify changes from a user perspective
- [x] Provide unit tests (under `<subproject>/src/test`) to verify logic
- [x] Update User Guide, DSL Reference, and Javadoc for public-facing changes
- [ ] Ensure that tests pass sanity check: `./gradlew sanityCheck`
- [x] Ensure that tests pass locally: `./gradlew <changed-subproject>:quickTest`

### Reviewing cheatsheet

Before merging the PR, comments starting with
- ❌ ❓**must** be fixed
- 🤔 💅 **should** be fixed
- 💭 **may** be fixed
- 🎉 celebrate happy things

Co-authored-by: Thad House <thadhouse1@gmail.com>
bot-gradle added a commit that referenced this issue Jul 28, 2023
…compiler

Currently, the target platform is always used for the sdk resource compiler. However, when cross compiling, this does not work, and causes resource compilation for fail. Solve for this by detecting the host platform and using that for the binary directory for the resource compiler.

<!--- The issue this PR addresses -->
Fixes #25870

### Context
Windows Arm64 support was added as both a host and cross compiled option, however cross compiled mode does not work currently. This diff fixes that.

### Contributor Checklist
- [x] [Review Contribution Guidelines](https://github.com/gradle/gradle/blob/master/CONTRIBUTING.md)
- [x] Make sure that all commits are [signed off](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff) to indicate that you agree to the terms of [Developer Certificate of Origin](https://developercertificate.org/).
- [x] Make sure all contributed code can be distributed under the terms of the [Apache License 2.0](https://github.com/gradle/gradle/blob/master/LICENSE), e.g. the code was written by yourself or the original code is licensed under [a license compatible to Apache License 2.0](https://apache.org/legal/resolved.html).
- [x] Check ["Allow edit from maintainers" option](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) in pull request so that additional changes can be pushed by Gradle team
- [ ] Provide integration tests (under `<subproject>/src/integTest`) to verify changes from a user perspective
- [x] Provide unit tests (under `<subproject>/src/test`) to verify logic
- [x] Update User Guide, DSL Reference, and Javadoc for public-facing changes
- [ ] Ensure that tests pass sanity check: `./gradlew sanityCheck`
- [x] Ensure that tests pass locally: `./gradlew <changed-subproject>:quickTest`

### Reviewing cheatsheet

Before merging the PR, comments starting with
- ❌ ❓**must** be fixed
- 🤔 💅 **should** be fixed
- 💭 **may** be fixed
- 🎉 celebrate happy things

Co-authored-by: Thad House <thadhouse1@gmail.com>
@bot-gradle bot-gradle added this to the 8.4 RC1 milestone Jul 31, 2023
@ov7a ov7a removed the to-triage label Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:bug has:reproducer Indicates the issue has a confirmed reproducer in:native-platform c, cpp, swift and other native languages support, etc re:windows Issue related to using Gradle on Windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants